Fix iOS crash and workaround debug hang - #1083
Merged
Merged
Conversation
Metal API Validation and GPU frame capture deadlock the app. MetalTools and GPUToolsCapture inject objc retain traffic into Compose's render thread, which then blocks on the objc sidetable lock while the main thread holds the objc weak-table lock inside MapLibre's draw (objc_loadWeakRetained on a Kotlin ObjCBackRef) and waits for a Kotlin/Native GC that can never suspend the render thread. Three-way lock inversion with no timeout, so the UI never recovers. Set in project.yml rather than Xcode's scheme editor: xcodegen omits both attributes by default, so regenerating the project silently restores them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011r7YyswsqGBpg3mYrEyiTV
Fixes "NSInvalidArgumentException -[APMMeasurement fetchSBT]: unrecognized selector" crashes in release builds. GoogleAppMeasurement ships its Objective-C categories in object files that each export a dummy _APMInclude<Name>Category symbol, referenced from APMMeasurement.o, so the linker keeps them under normal static archive semantics without needing -ObjC. 12.19.0 added APMMeasurement+SBT.o and left out the anchor: it defines nothing any other member references (only block descriptors and ARC helpers), so the linker drops it, while APMMeasurement.o still sends fetchSBT from startMeasurementOnWorkerQueue, updateSchedule, uploadData and networkRemoteConfigFetchCompletionHandler:data:error:. Confirmed by partial-linking the 12.19.0 archive: 0 APMMeasurement(SBT) methods without -ObjC, all 5 with it. The flag went into OTHER_LDFLAGS rather than the OTHER_LINKER_FLAGS block that was already there, because OTHER_LINKER_FLAGS is not a build setting Xcode recognises and was being silently dropped. Verified with a throwaway project: -lnosuchlib under OTHER_LINKER_FLAGS builds fine, under OTHER_LDFLAGS fails to link. The "-framework Shared" it contained was therefore inert too, which went unnoticed because `import Shared` makes Swift autolink the framework anyway. Firebase is now pinned exactly. `from: 12.18.0` is a >=12.18.0 <13.0.0 range and Package.resolved isn't committed (it lives inside the generated, gitignored .xcodeproj), so CI resolved whatever was newest at build time. That is how a release shipped on GoogleAppMeasurement 12.19.0 while local builds were still on 12.18.0 - where nothing sends fetchSBT, so the crash could not be reproduced here at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011r7YyswsqGBpg3mYrEyiTV
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.