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

Bug #1827742 reported by Andrei Pozolotin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Unknown

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

Tags: pcbnew python
Revision history for this message
Seth Hillbrand (sethh) wrote :

Makes sense.

Changed in kicad:
importance: Undecided → Low
milestone: none → 6.0.0-rc1
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/1894

Changed in kicad:
status: New → Expired
Changed in kicad:
importance: Low → Unknown
status: Expired → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.