PyUserInput
PyUserInput copied to clipboard
wxPython - Segmentation Fault on exit
When used with wxPython, simply adding the line:
"from pymouse import PyMouse"
causes a segmentation fault when the application is exited.
Could you provide a small self-contained example? or perhaps instructions on how to recreate it?
Sure. In this example, if you remove the pymouse import line, it will exit cleanly. If you keep the import line, it will segfault on exit:
import wx
from pymouse import PyMouse
class MainFrame(wx.Frame):
"""Class MainFrame."""
def __init__(self, parent, id):
"""Create the MainFrame."""
wx.Frame.__init__(self, parent, id, 'Example GUI')
class MainApp(wx.App):
"""Class Main App."""
def OnInit(self):
"""Init Main App."""
self.frame = MainFrame(None, -1)
self.frame.Show(True)
self.SetTopWindow(self.frame)
return True
if __name__ == '__main__':
app = MainApp(0)
app.MainLoop()
I just install wxpython v.2.8.12.1 on Ubuntu and conducted the test with the above example app code. I was unable to replicate the issue. What platform are you on?