-
Notifications
You must be signed in to change notification settings - Fork 541
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
Crash in SkyFloatingLabelTextField textHeight #186
Comments
It is likely that the crash will be very hard to reproduce, however removing the force unwrap is an improvement that will reduce the cause of the crash. |
Hmm are you setting the font yourself our relying on the system font being set by the OS? I agree that the force unwrap is not ideal, however what you would do in its absence is a big question. Just using a line height of 0 is likely not what you'd want |
We're setting the font ourselves, it's not a zero point font size. And it's only been seen once. Possibly a race condition in the UIKit autolayout vs storyboard resource loading. |
Has this cropped up again or are you any closer to reproducing it? |
Haven't seen it again. Going to close this as unreproducible though the use of forced unwrapping in production code continues to bother me. |
Yeah I'll have a think about it and see if I can figure out something better |
I've added 9c50bbe just to make sure we can avoid this happening. I'll release it in a while as 3.5.1 |
Published as 3.5.1 |
Report
What did you do?
used SkyFloatingLabelTextField in an iOS project using Carthage
What did you expect to happen?
App launch without problem, this mostly happens
What happened instead?
We have one crash reporting using Crashlytics. Crash report attached.
SkyFloatingLabelTextField textHeight crashed when force unwrapping self.font
We were using SkyFloatingLabelText 2.0.1 have upgraded to 3.4.0
Environment
Xcode Version: 8.3.3
SkyFloatingLabelTextField Version: 3.4.0
Deployment Target: 10.0, with crash on 10.3.2 (14F89)
Base SDK: iOS 10.3
Method of Integration: Carthage
Project that demonstrates the issue
We have only one report of this crash.
SkyFloatingLabelTextField crash during autolayout.txt
The text was updated successfully, but these errors were encountered: