KiCad leaves tombstone process after plugin wx.App wx.CallAfter

Bug #1827742 reported by Andrei Pozolotin on 2019-05-04
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Low
Unassigned

Bug Description

1. some python plugins, i.e.
https://github.com/openscopeproject/InteractiveHtmlBom
https://github.com/random-builder/kicad_freerouting-plugin
need to have gui-thread-safe invocation methods

2. this is best accomplished by using wx.App wx.CallAfter
https://wxpython.org/Phoenix/docs/html/wx.App.html
https://wiki.wxpython.org/CallAfter

3. however, that requires proper initialization of wx.App singleton
which currently occurs only when kicad_pyshell is invoked
https://git.launchpad.net/kicad/tree/pcbnew/python/kicad_pyshell/__init__.py#n92

4. attempt of initialization of wx.App in user plugin, i.e.
https://github.com/random-builder/kicad_freerouting-plugin/blob/master/plugin.py#L74
without first activating kicad_pyshell
results in KiCad leaving tombstone process after wx.App wx.CallAfter,

5. proposed solution:
https://github.com/random-builder/kicad_freerouting-plugin/issues/1
kicad should automatically provision global wx.App instance by default,
similar to how it is done in kicad_pyshell
https://git.launchpad.net/kicad/tree/pcbnew/python/kicad_pyshell/__init__.py#n92

Seth Hillbrand (sethh) wrote :

Makes sense.

Changed in kicad:
importance: Undecided → Low
milestone: none → 6.0.0-rc1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers