zesage / panorama

Panorama - Flutter Widget
Apache License 2.0
114 stars 71 forks source link

error on this plugin #16

Closed maxTeste closed 3 years ago

maxTeste commented 3 years ago

hi just download the project from github and when i try to run it just give me this error: didn't change enything on the code:

The following assertion was thrown during paint(): 'package:flutter/src/rendering/layer.dart': Failed assertion: line 1586 pos 12: 'value!.storage.every((double component) => component.isFinite)': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause. In either case, please report this assertion by filing a bug on GitHub: https://github.com/flutter/flutter/issues/new?template=BUG.md

The relevant error-causing widget was: Panorama file:///home/ruben/Transfer%C3%AAncias/panorama-master/example/lib/main.dart:66:11 When the exception was thrown, this was the stack:

2 TransformLayer.transform= (package:flutter/src/rendering/layer.dart:1586:12)

3 PaintingContext.pushTransform (package:flutter/src/rendering/object.dart:576:13)

4 RenderTransform.paint (package:flutter/src/rendering/proxy_box.dart:2298:25)

5 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2311:7)

6 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:189:13)

... The following RenderObject was being processed when the exception was fired: RenderTransform#65483 ... needs compositing ... parentData: top=NaN; left=NaN; width=90.0; height=75.0; offset=Offset(NaN, NaN) (can use size) ... constraints: BoxConstraints(w=90.0, h=75.0) ... layer: TransformLayer#f9c72 DETACHED ... engine layer: TransformEngineLayer#fa266 ... offset: Offset(0.0, 0.0) ... transform: [0] 0.5,0.0,0.9,532.2 [1] 0.2,1.0,-0.1,-206.9 [2] -0.9,0.3,0.5,686.0 [3] 0.0,0.0,0.0,1.0 ... size: Size(90.0, 75.0) ... transform matrix: [0] NaN,NaN,NaN,NaN [1] NaN,NaN,NaN,NaN [2] NaN,NaN,NaN,NaN [3] NaN,NaN,NaN,NaN ... origin: Offset(45.0, 37.5) ... alignment: null ... textDirection: ltr ... transformHitTests: true RenderObject: RenderTransform#65483 needs compositing parentData: top=NaN; left=NaN; width=90.0; height=75.0; offset=Offset(NaN, NaN) (can use size) constraints: BoxConstraints(w=90.0, h=75.0) layer: TransformLayer#f9c72 DETACHED engine layer: TransformEngineLayer#fa266 offset: Offset(0.0, 0.0) transform: [0] 0.5,0.0,0.9,532.2 [1] 0.2,1.0,-0.1,-206.9 [2] -0.9,0.3,0.5,686.0 [3] 0.0,0.0,0.0,1.0 size: Size(90.0, 75.0) transform matrix: [0] NaN,NaN,NaN,NaN [1] NaN,NaN,NaN,NaN [2] NaN,NaN,NaN,NaN [3] NaN,NaN,NaN,NaN origin: Offset(45.0, 37.5) alignment: null textDirection: ltr transformHitTests: true ... child: RenderOffstage#3bdd5 ... needs compositing ... parentData: (can use size) ... constraints: BoxConstraints(w=90.0, h=75.0) ... size: Size(90.0, 75.0) ... offstage: false ... child: RenderFlex#7cbde ... needs compositing ... parentData: (can use size) ... constraints: BoxConstraints(w=90.0, h=75.0) ... size: Size(90.0, 75.0) ... direction: vertical ... mainAxisAlignment: center ... mainAxisSize: max ... crossAxisAlignment: center ... verticalDirection: down ... child 1: RenderSemanticsAnnotations#ac26a relayoutBoundary=up1 ... needs compositing ... parentData: offset=Offset(1.0, 1.5); flex=null; fit=null (can use size) ... constraints: BoxConstraints(0.0<=w<=90.0, 0.0<=h<=Infinity) ... semantic boundary ... size: Size(88.0, 48.0) ... child: _RenderInputPadding#af226 relayoutBoundary=up2 ... needs compositing ... parentData: (can use size) ... constraints: BoxConstraints(0.0<=w<=90.0, 0.0<=h<=Infinity) ... size: Size(88.0, 48.0) ... child 2: RenderDecoratedBox#8e262 relayoutBoundary=up1 ... parentData: offset=Offset(0.0, 49.5); flex=null; fit=null (can use size) ... constraints: BoxConstraints(0.0<=w<=90.0, 0.0<=h<=Infinity) ... size: Size(90.0, 24.0) ... decoration: BoxDecoration ... color: Color(0x61000000) ... borderRadius: BorderRadius.circular(4.0) ... configuration: ImageConfiguration(bundle: PlatformAssetBundle#9bf52(), devicePixelRatio: 2.8, locale: en_US, textDirection: TextDirection.ltr, platform: android) ... child: RenderPadding#0a2d0 relayoutBoundary=up2 ... parentData: (can use size) ... constraints: BoxConstraints(0.0<=w<=90.0, 0.0<=h<=Infinity) ... size: Size(90.0, 24.0) ... padding: EdgeInsets.all(4.0) ... textDirection: ltr

