You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wxPython version & source: 4.2.1 from conda-forge (but antoher user has reported on 4.2.0 and from PyPi, I think)
Python version & source: Python 3.9 and 3.10 -- conda-forge (but others have reported it on other builds)
Description of the problem:->
If there is a wx.Overlay still around when the app shuts down, you get a segfault on closing it.
line 3: 10056 Segmentation fault: 11 /Users/chris.barker/miniconda3/envs/floatcanvas/python.app/Contents/MacOS/python "$@"
The solution is to delete the wx.DCOverlay before clearing the wx.Overlay. Here's the code that works, in lib.floatcanvas.GUI RubberBandBox (in #2448):
odc = wx.DCOverlay(self.overlay, dc)
del odc # needs to be deleted before clearing the overlay, or it will crash on exit
self.overlay.Reset()
without that del -- it crashes on exit, and trying to delete the wx.Overlay instead is ugly -- I had to do it in a wx.CallAfter (probably because the wx.DCOverlay was still around)
Not too bad to work around once I figure it out, but ideally it should not be possible to get a segfault with Python code.
The text was updated successfully, but these errors were encountered:
wxMac -- a couple versions, but currently: 11.7.9
wxPython version & source: 4.2.1 from conda-forge (but antoher user has reported on 4.2.0 and from PyPi, I think)
Python version & source: Python 3.9 and 3.10 -- conda-forge (but others have reported it on other builds)
Description of the problem:->
If there is a
wx.Overlay
still around when the app shuts down, you get a segfault on closing it.The solution is to delete the
wx.DCOverlay
before clearing thewx.Overlay
. Here's the code that works, inlib.floatcanvas.GUI RubberBandBox
(in #2448):without that
del
-- it crashes on exit, and trying to delete thewx.Overlay
instead is ugly -- I had to do it in awx.CallAfter
(probably because thewx.DCOverlay
was still around)Not too bad to work around once I figure it out, but ideally it should not be possible to get a segfault with Python code.
The text was updated successfully, but these errors were encountered: