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

ios 8.1 fatal error:value failed to bridge from Swift type to a Objective-C type #792

Closed
tcper opened this issue Mar 3, 2016 · 2 comments

Comments

@tcper
Copy link

tcper commented Mar 3, 2016

in ChartXAxisRenderer
the exc_bad_instruction line:
let labelSize = widthText.sizeWithAttributes([NSFontAttributeName: _xAxis.labelFont])

but in ios 9.2, there is no error here, but how to fix it ?

@tcper
Copy link
Author

tcper commented Mar 3, 2016

I fixed it by using :

let dict = [NSFontAttributeName: _xAxis.labelFont]
let labelSize = widthText.sizeWithAttributes(dict)

the very same meaning code, but it won't crash now, I don't know why

@danielgindi
Copy link
Collaborator

It's a Swift Compiler optimization bug. We have encountered such in another place. Apple fixes them from time to time. Please try to run it in latest Xcode beta - and let us know if they fixes this one :-)

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

No branches or pull requests

2 participants