-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Windows GUI crash on close #3910
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3910 +/- ##
=======================================
Coverage 89.10% 89.10%
=======================================
Files 255 255
Lines 14600 14600
=======================================
Hits 13010 13010
Misses 1590 1590 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, no more crashes. Thanks, @Sploder12!
But then is this a bug in Flutter itself? This code was generated by them, not written by us 🤔
Interesting... it could be |
Previously the GUI would always crash when the GUI is closed. This PR makes it so the GUI does not crash when it is closed. The issue was due to destructor call ordering for the GUI Window. FlutterWindow (subclass of Win32Window) would begin destruction which destructs the FlutterViewController and then the Win32Window base class. The FlutterViewController is registered to a Windows callback that is removed when Win32Window is destructed, but since the FlutterViewController gets destructed before the Win32Window there is some time where the callback is still active but the FlutterViewController is in an invalid state.
MULTI-1711