Hi!
When trying to run an animation of my Flare file, the following exception is thrown:
I/flutter (19843): โโโก EXCEPTION CAUGHT BY SCHEDULER LIBRARY โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
I/flutter (19843): The following _CastError was thrown during a scheduler callback:
I/flutter (19843): type 'ActorNode' is not a subtype of type 'ActorDrawable' in type cast
I/flutter (19843):
I/flutter (19843): When the exception was thrown, this was the stack:
I/flutter (19843): #0 KeyFrameDrawOrder.apply
package:flare_dart/animation/keyframe.dart:450
I/flutter (19843): #1 KeyFrameDrawOrder.applyInterpolation
package:flare_dart/animation/keyframe.dart:443
I/flutter (19843): #2 PropertyAnimation.apply
package:flare_dart/animation/actor_animation.dart:207
I/flutter (19843): #3 ComponentAnimation.apply
package:flare_dart/animation/actor_animation.dart:248
I/flutter (19843): #4 ActorAnimation.apply
package:flare_dart/animation/actor_animation.dart:403
I/flutter (19843): #5 FlareActorRenderObject.beginFrame
package:flare_flutter/flare_actor.dart:328
I/flutter (19843): #6 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback
package:flutter/โฆ/scheduler/binding.dart:1008
I/flutter (19843): #7 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame.<anonymous closure>
I/flutter (19843): #8 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/lib/compact_hash.dart:367:8)
I/flutter (19843): #9 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame
package:flutter/โฆ/scheduler/binding.dart:922
I/flutter (19843): #10 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleBeginFrame
package:flutter/โฆ/scheduler/binding.dart:852
I/flutter (19843): #14 _invoke1 (dart:ui/hooks.dart:233:10)
I/flutter (19843): #15 _beginFrame (dart:ui/hooks.dart:172:3)
I/flutter (19843): (elided 3 frames from package dart:async)
I/flutter (19843):
I/flutter (19843):
I/flutter (19843): This exception was thrown in the context of a scheduler callback. When the scheduler callback was
I/flutter (19843): _registered_ (as opposed to when the exception was thrown), this was the stack:
I/flutter (19843): #0 new _FrameCallbackEntry.<anonymous closure>
package:flutter/โฆ/scheduler/binding.dart:108
I/flutter (19843): #1 new _FrameCallbackEntry
package:flutter/โฆ/scheduler/binding.dart:111
I/flutter (19843): #2 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleFrameCallback
package:flutter/โฆ/scheduler/binding.dart:444
I/flutter (19843): #3 FlareActorRenderObject.updatePlayState
package:flare_flutter/flare_actor.dart:181
I/flutter (19843): #4 FlareActorRenderObject.beginFrame
package:flare_flutter/flare_actor.dart:305
I/flutter (19843): #5 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback
package:flutter/โฆ/scheduler/binding.dart:1008
I/flutter (19843): #6 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame.<anonymous closure>
package:flutter/โฆ/scheduler/binding.dart:924
I/flutter (19843): #7 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/lib/compact_hash.dart:367:8)
I/flutter (19843): #8 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame
I/flutter (19843): #9 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleBeginFrame
package:flutter/โฆ/scheduler/binding.dart:852
I/flutter (19843): #13 _invoke1 (dart:ui/hooks.dart:233:10)
I/flutter (19843): #14 _beginFrame (dart:ui/hooks.dart:172:3)
I/flutter (19843): (elided 3 frames from package dart:async)
I/flutter (19843): โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Steps to reproduce:
FlareActor('images/logo.flr', animation: 'intro')Versions:
I'm using the newest version of the flare_flutter package (1.3.3).
Output of flutter doctor -v:
```flutter doctor
[โ] Flutter (Channel master, v1.3.10-pre.42, on Linux, locale en_US.UTF-8)
โข Flutter version 1.3.10-pre.42 at /home/marcel/flutter
โข Framework revision c942ed4813 (28 minutes ago), 2019-03-14 09:26:44 -0700
โข Engine revision 8b1a299ed5
โข Dart version 2.2.1 (build 2.2.1-dev.1.0 674fd0e060)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
โข Android SDK at /home/marcel/Android/Sdk
โข Android NDK location not configured (optional; useful for native profiling
support)
โข Platform android-28, build-tools 28.0.3
โข Java binary at:
/home/marcel/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/182.51
99772/jre/bin/java
โข Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1248-b01)
โ Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit
https://flutter.io/setup/#android-setup for detailed instructions.
[โ] Android Studio (version 3.1)
โข Android Studio at /opt/android-studio
โข Flutter plugin version 27.1.1
โข Dart plugin version 173.4700
โข Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1024-b01)
[โ] Android Studio (version 3.3)
โข Android Studio at
/home/marcel/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/182.51
99772
โข Flutter plugin version 32.0.1
โข Dart plugin version 182.5124
โข Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1248-b01)
[!] Android Studio (version 3.0)
โข Android Studio at /opt/android-studio-preview
โ Flutter plugin not installed; this adds Flutter specific functionality.
โ Dart plugin not installed; this adds Dart specific functionality.
โข Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[!] IntelliJ IDEA Ultimate Edition (version 2018.3)
โข IntelliJ at
/home/marcel/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.5429.30
โ Flutter plugin not installed; this adds Flutter specific functionality.
โ Dart plugin not installed; this adds Dart specific functionality.
โข For information about installing plugins, see
https://flutter.io/intellij-setup/#installing-the-plugins
[โ] VS Code (version 1.30.2)
โข VS Code at /usr/share/code
โข Flutter extension version 2.24.0
[โ] Connected device (1 available)
โข ONEPLUS A6013 โข ca50b254 โข android-arm64 โข Android 9 (API 28)
! Doctor found issues in 3 categories.
```
Hey @marcelgarus, I couldn't reproduce the issue over here!
Could you share the .flr file that's crashing?
Sure. You can find the .flr file here: https://github.com/marcelgarus/murderers/blob/dev/app/images/logo.flr
If you want to, you can also just clone and run the app (the logo is shown on the splash screen, but not animated due to the exception).
It looks like your export contains some mismatched values. We'll be investigating further on why that happened.
In the meantime, if you export again the same animation, you should be able to run it without problems!
You're right, I simply exported it again and it worked :smile:
Kinda strange though... a git diff reveals that the only difference between the two files were that some rotations were slightly different (in the 15th decimal place) and some orders changed.
I don't get how that could have broken the Flare interpreter.
Anyhow, I guess this issue can be closed then. Thanks for all your help! :+1:
Most helpful comment
You're right, I simply exported it again and it worked :smile:
Kinda strange though... a
git diffreveals that the only difference between the two files were that some rotations were slightly different (in the 15th decimal place) and some orders changed.I don't get how that could have broken the Flare interpreter.
Anyhow, I guess this issue can be closed then. Thanks for all your help! :+1: