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

3D game crashes on Android with Adreno chipset (Godot 3.0) #14771

Closed
Alexia-AT-Digitecnology opened this issue Dec 17, 2017 · 14 comments
Closed

Comments

@Alexia-AT-Digitecnology

3D Game crashes on android when is opened.

There is an attachment of an example game: kinematic_character.zip

Tested on a Xiaomi Redmi 3s Pro with an Adreno 505 chipset.

This is the adb log:

2-17 11:55:49.135 13775 13794 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x48 in tid 13794 (GLThread 166)
12-17 11:55:49.179  1784  1784 D StatusBar.NetworkController: onSignalStrengthsChanged received on slotId :0signalStrength=SignalStrength: 13 0 -120 -160 -120 -1 -1 99 2147483647 2147483647 2147483647 2147483647 2147483647 gsm|lte level=5 cdmdlevel=0 evdolevel=0
12-17 11:55:49.188   640   640 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-17 11:55:49.188   640   640 F DEBUG   : Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
12-17 11:55:49.188   640   640 F DEBUG   : Revision: '0'
12-17 11:55:49.188   640   640 F DEBUG   : ABI: 'arm'
12-17 11:55:49.188   640   640 F DEBUG   : pid: 13775, tid: 13794, name: GLThread 166  >>> org.godotengine.kinematiccharacter3d <<<
12-17 11:55:49.189   640   640 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x48
12-17 11:55:49.229   640   640 F DEBUG   :     r0 00000000  r1 00003a00  r2 80000000  r3 00000002
12-17 11:55:49.230   640   640 F DEBUG   :     r4 00000010  r5 efebf228  r6 00000000  r7 00000001
12-17 11:55:49.230   640   640 F DEBUG   :     r8 00000001  r9 abb25328  sl 00000000  fp 00000040
12-17 11:55:49.230   640   640 F DEBUG   :     ip abad92b0  sp efebf220  lr 00000003  pc e9ac1554  cpsr 80070030
12-17 11:55:49.276   640   640 F DEBUG   : 
12-17 11:55:49.276   640   640 F DEBUG   : backtrace:
12-17 11:55:49.277   640   640 F DEBUG   :     #00 pc 00150554  /system/vendor/lib/egl/libESXGLESv2_adreno.so (_ZN9EsxGfxMem15UpdateTimestampEPK10EsxContext13EsxAccessTypeP20EsxBucketIdReference+307)
12-17 11:55:49.277   640   640 F DEBUG   :     #01 pc 00140ab7  /system/vendor/lib/egl/libESXGLESv2_adreno.so (_ZN9EsxCmdMgr16GfxMemReferencedEP9EsxGfxMem13EsxAccessType+22)
12-17 11:55:49.277   640   640 F DEBUG   :     #02 pc 001c30ab  /system/vendor/lib/egl/libESXGLESv2_adreno.so (_ZNK10A5xProgram25GenerateShaderCBSlotStateEP10A5xContext13EsxCmdBufType23EsxCompiledHwShaderTypejP20A5xShaderCBSlotState+778)
12-17 11:55:49.277   640   640 F DEBUG   :     #03 pc 001c156f  /system/vendor/lib/egl/libESXGLESv2_adreno.so (_ZN11A5xPipeline13WriteUboStateEP10A5xContext13EsxCmdBufType23EsxCompiledHwShaderTypejP14A5xStateBuffer+110)
12-17 11:55:49.277   640   640 F DEBUG   :     #04 pc 001cff3d  /system/vendor/lib/egl/libESXGLESv2_adreno.so (_ZN10A5xContext29WriteConstantBufferStateGroupE13EsxCmdBufTypej+28)
12-17 11:55:49.277   640   640 F DEBUG   :     #05 pc 001dfb25  /system/vendor/lib/egl/libESXGLESv2_adreno.so (_ZN10A5xContext13ValidateStateEPK17EsxDrawDescriptor+1636)
12-17 11:55:49.277   640   640 F DEBUG   :     #06 pc 001e0065  /system/vendor/lib/egl/libESXGLESv2_adreno.so (_ZN10A5xContext18HwValidateGfxStateEPK17EsxDrawDescriptor+4)
12-17 11:55:49.277   640   640 F DEBUG   :     #07 pc 000cd10d  /system/vendor/lib/egl/libESXGLESv2_adreno.so (_ZN10EsxContext16ValidateGfxStateEPK17EsxDrawDescriptor+556)
12-17 11:55:49.278   640   640 F DEBUG   :     #08 pc 000c2153  /system/vendor/lib/egl/libESXGLESv2_adreno.so (_ZN10EsxContext21DrawElementsInstancedE11EsxPrimTypej10EsxPixTypePKvji+338)
12-17 11:55:49.278   640   640 F DEBUG   :     #09 pc 000b3005  /system/vendor/lib/egl/libESXGLESv2_adreno.so (_ZN10EsxContext23GlDrawElementsInstancedEjijPKvi+68)
12-17 11:55:49.278   640   640 F DEBUG   :     #10 pc 000a5b49  /system/vendor/lib/egl/libESXGLESv2_adreno.so (glDrawElementsInstanced+40)
12-17 11:55:49.278   640   640 F DEBUG   :     #11 pc 0063a5c8  /data/app/org.godotengine.kinematiccharacter3d-1/lib/arm/libgodot_android.so (_ZN20RasterizerSceneGLES316_render_geometryEPNS_10RenderList7ElementE+872)
12-17 11:55:49.278   640   640 F DEBUG   :     #12 pc 00636a84  /data/app/org.godotengine.kinematiccharacter3d-1/lib/arm/libgodot_android.so (_ZN20RasterizerSceneGLES312_render_listEPPNS_10RenderList7ElementEiRK9TransformRK12CameraMatrixjbbbbb+10816)
12-17 11:55:49.278   640   640 F DEBUG   :     #13 pc 0064ece0  /data/app/org.godotengine.kinematiccharacter3d-1/lib/arm/libgodot_android.so (_ZN20RasterizerSceneGLES312render_sceneERK9TransformRK12CameraMatrixbPPN15RasterizerScene12InstanceBaseEiP3RIDiSB_iSA_SA_SA_SA_i+5384)
12-17 11:55:49.278   640   640 F DEBUG   :     #14 pc 013bdd54  /data/app/org.godotengine.kinematiccharacter3d-1/lib/arm/libgodot_android.so (_ZN17VisualServerScene13_render_sceneE9TransformRK12CameraMatrixb3RIDjS4_S4_S4_i+4668)
12-17 11:55:49.278   640   640 F DEBUG   :     #15 pc 013bcaa0  /data/app/org.godotengine.kinematiccharacter3d-1/lib/arm/libgodot_android.so (_ZN17VisualServerScene13render_cameraE3RIDS0_7Vector2S0_+568)
12-17 11:55:49.278   640   640 F DEBUG   :     #16 pc 0133692c  /data/app/org.godotengine.kinematiccharacter3d-1/lib/arm/libgodot_android.so (_ZN20VisualServerViewport14_draw_viewportEPNS_8ViewportEN13ARVRInterface4EyesE+604)
12-17 11:55:49.278   640   640 F DEBUG   :     #17 pc 01337c24  /data/app/org.godotengine.kinematiccharacter3d-1/lib/arm/libgodot_android.so (_ZN20VisualServerViewport14draw_viewportsEv+1100)
12-17 11:55:49.278   640   640 F DEBUG   :     #18 pc 013303a8  /data/app/org.godotengine.kinematiccharacter3d-1/lib/arm/libgodot_android.so (_ZN18VisualServerRaster4drawEb+96)
12-17 11:55:49.278   640   640 F DEBUG   :     #19 pc 000c4628  /data/app/org.godotengine.kinematiccharacter3d-1/lib/arm/libgodot_android.so (_ZN4Main9iterationEv+1128)
12-17 11:55:49.278   640   640 F DEBUG   :     #20 pc 00096dd4  /data/app/org.godotengine.kinematiccharacter3d-1/lib/arm/libgodot_android.so (Java_org_godotengine_godot_GodotLib_step+212)
12-17 11:55:49.278   640   640 F DEBUG   :     #21 pc 00344265  /data/app/org.godotengine.kinematiccharacter3d-1/oat/arm/base.odex (offset 0x221000) (void org.godotengine.godot.GodotLib.step()+72)
12-17 11:55:49.278   640   640 F DEBUG   :     #22 pc 00347bd9  /data/app/org.godotengine.kinematiccharacter3d-1/oat/arm/base.odex (offset 0x221000) (void org.godotengine.godot.GodotView$Renderer.onDrawFrame(javax.microedition.khronos.opengles.GL10)+84)
12-17 11:55:49.279   640   640 F DEBUG   :     #23 pc 74275d65  /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x24a0000)
@reduz
Copy link
Member

