-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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: about panel crash #37373
fix: about panel crash #37373
Conversation
b66da76
to
61c841b
Compare
@deepak1556 It actually crashed inside |
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.
@clavin this is stalling/failing on Windows
Yeah I'm trying to get a build going on my Windows machine to figure out why the app is just hanging when it gets to the new tests |
Apparently |
@clavin imo just gate it to linux for now |
I fixed the issue by making this API non-blocking on all platforms, instead of just on one. That might mean this should have a different semver? To be clear, the docs didn't state the behavior one way or the other, but this still could theoretically cause code relying on the blocking (if there is any???) to execute earlier than intended. |
I'm going to mark this as needing API review, just in case. |
It would be good to split the async behavior change to a different PR for api-wg review, the dictionary crash fix is good to merge irrespective of it. |
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.
API LGTM
I did both at the same time because I wanted to add a test covering the crash, which is impossible when the method is synchronous :/ But I'm happy to split the test & async change both into a separate PR if it makes things easier :) |
I think the test for |
b4f6be3
to
60916e5
Compare
Done 🫡 This PR now only has the crash fix and the API change will be split into a separate PR |
Release Notes Persisted
|
I was unable to backport this PR to "22-x-y" cleanly; |
I was unable to backport this PR to "23-x-y" cleanly; |
I have automatically backported this PR to "24-x-y", please check out #37442 |
Description of Change
This code causes a crash bc the
about_panel_options_
gets initialized as abase::Value
, thus not aDict
, and the calls toGetDict()
fail. This just changes that type to abase::Value::Dict
and everything 🪄 magically ✨ works. Added a sanity test as a cherry on top.EDIT:
This PR now also unifies every platform by makingThis will be broken into a separate PR.showAboutPanel
run asynchronously, where before it varied platform to platform. I think this would be the sensible default for the about panel (fire and forget), but if "run code after closing" is desired, either recommend users to pursue a different solution (e.g. use a BrowserWindow) or we can choose to implement the callback proper later.Release Notes
Notes: Setting the about panel's options no longer crashes.