Fix crash on macOS 26 due to objc2 signed/unsigned encoding mismatch#71
Merged
florianl merged 1 commit intoelastic:mainfrom Feb 12, 2026
Merged
Fix crash on macOS 26 due to objc2 signed/unsigned encoding mismatch#71florianl merged 1 commit intoelastic:mainfrom
florianl merged 1 commit intoelastic:mainfrom
Conversation
|
💚 CLA has been signed |
On macOS 26 (Tahoe), the app panics at startup when winit (via eframe)
enumerates NSScreen objects. The objc2 crate's encoding verifier expects
a signed type code ('q') for countByEnumeratingWithState:objects:count:
but the runtime returns unsigned ('Q'), causing a panic.
This is a known issue in objc2-foundation 0.2.2:
- madsmtm/objc2#765
- madsmtm/objc2#566
- Fix: madsmtm/objc2#567
The fix was released as a feature flag `relax-sign-encoding` in objc2
0.5.2 (already a transitive dependency via eframe -> winit). Adding
objc2 as a direct macOS-only dependency with this feature enabled
activates it globally without requiring an eframe version bump.
Note: eframe has not yet upgraded to objc2 0.6.x which includes this
fix by default (even latest eframe 0.33.x still uses objc2 0.5.x).
b581e0f to
2fb8e64
Compare
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.
On macOS 26 (Tahoe), the app panics at startup (when just called via
cargo runon main) when winit (via eframe) enumerates NSScreen objects:The issue seems to be in a dependency 1:
The objc2 crate's encoding verifier expects a signed type code ('q') for countByEnumeratingWithState:objects:count: but the runtime returns unsigned ('Q'), causing a panic.
This is a known issue in objc2-foundation 0.2.2:
The fix was released as a feature flag
relax-sign-encodingin objc2 0.5.2 (already a transitive dependency via eframe -> winit). Adding objc2 as a direct macOS-only dependency with this feature enabled activates it globally without requiring an eframe version bump.Note: eframe has not yet upgraded to objc2 0.6.x which includes this fix by default (even latest eframe 0.33.x still uses objc2 0.5.x).
Footnotes
FYI I didn't figure this one out myself, I had claude 4.6 do it so there might be a better way, I just needed to unblock myself and get devfiler working again, and thought i'd submit the fix back. ↩