'Ray Satiro' via wx-users
2014-08-22 06:13:41 UTC
Hello I am updating some code for wxWidgets 3 and I am currently using master branch a307120 20140818. I have some code that restarts the application I am working on by calling in an atexit() handler wxExecute() with the executable path of the application on exit. You can see it here:https://github.com/jay/GalaXQL/blob/d36ed86/galaxql.cpp#L2103-2151
That works fine in both Windows and Linux, however I noticed an assert today in Ubuntu when I ran the app from the console:
../src/unix/utilsunx.cpp(1601): assert "static_cast<wxAppConsole*>(wxAppConsole::GetInstance())" failed in OnStart(): Ensure wxTheApp is set before calling wxExecute()
Indeed wxTheApp isn't set because I've already called wxTheApp->Exit() and that atexit handler is invoked after that. I wrote this code expecting that it would be safer to shut down wxWidgets resources (ie destroy wxTheApp) before relaunching the application. Is it safe to call wxExecute on exit after wxTheApp has shut down, and should I be concerned about that assertion?
Thanks
That works fine in both Windows and Linux, however I noticed an assert today in Ubuntu when I ran the app from the console:
../src/unix/utilsunx.cpp(1601): assert "static_cast<wxAppConsole*>(wxAppConsole::GetInstance())" failed in OnStart(): Ensure wxTheApp is set before calling wxExecute()
Indeed wxTheApp isn't set because I've already called wxTheApp->Exit() and that atexit handler is invoked after that. I wrote this code expecting that it would be safer to shut down wxWidgets resources (ie destroy wxTheApp) before relaunching the application. Is it safe to call wxExecute on exit after wxTheApp has shut down, and should I be concerned about that assertion?
Thanks
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users