zesage commented 3 years ago

4e9df517ff91071f7ce02f8c76fd2eb8bdf5251d Fixed "component.isFinite" exception, please download the last update and try again.

maxTeste commented 3 years ago

in the file panorama.dart is normal the android studio give this error? error: The named parameter 'vsync' isn't defined. (undefined_named_parameter at [panorama] lib/panorama.dart:395)

Captura de ecrã de 2021-01-08 09-50-07

maxTeste commented 3 years ago

hey, i was testing the new update, don't have the initial erros, but if I run the app on the emulator android from android sutdio and i start using the virtual sensors the app give this error:

The following assertion was thrown during paint(): 'package:flutter/src/rendering/layer.dart': Failed assertion: line 1586 pos 12: 'value!.storage.every((double component) => component.isFinite)': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause. In either case, please report this assertion by filing a bug on GitHub: https://github.com/flutter/flutter/issues/new?template=BUG.md

The relevant error-causing widget was: Panorama file:///home/ruben/Transfer%C3%AAncias/panorama-master/example/lib/main.dart:72:16 When the exception was thrown, this was the stack:

2 TransformLayer.transform= (package:flutter/src/rendering/layer.dart:1586:12)

3 PaintingContext.pushTransform (package:flutter/src/rendering/object.dart:576:13)

4 RenderTransform.paint (package:flutter/src/rendering/proxy_box.dart:2298:25)

5 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2311:7)

6 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:189:13)

