Crash (native)

Started by AeroShark333, July 10, 2017, 07:29:06 PM

Previous topic - Next topic

EgonOlsen

I'll go through my more obscure test devices this weekend and try to reproduce it.

EgonOlsen

Nope, I'm not able to reproduce it. It runs just fine on everything that I've tried it on...

AeroShark333

#62
Hmmm, this is the AVD emulator I use to reproduce the error (I think I also had a Genymotion emulator that'd crash if you want that one...):
https://drive.google.com/open?id=1-iNRd9xdTU7j-WCzYIWcOqfgIxt4eRe6
Unzip these files to C:\Users\<your_username>\.android\avd
(Also edit the .ini file to make it match your path (probably only change the username twice)
And it should pop up now when you try to run the application from Android Studio I believe

EgonOlsen

Is that one different from the one included in the SDK?

AeroShark333

Hmmm, it's a Nexus 5X with API-28 (x86)
(I think I installed it from the SDK but yeah)
I've had this one for a while now so probably a newer one might be a bit different

EgonOlsen

I can't really use the emulator, because for me, it crashes like mad anyway no matter what I'm trying to do with it. That's not the app inside of the emulator, but the whole emulator instance.

AeroShark333

When you change Config.useVBO = true to false in the testcase's code
Would that help to reproduce the error on a physical device perhaps?

AeroShark333

#67
  at com.threed.jpct.Logger.log (Logger.java:206)
  at com.threed.jpct.GL20.checkError (GL20.java:163)
  at com.threed.jpct.GL20.glGenBuffers (GL20.java:1385)
  at com.threed.jpct.CompiledInstance.compileToVBO (CompiledInstance.java:1478)
  at com.threed.jpct.CompiledInstance.render (CompiledInstance.java:606)
  at com.threed.jpct.GLRenderer.drawWireframe (GLRenderer.java:2548)
  at com.threed.jpct.World.draw (World.java:1424)
  at com.threed.jpct.World.drawWireframe (World.java:1132)

Any idea what'd cause this error?

EDIT:
Also... I found this: https://stackoverflow.com/questions/47754714/load-huge-texture-in-parts-in-opengl-es-2-0
Maybe it would be a cool feature for jPCT

EgonOlsen

Is that the complete stack trace? I'm somehow missing the top part...

AeroShark333

No, this is the complete stacktrace

EgonOlsen

Strange. Actually, there has to be some output what the actual GL error is. It might not be part of the actual exception though. If it helps to know this, is another question...

AeroShark333

This looks like a similar stacktrace from another user:

java.lang.RuntimeException:
  at com.threed.jpct.Logger.log (Logger.java:206)
  at com.threed.jpct.GL20.checkError (GL20.java:163)
  at com.threed.jpct.GL20.glGenBuffers (GL20.java:1385)
  at com.threed.jpct.CompiledInstance.compileToVBO (CompiledInstance.java:1478)
  at com.threed.jpct.CompiledInstance.render (CompiledInstance.java:606)
  at com.threed.jpct.GLRenderer.drawWireframe (GLRenderer.java:2548)
  at com.threed.jpct.World.draw (World.java:1424)
  at com.threed.jpct.World.drawWireframe (World.java:1132)
  at com.aeroshark333.artofearthify.lw.ArtOfEarthify$1.run (ArtOfEarthify.java:732)
  at com.aeroshark333.artofearthify.utils.WorkerThread$2.run (WorkerThread.java:46)
  at com.aeroshark333.artofearthify.lw.ArtOfEarthify.onDrawFrame (ArtOfEarthify.java:1402)
  at com.aeroshark333.artofearthify.lw.LiveWallpaperRenderer.onDrawFrame (LiveWallpaperRenderer.java:45)
  at android.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1531)
  at android.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1248)

EgonOlsen

I guess you don't have access to the log messages that are printed before this exception?


AeroShark333

#74
I now have this stacktrace, maybe it's possible to find something interesting

