HistoryOfEverything icon indicating copy to clipboard operation
HistoryOfEverything copied to clipboard

Crash on some article

Open dbof10 opened this issue 5 years ago • 1 comments

On some article, it crashes I'm using environment below

flare_flutter: ^2.0.4 nima: ^1.0.5

The getter 'dirtMask' was called on null.
I/flutter ( 3789): Receiver: null
I/flutter ( 3789): Tried calling: dirtMask


The relevant error-causing widget was:
I/flutter ( 3789):   Container file://**/lib/article/article_widget.dart:165:40
I/flutter ( 3789): 
I/flutter ( 3789): When the exception was thrown, this was the stack:
I/flutter ( 3789): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
I/flutter ( 3789): #1      ActorArtboard.advance (package:flare_dart/actor_artboard.dart:322:29)
I/flutter ( 3789): #2      VignetteRenderObject.updateActor (package:timeline/article/timeline_entry_widget.dart:111:21)
I/flutter ( 3789): #3      VignetteRenderObject.timelineEntry= (package:timeline/article/timeline_entry_widget.dart:140:5)
I/flutter ( 3789): #4      TimelineEntryWidget.createRenderObject (package:timeline/article/timeline_entry_widget.dart:40:9)
I/flutter ( 3789): #5      RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5366:28)

ActorArtboard

 ActorComponent component = _dependencyOrder[i];
          _dirtDepth = i;
          int d = component.dirtMask;

dbof10 avatar Jul 04 '20 14:07 dbof10

It may help.

The error says you're trying to use something called "dirtMask," but it's empty (null). To fix it:

  1. Check the code where you use "dirtMask" (in "article_widget.dart").
  2. Make sure it's created correctly and handle null safely (use ?.).
  3. Follow how data flows in your app to find where it becomes null.
  4. Use debugging tools to track the issue down.

Ajayvirmoti avatar Sep 09 '23 18:09 Ajayvirmoti