nvda
5c1a74ca - Fix NVDA restart failure after add-on installation (#20703)

Commit
6 days ago
Fix NVDA restart failure after add-on installation (#20703) Closes #17925. Summary of the issue: After installing or updating an add-on package from File Explorer, rapidly confirming the dialogs could cause NVDA to access a MessageDialog after its underlying wx object had been deleted. This raised a RuntimeError and prevented the requested NVDA restart. Description of user facing changes: NVDA now restarts reliably when requested after installing or updating an add-on package from File Explorer. Description of developer facing changes: No public API changes. Description of development approach: displayDialogAsModal previously called GetParent both before and after ShowModal. A modal dialog may be destroyed before ShowModal returns, making the second access unsafe. The dialog's parent state is now cached before it is shown. This preserves the existing prePopup and postPopup behavior without accessing the dialog after ShowModal returns. A regression test simulates the dialog becoming invalid while it is shown and verifies that it is not accessed afterward.
Author
Parents
Loading