Sparkle
Sparkle copied to clipboard
Updater crashing on 10.13 if no updates available.
I'm using the latest Sparkle through Cocoapods, and when I check for updates on a Mac running 10.13.6, the "Checking for updates" window appears, then after a moment, the application crashes with the following error:
Crashing on exception: -[NSAlert runModal] may not be invoked inside of transaction begin/commit pair, or inside of transaction commit (usually this means it was invoked inside of a view's -drawRect: method.)
Here's the relevant part of the backtrace:
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff5568b59b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff7c9af942 objc_exception_throw + 48
2 CoreFoundation 0x00007fff5571b935 +[NSException raise:format:] + 197
3 AppKit 0x00007fff5345c431 _NSRunModal + 484
4 AppKit 0x00007fff52e3b67d -[NSAlert runModal] + 240
5 Sparkle 0x000000010e94b64d -[SUUIBasedUpdateDriver showAlert:] + 436
6 Sparkle 0x000000010e9493d5 -[SUUIBasedUpdateDriver didNotFindUpdate] + 1353
This only happens when there are no updates available. If there is an update, the "Update Available" window appears and I can download the update successfully.
I don't see the crash on 10.14.
I think we've already fixed that bug. Are you using the latest version of Sparkle?
I'm on 1.21
Oh wait, that's not about the main thread. It's about transaction. In that case that's very surprising, because we're not using low-level UI stuff like drawRect
. The callback is delayed using performSelectorOnMainThread
, so at that point there shouldn't be anything else happening there.