2d-inc / Flare-Flutter

Load and get full control of your Rive files in a Flutter project using this library.
https://rive.app/
MIT License
2.55k stars 470 forks source link

type 'StraightPathPoint' is not a subtype of type 'CubicPathPoint' in type cast #252

Open petermnt opened 4 years ago

petermnt commented 4 years ago

Since releasing our latest version of the app we have a new error in our crash reporting related to Flare.

Android:

type 'StraightPathPoint' is not a subtype of type 'CubicPathPoint' in type cast
       at ActorArtboard.advance(actor_artboard.dart:327)
       at FlareActorRenderObject.advance(flare_actor.dart:458)
       at FlareRenderBox._beginFrame(flare_render_box.dart:120)
       at SchedulerBinding._invokeFrameCallback(binding.dart:1113)
       at SchedulerBinding.handleBeginFrame.<fn>(binding.dart:1028)
       at SchedulerBinding.handleBeginFrame(binding.dart:1026)
       at SchedulerBinding._handleBeginFrame(binding.dart:960)

iOS:

type 'StraightPathPoint' is not a subtype of type 'CubicPathPoint' in type cast
0  ???                            0x0 305 (<optimized)
1  ???                            0x0 advance + 327 (actor_artboard.dart:327)
2  ???                            0x0 advance + 458 (flare_actor.dart:458)
3  ???                            0x0 _beginFrame + 120 (flare_render_box.dart:120)
4  ???                            0x0 _invokeFrameCallback + 1113 (binding.dart:1113)
5  ???                            0x0 handleBeginFrame.<fn> + 1028 (binding.dart:1028)
6  ???                            0x0 (Missing) (dart:collection)
7  ???                            0x0 handleBeginFrame + 1026 (binding.dart:1026)
8  ???                            0x0 _handleBeginFrame + 960 (binding.dart:960)

It seems to be happening here: https://github.com/2d-inc/Flare-Flutter/blob/stable/flare_dart/lib/actor_path.dart#L305

The main thing that changed is our latest release is the use of Flutter 1.17.1 instead of Flutter 1.12.13.

For iOS we only see reports on iOS 10. For Android we see them in all versions, although the rate is lower on Android 10. I have not been able to reproduce the issue myself.

Any idea what could be causing this?

tecbot commented 4 years ago

The same issue occurred in our app after upgrading, but only once at the moment for a Samsung Galaxy A5 with Android 6.0.1

ouxiaoyong commented 4 years ago

The same issue occurred in our app

dccruzt commented 3 years ago

Hi folks! I'm facing the same problem :( Do you have some updates for this issue? Which version of flare are you using?