Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

22076249: Xcode 6.4: NS_INLINE functions called from Swift crash in Release builds #46

Open
openradar-mirror opened this issue Aug 3, 2015 · 0 comments

Comments

@openradar-mirror
Copy link

Description

Summary:
When calling a C function marked as NS_INLINE from Swift, the app crashes when built for Release. It doesn’t crash when built for Debug.

For example
NS_INLINE BOOL myInlineFunction(void) { return UIScreen.mainScreen.bounds.size.height == 568;}

Calling that from Swift leads to
2015-07-30 20:20:42.331 NSInlineWhizBang[82768:5412934] *** NSForwarding: warning: selector (0x1045ccbe2) for message 'mainScreen' does not match selector known to Objective C runtime (0x107d5d8f1)-- abort
2015-07-30 20:20:42.331 NSInlineWhizBang[82768:5412934] +[UIScreen mainScreen]: unrecognized selector sent to class 0x105b24310
2015-07-30 20:20:42.337 NSInlineWhizBang[82768:5412934] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIScreen mainScreen]: unrecognized selector sent to class 0x105b24310'

Steps to Reproduce:
Build & run the attached project in Release mode

Expected Results:
app runs

Actual Results:
app crashes

Regression:

Notes:
Can’t reproduce with Xcode 7.

Product Version: Xcode 6.4 (6E35b)
Created: 2015-07-30 18:27:13.142560
Originated: 2015-07-30T20:27:00
Open Radar Link: http://www.openradar.me/22076249

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant