Closed leoxupku closed 2 years ago
2.i can not reproduce this error. this is three_dart example project?
it is too nice of you to answer my problem. I have fixed List runtimeType bug by myself. but I still meet another problem. I upload my project in github. the address is below: https://github.com/leoxupku/try_on_cloth
at the leftside is the wrong result from the release app, just white screen. at the rightside is the right result from the debug app, just show a rotated cylinder in the background.
link miss
maybe you can try three_dart example project
I try the three_dart project. it works perfectly which means this issue should be closed. the problem must came from some wrong setting or wrong using. I will check it by myself and sync result here. when I build the example project in three_dart, there are two problems I want to share with you. one is the "override dependencies" in pubsepc.yaml shouldn't be uploaded to the remote repository. It all depends on your local working directory. the other is I get trapped into the compiling error caused by "FlutterGlPlugin(width.toInt(), height.toInt())". this function needs two args, but provide with none. this compiling problems may caused by dart version/ flutter version. I think it may be just a warning at your environment.
I checked the example project in flutter_gl, it do reproduce the bug. release apk show nothing but debug apk work properly. I think it may causing by some project wrong settings. can you reproduce the bug in the example project in your flutter_gl repo? @wasabia
@leoxupku flutter_gl example work for me on release mode maybe you need check android studio error log when run release mode
I think I found the solution. release app can't display normally because it start too quickly. so MediaQuery.of(context).size
return a wrong value (0, 0). I think you may change the display window size to a fixed size or add a timer to trigger the initialization.
https://github.com/flutter/flutter/issues/25827
both in running the example flutter project in this repo and my own app based on three_dart, release apk can't get proper display. have you ever try build release apk like "flutter build apk --split-per-abi".
Here are the stack infos:
I found the issule, the type is "_GrowableList", not "List". However when I fixed it, it comes up with another problem. I get white screen. Below is the flutter log for flutter_gl.
12-07 03:32:51.896 508 568 I flutter : device pixel ratio is 3.5 12-07 03:32:51.896 508 568 I flutter : width is 411.42857142857144, height is 898.2857142857143 12-07 03:32:52.025 508 568 I flutter : OpenGLContextES 12-07 03:32:52.025 508 568 I flutter : {gl: Instance of 'LibOpenGLES'} 12-07 03:32:52.026 508 568 I flutter : OpenGLES getExtension key: EXT_color_buffer_float _v: Pointer: address=0xb9a5e400
12-07 03:32:52.027 508 568 I flutter : WebGLState..................init...........
12-07 03:32:52.027 508 568 I flutter : WebGLState. getParameter _data: 0
12-07 03:32:52.100 508 568 I flutter : THREE.WebGLProgram: gl.getProgramInfoLog() programLog: null vertexLog: null fragmentLog: null
12-07 03:35:03.371 811 840 I flutter : device pixel ratio is 3.5
12-07 03:35:03.371 811 840 I flutter : width is 411.42857142857144, height is 898.2857142857143
12-07 03:35:03.499 811 840 I flutter : OpenGLContextES
12-07 03:35:03.499 811 840 I flutter : {gl: Instance of 'LibOpenGLES'}
12-07 03:35:03.499 811 840 I flutter : OpenGLES getExtension key: EXT_color_buffer_float _v: Pointer: address=0xb9fa3800
12-07 03:35:03.501 811 840 I flutter : WebGLState..................init...........
12-07 03:35:03.501 811 840 I flutter : WebGLState. getParameter _data: 0
12-07 03:35:03.558 811 840 I flutter : THREE.WebGLProgram: gl.getProgramInfoLog() programLog: null vertexLog: null fragmentLog: null
12-07 03:37:08.844 1035 1131 I flutter : device pixel ratio is 3.5
12-07 03:37:08.844 1035 1131 I flutter : width is 411.42857142857144, height is 898.2857142857143
12-07 03:37:08.972 1035 1131 I flutter : OpenGLContextES
12-07 03:37:08.972 1035 1131 I flutter : {gl: Instance of 'LibOpenGLES'}
12-07 03:37:08.973 1035 1131 I flutter : OpenGLES getExtension key: EXT_color_buffer_float _v: Pointer: address=0xba0ce800
12-07 03:37:08.974 1035 1131 I flutter : WebGLState..................init...........
12-07 03:37:08.974 1035 1131 I flutter : WebGLState. getParameter _data: 0
12-07 03:37:09.033 1035 1131 I flutter : THREE.WebGLProgram: gl.getProgramInfoLog() programLog: null vertexLog: null fragmentLog: null
it seems the initialization of gles meet some problems and retry for many times.