Open ljsalvatierra opened 5 years ago
Hey @ljsalvatierra, thanks for the error report! Could you share the affected Flare file?
I am also getting a similar issue. Is there any update on this?
The case that @jasonch99 is talking about is difficult to reproduce consistently.
This assignment should just never happen though, unless the class heirarchy is re-worked. FlutterFillColor
inherits from FrareComponent
, which is a superclass of FlareActor
.
An "easy" fix would be to make it a descendent of FlareActor
, but I don't know if that's correct.
Hi @dnfield and @jasonch99 - Let me check in on this today for both of you with engineering. -Kelly (Rive CS)
@kekecorp, any update on this?
We are seeing similar stack traces in other apps as well:
error: type 'FlutterActorShape' is not a subtype of type 'ActorPath' in type cast
#0 KeyFramePathVertices.applyInterpolation (package:flare_dart/animation/keyframe.dart:683)
#1 PropertyAnimation.apply (package:flare_dart/animation/actor_animation.dart:215)
#2 ComponentAnimation.apply (package:flare_dart/animation/actor_animation.dart:257)
#3 ActorAnimation.apply (package:flare_dart/animation/actor_animation.dart:411)
#4 FlareControls.advance (package:flare_flutter/flare_controls.dart:85)
#5 FlareActorRenderObject.advance (package:flare_flutter/flare_actor.dart:474)
#6 FlareActorRenderObject._instanceArtboard (package:flare_flutter/flare_actor.dart:380)
#7 FlareActorRenderObject.coldLoad (package:flare_flutter/flare_actor.dart:411)
type 'FlutterActorEllipse' is not a subtype of type 'ActorPath' in type cast
at KeyFramePathVertices.apply (keyframe.dart:663)
at PropertyAnimation.apply (actor_animation.dart:207)
at ComponentAnimation.apply (actor_animation.dart:257)
at ActorAnimation.apply (actor_animation.dart:411)
at FlareControls.advance (flare_controls.dart:85)
at FlareActorRenderObject.advance (flare_actor.dart:474)
at FlareRenderBox._beginFrame (flare_render_box.dart:121)
@luigi-rosso any idea under what conditions these would appear?
This could happen if an animation is being applied to an artboard that it wasn't created for.
FlareActor usually takes care of maintaining valid animations for the active artboard. However, when using a custom controller it's possible for the controlling widget to change the file being displayed and not change the controller in tandem. The controller could still be applied with the wrong animation. In Rive 2 we change this around a bit by making the controller's lifecycle being tied to the artboard instead of the rendering widget, making it difficult for someone to accidentally run into this condition.
The important thing for is to make sure custom controllers are removed from the rendering widget when the file changes (change filename/artboard reference and controller in sync).
Thanks for the clarification. I will try using a new FlareControls whenever the file is changed.
Hi, first I would like to thank you for this amazing project, truly amazing :)
It happens when i try to transform the visibility of a FlareActor. I set the percent visible with a gesture detector.
Kind regards, Luis