... The following RenderObject was being processed when the exception was fired: RenderTransform#0d43a ... needs compositing ... parentData: top=NaN; left=NaN; width=100.0; height=75.0; offset=Offset(NaN, NaN) (can use size) ... constraints: BoxConstraints(w=100.0, h=75.0) ... layer: TransformLayer#86a44 DETACHED ... engine layer: TransformEngineLayer#85a0c ... offset: Offset(0.0, 0.0) ... transform: [0] 0.0,-0.0,1.0,8732.7 [1] -0.0,1.0,0.0,0.1 [2] -1.0,-0.0,0.0,9153.3 [3] 0.0,0.0,0.0,1.0 ... size: Size(100.0, 75.0) ... transform matrix: [0] NaN,NaN,NaN,NaN [1] NaN,NaN,NaN,NaN [2] NaN,NaN,NaN,NaN [3] NaN,NaN,NaN,NaN ... origin: Offset(50.0, 37.5) ... alignment: null ... textDirection: ltr ... transformHitTests: true RenderObject: RenderTransform#0d43a needs compositing parentData: top=NaN; left=NaN; width=100.0; height=75.0; offset=Offset(NaN, NaN) (can use size) constraints: BoxConstraints(w=100.0, h=75.0) layer: TransformLayer#86a44 DETACHED engine layer: TransformEngineLayer#85a0c offset: Offset(0.0, 0.0) transform: [0] 0.0,-0.0,1.0,8732.7 [1] -0.0,1.0,0.0,0.1 [2] -1.0,-0.0,0.0,9153.3 [3] 0.0,0.0,0.0,1.0 size: Size(100.0, 75.0) transform matrix: [0] NaN,NaN,NaN,NaN [1] NaN,NaN,NaN,NaN [2] NaN,NaN,NaN,NaN [3] NaN,NaN,NaN,NaN origin: Offset(50.0, 37.5) alignment: null textDirection: ltr transformHitTests: true ... child: RenderOffstage#ca07b ... needs compositing ... parentData: (can use size) ... constraints: BoxConstraints(w=100.0, h=75.0) ... size: Size(100.0, 75.0) ... offstage: false ... child: RenderFlex#682ed ... needs compositing ... parentData: (can use size) ... constraints: BoxConstraints(w=100.0, h=75.0) ... size: Size(100.0, 75.0) ... direction: vertical ... mainAxisAlignment: center ... mainAxisSize: max ... crossAxisAlignment: center ... verticalDirection: down ... child 1: RenderSemanticsAnnotations#253df relayoutBoundary=up1 ... needs compositing ... parentData: offset=Offset(6.0, 1.5); flex=null; fit=null (can use size) ... constraints: BoxConstraints(0.0<=w<=100.0, 0.0<=h<=Infinity) ... semantic boundary ... size: Size(88.0, 48.0) ... child: _RenderInputPadding#8209a relayoutBoundary=up2 ... needs compositing ... parentData: (can use size) ... constraints: BoxConstraints(0.0<=w<=100.0, 0.0<=h<=Infinity) ... size: Size(88.0, 48.0) ... child 2: RenderDecoratedBox#a31e6 relayoutBoundary=up1 ... parentData: offset=Offset(0.0, 49.5); flex=null; fit=null (can use size) ... constraints: BoxConstraints(0.0<=w<=100.0, 0.0<=h<=Infinity) ... size: Size(100.0, 24.0) ... decoration: BoxDecoration ... color: Color(0x61000000) ... borderRadius: BorderRadius.circular(4.0) ... configuration: ImageConfiguration(bundle: PlatformAssetBundle#6eefc(), devicePixelRatio: 2.8, locale: en_US, textDirection: TextDirection.ltr, platform: android) ... child: RenderPadding#68a14 relayoutBoundary=up2 ... parentData: (can use size) ... constraints: BoxConstraints(0.0<=w<=100.0, 0.0<=h<=Infinity) ... size: Size(100.0, 24.0) ... padding: EdgeInsets.all(4.0) ... textDirection: ltr

zesage commented 3 years ago

try the last update f9a668755c701ac8f6dd4941055d147dedc33797

maxTeste commented 3 years ago

is working, thank you bro i have one other error. i integrate this code with other code so i have 2 views, one is this one, the main.dart and the other one have one button that uses Navigator.of(context) to go to the main.dart

when i press that button to go to main.dart, only the first time works, after that give me this error :

════════ Exception caught by image resource service ════════════════════════════════════════════════ The following NoSuchMethodError was thrown by a synchronously-called image listener: The getter 'mesh' was called on null. Receiver: null Tried calling: mesh

When the exception was thrown, this was the stack:

0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)

1 _PanoramaState._updateTexture (package:novo/panorama.dart:295:13)

2 ImageStreamCompleter.addListener (package:flutter/src/painting/image_stream.dart:374:25)

3 MultiFrameImageStreamCompleter.addListener (package:flutter/src/painting/image_stream.dart:767:11)

4 ImageStream.addListener (package:flutter/src/painting/image_stream.dart:274:26)

zesage commented 3 years ago

c95857ef72d622a392c06824fc86f125684e3c5c fixed called on null in _updateTexture

rlazom commented 3 years ago

With the c95857e commit the issue "The getter 'mesh' was called on null" is fixed.

maxTeste commented 3 years ago

ty guys