fix(ios): do not assign the 'spring' curve as a timing function - #6
Open
farfromrefug wants to merge 1 commit into
Open
fix(ios): do not assign the 'spring' curve as a timing function#6farfromrefug wants to merge 1 commit into
farfromrefug wants to merge 1 commit into
Conversation
farfromrefug
marked this pull request as ready for review
September 4, 2026 19:43
`curve === 'spring'` selects CASpringAnimation, then fell through to `basicAnimation.timingFunction = curve` and put the string 'spring' where CoreAnimation expects a CAMediaTimingFunction. The assignment is silent; the app aborts at the next CA commit, inside -[CASpringAnimation _copyRenderAnimationForLayer:], with `-[NSTaggedPointerString _getPoints:]: unrecognized selector sent to instance`. Every other curve value is a real CAMediaTimingFunction, so only `curve: 'spring'` was affected - any view animated with it crashed the app. Co-Authored-By: Claude Opus 5 <[email protected]>
farfromrefug
force-pushed
the
fix/ios-spring-timing-function
branch
from
September 4, 2026 19:45
f87571a to
948de96
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.
Summary
Any view animated with
curve: 'spring'crashes the app on iOS._createBasicAnimationusescurveto pickCASpringAnimation, then falls through tobasicAnimation.timingFunction = curveand assigns the string'spring'where CoreAnimation expects aCAMediaTimingFunction. The assignment is silent. The abort comes later, when the animation is committed:Because it throws at commit time rather than at the call site, the crash lands on whatever frame comes next — which makes it look unrelated to the animation that caused it.
Every other curve value is a real
CAMediaTimingFunction, so only'spring'is affected. This is fork-specific: thecurve === 'spring' ? CASpringAnimation : CABasicAnimationbranch does not exist upstream.Testing
Reproduced in an app that animates a slider thumb with
curve: 'spring': consistentSIGABRTat the next CoreAnimation commit, matching the trace above. With this change the spring animation runs and the crash is gone.CASpringAnimationstill gets itsdamping,duration,fromValueandtoValueas before — only the bogustimingFunctionassignment is skipped.