Replies: 3 comments 2 replies
-
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 ![]() |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Try running with zombies enabled (the env might be NSZombieEnabled but double check) or with guad malloc ( Crashing at clicking the main menu is probably not immediately related to Sparkle. I'm in a rush right now but don't see an issue with the code provided at first glance.
You can develop with later SDKs and set the deployment target to older OS's (the deployment target is another compiler flag). This is the normal expectation, developers adopt the latest versions of Xcode and latest versions of SDKs. For our project we only properly support the latest version of Xcode, and one major version less.
Code signing recursively with the same entitlements like this is not advised and can create issues. You do not want to sign Sparkle with your own entitlements you use for the rest of your app. |
Beta Was this translation helpful? Give feedback.
-
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
Beta Was this translation helpful? Give feedback.
All reactions