You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Developer machine:
Xcode 9.3 9E145
Swift 4.1 'swiftlang-902.0.48'
Test device:
iPod Touch
iOS 9.3.5 (13G36)
Additional Detail from JIRA
Votes
0
Component/s
Foundation
Labels
Bug, 4.1Regression
Assignee
None
Priority
Medium
md5: 3fb56679807fff4408f2adb44e525772
Issue Description:
Casting Float to NSNumber results in nil in cases where it cannot be cleanly represented.
This seems to be related to SR-5179, and it seems from looking at SR-5228 that this may be an intentional change to avoid lossy conversion. However, I wanted to point out that this behaviour leads to crashes on iOS 9 when using CABasicAnimation and animating CGFloat properties.
I recently discovered that our app started crashing on iOS 9 after the upgrade to Xcode 9.3/Swift 4.1. I've determined the cause is this issue happening somewhere in CABasicAnimation. If I don't specify `fromValue` then it works fine. This crash does not happen in iOS 10 or later.
The problem with this crash is that it results inside CoreAnimation code, so the developer needs to either disable the animation on iOS 9 or sanitise Float values before passing them in.
If I should file a radar let me know, but it seems like the problem is with Swift, because the issue doesn't exist in iOS 10 or later.
The following exception is thrown on an iOS 9 device when attempting to run the animation
Just wanted to update, I couldn't reproduce this on iOS 10, but now that I've started to roll out the changes, I've seen numerous crash logs from users on iOS 10.3.3.
Environment
Developer machine:
Xcode 9.3 9E145
Swift 4.1 'swiftlang-902.0.48'
Test device:
iPod Touch
iOS 9.3.5 (13G36)
Additional Detail from JIRA
md5: 3fb56679807fff4408f2adb44e525772
Issue Description:
Casting Float to NSNumber results in nil in cases where it cannot be cleanly represented.
This seems to be related to SR-5179, and it seems from looking at SR-5228 that this may be an intentional change to avoid lossy conversion. However, I wanted to point out that this behaviour leads to crashes on iOS 9 when using CABasicAnimation and animating CGFloat properties.
I recently discovered that our app started crashing on iOS 9 after the upgrade to Xcode 9.3/Swift 4.1. I've determined the cause is this issue happening somewhere in CABasicAnimation. If I don't specify `fromValue` then it works fine. This crash does not happen in iOS 10 or later.
The problem with this crash is that it results inside CoreAnimation code, so the developer needs to either disable the animation on iOS 9 or sanitise Float values before passing them in.
If I should file a radar let me know, but it seems like the problem is with Swift, because the issue doesn't exist in iOS 10 or later.
The following exception is thrown on an iOS 9 device when attempting to run the animation
Here is a simplified example of the kind of animation that might crash on iOS 9
The text was updated successfully, but these errors were encountered: