Conversation
This comment has been minimized.
This comment has been minimized.
2c8d29c to
79c989b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
See test results for failed build of commit bd474b6be6 |
|
I think it probably still makes sense to have a helper function for shutting down the application. It allows us to more easily change the shutdown procedure and to track errors such as being called repetitively. The docs advise using |
I agree, I have moved the function yet again to be top level in
We bind the |
This is binding to the event on the "main frame". These events "bubble upwards" to parent controls if not handled or a handler calls |
Summary of the issue: When restarting NVDA, WM_QUIT is posted as an event to the window, forcibly exiting the app. This leaves objects such as the system tray icon left behind. Additionally, changes introduced in #12183 - caused the braille viewer to be closed without saving state properly - lost code that destroyed the system tray and menu in some instances - made most of gui.terminate no longer necessary/redundant Description of how this pull request fixes the issue: - A windows event winUser.WM_EXIT_NVDA is registered that triggers safeAppExit and can be called across instances of NVDA. - move the safe destruction of the brailleviewer to safeAppExit so that it is exited properly before destruction - reintroduce the destruction of the system tray icon and menu, and remove the icon manually. - ensured safeAppExit is not called from gui.terminate if it has been called elsewhere to terminate the app. WM_QUIT is the other way to exit the MainLoop other than safeAppExit - removed restarting the MainLoop in gui.terminate to process pending events as this doesn't work. Known issues with pull request: - When starting a new instance of NVDA with an existing instance running, where one is version <2020.4, NVDA will not exit safely. Instead, the running NVDA copy will terminate directly using the behaviour of 2020.4. This is because WM_EXIT_NVDA won't be registered on the older instance. - Issues with terminating NVDA across instances cannot be logged properly as the loghandler hasn't been initialized
Summary of the issue: Changes introduced in #12183 - caused the braille viewer to be closed without saving state properly - lost code that destroyed the system tray and menu in some instances - made most of gui.terminate no longer necessary/redundant Description of how this pull request fixes the issue: - Creates `core.triggerNVDAExit` which terminates necessary modules safely and then closes all windows - Destroys the system tray icon and menu - Uses a parser error message if a new NVDA instance fails to end a running instance. - Uses an enum for ChangeWindowMessageFilter filters. Known issues with pull request: WM_QUIT will not exit the app safely (called from a new NVDA instance) when a dialog such as WelcomeDialog is still open
Link to issue number:
closes #12153, #1740
Summary of the issue:
Silent installs of NVDA were causing a crash at the end of the install process.
Upon further investigation it was found NVDA closes the wxApp by exiting the MainLoop. This is not recommended and the behaviour of closing the TopWindow is recommended.
Description of how this pull request fixes the issue:
Adds
nvda_crash.dmpfrom the install process to AppVeyor artifacts for easier testing in future.Create
gui.safeAppExitthatFrom wxWidget docs
Testing strategy:
Check the various ways of closing and restarting NVDA:
Confirm the crash dump exists
nvda_crash.dmpon this AppVeyor build and the build fails (https://ci.appveyor.com/project/NVAccess/nvda/builds/38282501)Known issues with pull request:
None
Change log entry:
Changes
Code Review Checklist: