Flare-flutter: 'ActorNode' is not a subtype of type 'ActorDrawable' in type cast

Created on 14 Mar 2019  ยท  4Comments  ยท  Source: 2d-inc/Flare-Flutter

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:

  1. Export https://www.2dimensions.com/a/marcelgarus/files/flare/murderers:-logo to a .flr file
  2. Include that file into a Flutter app: 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.
```

Most helpful comment

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:

All 4 comments

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:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rohan20 picture rohan20  ยท  6Comments

yjoo9317 picture yjoo9317  ยท  5Comments

sroddy picture sroddy  ยท  4Comments

madtocc picture madtocc  ยท  8Comments

izzatzr picture izzatzr  ยท  4Comments