-
Notifications
You must be signed in to change notification settings - Fork 16.2k
fix: Squirrel.Mac crash when zip extraction fails #47271
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
Conversation
bfbe132
to
9ae9762
Compare
9ae9762
to
f06dbd9
Compare
Release Notes Persisted
|
I have automatically backported this PR to "35-x-y", please check out #47299 |
I have automatically backported this PR to "36-x-y", please check out #47300 |
I have automatically backported this PR to "34-x-y", please check out #47301 |
I have automatically backported this PR to "37-x-y", please check out #47302 |
I found the root cause for this crash: #47515 The app ran into the per-process open file handle limit due to that bug. |
Description of Change
Fixes #47270
Squirrel.Mac launches
/usr/bin/ditto
to extract the update zip file. When that process fails to launch, the (deprecated)launch
function will raise anNSInvalidArgumentException
. This exception wasn't caught. Thus, the app crashed.This PR migrates the code to the (non-deprecated)
launchAndReturnError
function and adds proper error handling.I've also included a test to prevent this from regressing.
This is the first Objective-C code I've ever written, so please be extra careful during your review.
I've tested the change as follows:
All autoUpdater tests pass (incl. the newly added test).
The newly added test crashes with SIGTRAP on main.
CC @MarshallOfSound
Checklist
npm test
passesRelease Notes
Notes: Fixed crash in
autoUpdater
on macOS when zip extraction failed.