reduz commented Dec 17, 2017 via email

@reduz
Copy link
Member

reduz commented Dec 17, 2017 via email

@Alexia-AT-Digitecnology
Copy link
Author

@reduz, I'm using the project of Kinematic Character 3d of Godot Demo Projects (https://github.com/godotengine/godot-demo-projects). Do you suggest to use another new project?

@reduz
Copy link
Member

reduz commented Dec 17, 2017

No, that probably needs to be tested eventually. Should not crash, but GLES3 implementations so far are not very good which is why a GLES2 backend is returning in 3.1

@Alexia-AT-Digitecnology
Copy link
Author

Made a basic project (no sky, etc) and it crashes again: AdrenoTestProject.zip

@Alexia-AT-Digitecnology
Copy link
Author

Alexia-AT-Digitecnology commented Dec 17, 2017

I have a friend with GPU Mali-T720MP2 chipset thats gets the same crash.

@Alexia-AT-Digitecnology
Copy link
Author

Confirmed, I gave the AdrenoTestProject to my friend with Mali chipset and it works fine. No crashes.

@Alexia-AT-Digitecnology
Copy link
Author

Worked the Kinematic Character 3D demo on my friends cellphone (Samsung Galaxy J7), it's an Adreno issue.

@akien-mga akien-mga changed the title 3D game crashes con Android (Godot 3.0) 3D game crashes on Android with Adreno chipset (Godot 3.0) Dec 17, 2017
@Alexia-AT-Digitecnology
Copy link
Author