backtrace:
  #00  pc 00000000000150a0  /vendor/lib64/libsrv_um.so
  #01  pc 0000000000027190  /vendor/lib64/egl/libGLESv2_mtk.so
  #02  pc 000000000002ac68  /vendor/lib64/egl/libGLESv2_mtk.so
  #03  pc 0000000000025dbc  /vendor/lib64/egl/libGLESv2_mtk.so
  #04  pc 0000000000025878  /vendor/lib64/egl/libGLESv2_mtk.so (glDrawElements+140)
  #05  pc 00000000000da720  /system/lib64/libandroid_runtime.so (android_glDrawElements__IIILjava_nio_Buffer_2(_JNIEnv*, _jobject*, int, int, int, _jobject*)+304)
  #06  pc 00000000003bc8e4  /system/framework/arm64/boot-framework.oat (offset 0x3b3000) (android.graphics.Color.nativeRGBToHSV [DEDUPED]+196)
  #07  pc 0000000000562a4c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
  #08  pc 00000000000d0360  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
  #09  pc 0000000000284b38  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
  #10  pc 000000000027eaf4  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
  #11  pc 0000000000533624  /system/lib64/libart.so (MterpInvokeStatic+204)
  #12  pc 0000000000554f94  /system/lib64/libart.so (ExecuteMterpImpl+14612)
  #13  pc 00000000001fa708  /data/app/com.aeroshark333.artofearthify-y8JycfhWqFOb07jVYzYokA==/oat/arm64/base.vdex (com.threed.jpct.GL20.glDrawElements)
  #14  pc 00000000002585f0  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.1077557954)+496)
  #15  pc 000000000025e170  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
  #16  pc 000000000027ead8  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
  #17  pc 0000000000533098  /system/lib64/libart.so (MterpInvokeInterface+1392)
  #18  pc 0000000000555014  /system/lib64/libart.so (ExecuteMterpImpl+14740)
  #19  pc 00000000001f6c92  /data/app/com.aeroshark333.artofearthify-y8JycfhWqFOb07jVYzYokA==/oat/arm64/base.vdex (com.threed.jpct.CompiledInstance.render+4206)
  #20  pc 00000000002585f0  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.1077557954)+496)
  #21  pc 000000000025e170  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
  #22  pc 000000000027fbe4  /system/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+724)
  #23  pc 000000000053548c  /system/lib64/libart.so (MterpInvokeVirtualQuickRange+420)
  #24  pc 0000000000558c14  /system/lib64/libart.so (ExecuteMterpImpl+30100)
  #25  pc 00000000001fef10  /data/app/com.aeroshark333.artofearthify-y8JycfhWqFOb07jVYzYokA==/oat/arm64/base.vdex (com.threed.jpct.GLRenderer.drawVertexArray+492)
  #26  pc 00000000002585f0  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.1077557954)+496)
  #27  pc 000000000025e170  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
  #28  pc 000000000027fbe4  /system/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+724)
  #29  pc 000000000053548c  /system/lib64/libart.so (MterpInvokeVirtualQuickRange+420)
  #30  pc 0000000000558c14  /system/lib64/libart.so (ExecuteMterpImpl+30100)
  #31  pc 0000000000221be6  /data/app/com.aeroshark333.artofearthify-y8JycfhWqFOb07jVYzYokA==/oat/arm64/base.vdex (com.threed.jpct.World.draw+234)
  #32  pc 00000000002585f0  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.1077557954)+496)
  #33  pc 000000000025e170  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
  #34  pc 000000000027fbe4  /system/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+724)
  #35  pc 0000000000534c94  /system/lib64/libart.so (MterpInvokeDirectRange+244)
  #36  pc 0000000000555214  /system/lib64/libart.so (ExecuteMterpImpl+15252)
  #37  pc 0000000000221ae4  /data/app/com.aeroshark333.artofearthify-y8JycfhWqFOb07jVYzYokA==/oat/arm64/base.vdex (com.threed.jpct.World.draw+12)
  #38  pc 00000000002585f0  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.1077557954)+496)
  #39  pc 000000000025e170  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
  #40  pc 000000000027ead8  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
  #41  pc 0000000000535170  /system/lib64/libart.so (MterpInvokeVirtualQuick+584)
  #42  pc 0000000000558b94  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #43  pc 0000000000195c2e  /data/app/com.aeroshark333.artofearthify-y8JycfhWqFOb07jVYzYokA==/oat/arm64/base.vdex (com.aeroshark333.artofearthify.lw.ArtOfEarthify.onDrawFrame+1902)
  #44  pc 00000000002585f0  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.1077557954)+496)
  #45  pc 000000000025e170  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
  #46  pc 000000000027ead8  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
  #47  pc 0000000000535170  /system/lib64/libart.so (MterpInvokeVirtualQuick+584)
  #48  pc 0000000000558b94  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #49  pc 0000000000197ad4  /data/app/com.aeroshark333.artofearthify-y8JycfhWqFOb07jVYzYokA==/oat/arm64/base.vdex (com.aeroshark333.artofearthify.lw.LiveWallpaperRenderer.onDrawFrame+4)
  #50  pc 00000000002585f0  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.1077557954)+496)
  #51  pc 0000000000521b38  /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
  #52  pc 000000000056b8fc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
  #53  pc 0000000000a8ea70  /system/framework/arm64/boot-framework.oat (offset 0x3b3000) (android.opengl.GLSurfaceView$GLThread.guardedRun+4000)
  #54  pc 0000000000a8fb30  /system/framework/arm64/boot-framework.oat (offset 0x3b3000) (android.opengl.GLSurfaceView$GLThread.run+224)
  #55  pc 0000000000562788  /system/lib64/libart.so (art_quick_invoke_stub+584)
  #56  pc 00000000000d0340  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
  #57  pc 0000000000466148  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #58  pc 0000000000467210  /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
  #59  pc 00000000004942a0  /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1120)
  #60  pc 0000000000084bd4  /system/lib64/libc.so (__pthread_start(void*)+36)
  #61  pc 000000000002344c  /system/lib64/libc.so (__start_thread+68)


Lines 13,19,25,31,37,43,49 are most interesting perhaps