Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'ActorNode' is not a subtype of type 'ActorDrawable' in type cast #56

Closed
MarcelGarus opened this issue Mar 14, 2019 · 4 comments
Closed

Comments

@MarcelGarus
Copy link

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 (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.
@umberto-sonnino
Copy link
Contributor

Hey @MarcelGarus, I couldn't reproduce the issue over here!
Could you share the .flr file that's crashing?

@MarcelGarus
Copy link
Author

MarcelGarus commented Mar 14, 2019

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).

@umberto-sonnino
Copy link
Contributor

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!

@MarcelGarus
Copy link
Author

You're right, I simply exported it again and it worked 😄

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! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants