Hi,
I have bind the following function to my wxpython application’s close button:
def OnClose(self, event):
self.Destroy()
print "destroyed xxx"
sys.exit(1)
When I close the application, I get the following error:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File “C:\Python27\lib\atexit.py”, line 24, in _run_exitfuncs
func(*targs, **kargs)
PyAssertionError: C++ assertion “m_count > 0” failed at …\src\common\object.cpp(353) in wxRefCounter::DecRef(): invalid ref data count
Error in sys.exitfunc:
Traceback (most recent call last):
File “C:\Python27\lib\atexit.py”, line 24, in _run_exitfuncs
func(*targs, **kargs)
wx._core.PyAssertionError: C++ assertion “m_count > 0” failed at …\src\common\object.cpp(353) in wxRefCounter::DecRef(): invalid ref data count
Could you please help, what does that error message mean and how can I fix it?
Best regards