@endragor, can you help me to debug android application? I will give you the log info if I know how to debug.

@Alexia-AT-Digitecnology
Copy link
Author

I'm with the debugger now. It crashes on the glDrawElements function, in RasterizerSceneGLES3::_render_geometry function. I think there is an invalid pointer or adreno driver has another method to draw primitives...

screenshot_20171219_162554

@Alexia-AT-Digitecnology
Copy link
Author

@akien-mga, @reduz. Can you guide me how to look some data you need for finding the bug?

@Alexia-AT-Digitecnology
Copy link
Author

According to glDrawElements(), the final argument must be the data, and this function is using 0 (pointer NULL). index_array_len is greater than 0.

glDrawElements description: https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glDrawElements.xml

s->index_array_len = 57624

Function used in Godot 3 engine:
glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->array_len >= (1 << 16)) ? GL_UNSIGNED_INT : GL_UNSIGNED_SHORT, 0);

@Alexia-AT-Digitecnology
Copy link
Author

Sorry, I was reading from a invalid documentation. This is the valid documentation: https://www.khronos.org/registry/OpenGL-Refpages/es3.1/html/glDrawElements.xhtml

You are selecting 0 offset to read.

@akien-mga
Copy link
Member

Closing as duplicate of #12816 (basically Adreno 3xx being terrible).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants