Coder Social home page Coder Social logo

Comments (8)

umberto-sonnino avatar umberto-sonnino commented on July 20, 2024

Hey @ljsalvatierra, thanks for the error report! Could you share the affected Flare file?

from flare-flutter.

jasonch99 avatar jasonch99 commented on July 20, 2024

I am also getting a similar issue.
Is there any update on this?

from flare-flutter.

dnfield avatar dnfield commented on July 20, 2024

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.

from flare-flutter.

kekecorp avatar kekecorp commented on July 20, 2024

Hi @dnfield and @jasonch99 - Let me check in on this today for both of you with engineering.
-Kelly (Rive CS)

from flare-flutter.

jasonch99 avatar jasonch99 commented on July 20, 2024

@kekecorp, any update on this?

from flare-flutter.

mehmetf avatar mehmetf commented on July 20, 2024

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?

from flare-flutter.

luigi-rosso avatar luigi-rosso commented on July 20, 2024

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

from flare-flutter.

jasonch99 avatar jasonch99 commented on July 20, 2024

Thanks for the clarification. I will try using a new FlareControls whenever the file is changed.

from flare-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.