App crash when animating between scroll indexes
I have 22 components, that I’m using to create a scroll wheel. Only 13 are visible at each time, because it’s part of a template I’m working on.
I’m using scroll constraint on it, and I animate between scroll indexes to animate it. As soon as I try and animate from index 1 to index 2, it crashes.
It has worked before the last update (I’m currently on 0.8.4858)
I’ve tried removing the scroll constraint and adding it again. It looks like I can’t keyframe or change the scroll index at all, it just keeps on changing the value back to 0.
This is the crash report:
System: Mac
Application: App
Editor Version: 0.8.4865
Editor Environment: prod
User: 194004 - signedIn: true
Error:
Unsupported operation: Infinity or NaN toInt
#0 ScrollConstraint.positionAtIndex (package:rive_core/constraints/scrolling/scroll_constraint.dart)
#1 ScrollConstraint.setScrollIndexAnimatedValue (package:rive_core/constraints/scrolling/scroll_constraint.dart:353)
#2 ScrollConstraintBase._scrollIndexAnimate (package:rive_core/src/generated/constraints/scrolling/scroll_constraint_base.dart:473)
#3 ScrollConstraintBase.scrollIndexAnimated= (package:rive_core/src/generated/constraints/scrolling/scroll_constraint_base.dart:480)
#4 RiveCoreContext.animateDouble (package:rive_core/src/generated/rive_core_context.dart:31751)
#5 AnimationReset.apply (package:rive_core/animation/animation_reset_factory.dart:121)
#6 LayerController._apply (package:rive_core/state_machine_controller.dart:270)
#7 LayerController.apply (package:rive_core/state_machine_controller.dart:305)
#8 StateMachineController.apply (package:rive_core/state_machine_controller.dart:1398)
#9 Artboard.tryChangeState (package:rive_core/artboard.dart:819)
#10 RiveFile.advance (package:rive_core/rive_file.dart:233)
#11 EditorRiveFile.advance (package:rive_editor/rive/editor_rive_file.dart:197)
#12 OpenFileContext._advance (package:rive_editor/rive/open_file_context.dart:1671)
#13 OpenFileContext.advance (package:rive_editor/rive/open_file_context.dart:1634)
#14 Rive._drawFrame (package:rive_editor/rive/rive.dart:390)
#15 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1434)
#16 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1347)
#17 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1200)
#18 _rootRun (dart:async/zone.dart:1525)
#19 _CustomZone.run (dart:async/zone.dart:1422)
#20 _CustomZone.runGuarded (dart:async/zone.dart:1321)
#21 _invoke (dart:ui/hooks.dart:332)
#22 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:444)
#23 _drawFrame (dart:ui/hooks.dart:302)