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

LateInitializationError #297

Closed
FredslundMagnus opened this issue Mar 17, 2021 · 8 comments
Closed

LateInitializationError #297

FredslundMagnus opened this issue Mar 17, 2021 · 8 comments

Comments

@FredslundMagnus
Copy link

I got following error using:
flare_flutter: ^3.0.0-nullsafety.0

════════ Exception caught by rendering library ═════════════════════════════════
The following LateError was thrown during paint():
LateInitializationError: Field '_setupAABB@322245341' has not been initialized.

The relevant error-causing widget was
FlareActor
lib\card.dart:126
When the exception was thrown, this was the stack
0 FlareActorRenderObject._setupAABB (package:flare_flutter/flare_actor.dart)
package:flare_flutter/flare_actor.dart:1
1 FlareActorRenderObject.aabb
package:flare_flutter/flare_actor.dart:221
2 FlareRenderBox.paint
package:flare_flutter/flare_render_box.dart:175
3 RenderObject._paintWithContext
package:flutter/…/rendering/object.dart:2322
4 PaintingContext.paintChild
package:flutter/…/rendering/object.dart:189
...
The following RenderObject was being processed when the exception was fired: FlareActorRenderObject#eb411
RenderObject: FlareActorRenderObject#eb411
parentData: (can use size)
constraints: BoxConstraints(0.0<=w<=179.7, h=136.7)
size: Size(179.7, 136.7)
════════════════════════════════════════════════════════════════════════════════

It only happened for one of my .flr files, however, on previous versions of flare_flutter there was no error. I can probably fix this by redrawing that .flr file, however, this problem might stil be worth fixing.

@luigi-rosso
Copy link
Contributor

Hey @FredslundMagnus thanks for reporing this. Could you post the file here or send it to [email protected] if it's a private file?

@FredslundMagnus
Copy link
Author

Hey @luigi-rosso I have sent the file to your mail, if a link is good enough then:
https://flare.rive.app/a/MagnusF/files/flare/timecol

@uttufy
Copy link

uttufy commented Mar 17, 2021

I am having the same issue

luigi-rosso added a commit that referenced this issue Mar 17, 2021
luigi-rosso added a commit that referenced this issue Mar 17, 2021
@luigi-rosso
Copy link
Contributor

Please give flare_flutter: 3.0.0-nullsafety.1 a shot, the issue should be resolved!

@uttufy
Copy link

uttufy commented Mar 18, 2021

Please give flare_flutter: 3.0.0-nullsafety.1 a shot, the issue should be resolved!

This resolved my issue. Thank you 👍

@luigi-rosso
Copy link
Contributor

Glad to hear it! Thanks for reporting.

@azhansy
Copy link

azhansy commented Jul 14, 2021

version:3.0.0-nullsafety.1、3.0.1,there is this problem:

[ERROR:flutter/shell/common/shell.cc(93)] Dart Unhandled Exception: Exception: LateInitializationError: Field '_paint@2346459774' has not been initialized., stack trace: #0 FlutterActorImage._paint (package:flare_flutter/flare.dart)
E/flutter (27275): #1 FlutterActorImage.onBlendModeChanged (package:flare_flutter/flare.dart:503:5)
E/flutter (27275): #2 FlutterActorDrawable.blendMode= (package:flare_flutter/flare.dart:226:5)
E/flutter (27275): #3 FlutterActorDrawable.blendModeId= (package:flare_flutter/flare.dart:233:5)
E/flutter (27275): #4 ActorDrawable.read (package:flare_flutter/base/actor_drawable.dart:77:17)
E/flutter (27275): #5 ActorImage.read (package:flare_flutter/base/actor_image.dart:305:19)
E/flutter (27275): #6 ActorArtboard.readComponentsBlock (package:flare_flutter/base/actor_artboard.dart:387:34)
E/flutter (27275): #7 ActorArtboard.read (package:flare_flutter/base/actor_artboard.dart:349:11)
E/flutter (27275): #8 Actor.readArtboardsBlock (package:flare_flutter/base/actor.dart:180:22)
E/flutter (27275): #9 Actor.load (package:flare_flutter/base/actor.dart:85:11)
E/flutter (27275): #10 FlutterActor.loadFromByteData (package:flare_flutter/flare.dart:165:17)
E/flutter (27275): #11 _IsolateConfiguration.apply (package:flutter/src/foundation/_isolates_io.dart:83:34)
E/flutter (27275): #12 _spawn. (package:flutter/src/foundation/_isolates_io.dart:90:65)
E/flutter (27275): #13 _spawn. (package:flutter/src/foundation/_isolates_io.dart:89:5)
E/flutter (27275): #14 Timeline.timeSync (dart:developer/timeline.dart:163:22)
E/flutter (27275): #15 _spawn (package:flutter/src/foundation/_isolates_io.dart:87:35)
E/flutter (27275): #16 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:286:17)
E/flutter (27275): #17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
E/flutter (27275):
E/flutter (27275): [ERROR:flutter/shell/common/shell.cc(93)] Dart Unhandled Exception: Exception: LateInitializationError: Field '_paint@2346459774' has not been initialized., stack trace: #0 FlutterActorImage._paint (package:flare_flutter/flare.dart)
E/flutter (27275): #1 FlutterActorImage.onBlendModeChanged (package:flare_flutter/flare.dart:503:5)
E/flutter (27275): #2 FlutterActorDrawable.blendMode= (package:flare_flutter/flare.dart:226:5)
E/flutter (27275): #3 FlutterActorDrawable.blendModeId= (package:flare_flutter/flare.dart:233:5)
E/flutter (27275): #4 ActorDrawable.read (package:flare_flutter/base/actor_drawable.dart:77:17)
E/flutter (27275): #5 ActorImage.read (package:flare_flutter/base/actor_image.dart:305:19)
E/flutter (27275): #6 ActorArtboard.readComponentsBlock (package:flare_flutter/base/actor_artboard.dart:387:34)
E/flutter (27275): #7 ActorArtboard.read (package:flare_flutter/base/actor_artboard.dart:349:11)
E/flutter (27275): #8 Actor.readArtboardsBlock (package:flare_flutter/base/actor.dart:180:22)
E/flutter (27275): #9 Actor.load (package:flare_flutter/base/actor.dart:85:11)
E/flutter (27275): #10 FlutterActor.loadFromByteData (package:flare_flutter/flare.dart:165:17)
E/flutter (27275): #11 _IsolateConfiguration.apply (package:flutter/src/foundation/_isolates_io.dart:83:34)
E/flutter (27275): #12 _spawn. (package:flutter/src/foundation/_isolates_io.dart:90:65)
E/flutter (27275): #13 _spawn. (package:flutter/src/foundation/_isolates_io.dart:89:5)
E/flutter (27275): #14 Timeline.timeSync (dart:developer/timeline.dart:163:22)
E/flutter (27275): #15 _spawn (package:flutter/src/foundation/_isolates_io.dart:87:35)
E/flutter (27275): #16 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:286:17)
E/flutter (27275): #17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
E/flutter (27275):

@azhansy
Copy link

azhansy commented Jul 14, 2021

My flare file size more than 10MB,maybe this is the cause of the problem?

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

4 participants