Closed rsms closed 5 months ago
I tried building Sparkle from source, using Xcode, but I can't get past this error, which appears immediately after opening the Sparkle Xcode project after unzipping the source archive from https://github.com/sparkle-project/Sparkle/releases/tag/2.6.0
~We tried using Sparkle 2.5.2 and Sparkle 2.4.2 and both of those works! So this seems like a regression in 2.6.0.~
Nope, still crashes with Sparkle.framework from both 2.4.2 and 2.5.2. However, strangely, it does not crash every time with 2.4.2 or 2.5.2.
Summary
After carefully following the documentation and integrating Sparkle in macOS app, we encounter a 100% reproducible crash in macOS dyld dlopen_from when Sparkle is enabled.
Here's how we integrate Sparkle:
When starting our app, which is a regular Apple code-signed .app bundle, it immediately crashes when clicking on the main menu.
Stack trace from debugger session:
Debugger breaking at dlopen_from:
If we don't enable Sparkle (i.e. don't call
PBAppAutoUpdateEnable()
), no crash. We have been running this app for months (without Sparkle) without ever seeing this crash.Possible Fix
Ideas:
Sparkle was built with a macOS SDK that has a bug in its .tbd files. We are building our app with MacOSX11.3.sdk (we target 10.15 on x86, >=11.1 on arm64).
There are some complex interactions with code signing. This topic (Apple code signing and gatekeeping) seems like an endless pit of issues in general. We are code signing our .app bundle recursively (
codesign --entitlements our-entitlements.plist --force --deep --sign "OUR_CODESIGN_ID" --identifier our.id Our.app
) andcodesign -vvv Our.app
checks out.Version
Sparkle 2.6.0, pre-built from https://github.com/sparkle-project/Sparkle/releases/tag/2.6.0 Tested on macOS 12.6.3 on M1/arm64 hardware. Built with clang/llvm 15.0.7