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

Exception: RangeError (byteOffset): Invalid value: Not in range 0..257, inclusive: 259 #140

Open
TomassMaximum opened this issue Aug 28, 2019 · 4 comments
Assignees

Comments

@TomassMaximum
Copy link

Our designer created an animation using flare, and exported as a flr file in binary mode. When I add it to our project, it throws this exception, and animation is not working.
Another simpler animation which I created worked just fine. This one is more complicated.
Flare version: 1.5.7
Flutter version: beta 1.8.3

[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: Exception: RangeError (byteOffset): Invalid value: Not in range 0..257, inclusive: 259 #0 _ByteDataView.getUint16 (dart:typed_data-patch/typed_data_patch.dart:4334:7) #1 BinaryReader.readUint16 (package:flare_dart/binary_reader.dart:56:22) #2 BinaryReader.readId (package:flare_dart/binary_reader.dart:159:12) #3 ComponentAnimation.read (package:flare_dart/animation/actor_animation.dart:227:49) #4 ActorAnimation.read (package:flare_dart/animation/actor_animation.dart:409:30) #5 ActorArtboard.readAnimationsBlock (package:flare_dart/actor_artboard.dart:588:30) #6 ActorArtboard.read (package:flare_dart/actor_artboard.dart:328:11) #7 Actor.readArtboardsBlock (package:flare_dart/actor.dart:165:22) #8 Actor.load (package:flare_dart/actor.dart:137:11) <asynchronous suspension> #9 FlutterActor.loadFromByteData (package:flare_flutter/flare.dart:673:17) <asynchronous suspension> #10 _IsolateConfiguration.apply (package:flutter/src/foundation/_isolates_io.dart:77:16) #11 _spawn.<anonymous closure> (package:flutter/src/foundation/_isolates_io.dart:84:45) <asynchronous suspension> #12 Timeline.timeSync (dart:developer/timeline.dart:161:22) #13 _spawn (package:flutter/src/foundation/_isolates_io.dart:82:18) <asynchronous suspension> #14 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:308:17) #15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

@TomassMaximum
Copy link
Author

@TomassMaximum
Copy link
Author

Just tried json format file, works good.

@luigi-rosso luigi-rosso self-assigned this Aug 28, 2019
@luigi-rosso
Copy link
Contributor

Thanks for sharing the project, that was really helpful for tracking down the problem. It's related to the exporter writing bad data. We have a fix on the way, I'll post here when it is live. You'll need to re-export your file from Flare.

@luigi-rosso
Copy link
Contributor

The fix is live now, you should be able to re-export the binary file and see it work!

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