ashqal / MD360Player4Android

It is a lite library to render 360 degree panorama video for Android. VR Player.
Apache License 2.0
1.08k stars 357 forks source link

调用mdVRLibrary.switchProjectionMode()多次切换模式会出现崩溃问题 #262

Open James-master opened 2 years ago

James-master commented 2 years ago

调用mdVRLibrary.switchProjectionMode()切换如下两种模式相互多次后程序直接崩溃,代码如下: if(isVRMode){ mdVRLibrary.switchProjectionMode(getContext(), MDVRLibrary.PROJECTION_MODE_SPHERE); }else{ mdVRLibrary.switchProjectionMode(getContext(), MDVRLibrary.PROJECTION_MODE_PLANE_FIT); }

ashqal commented 2 years ago

有崩溃堆栈吗?麻烦贴一下崩溃堆栈

James-master commented 1 year ago

00 pc 0000e560 /apex/com.android.runtime/lib/bionic/libc.so [armeabi-v8::97a54a25b279e50c0c8197f4d5295516]

01 pc 0008fa4b /vendor/lib/egl/libGLES_mali.so [armeabi-v8::382704391211e5e2529010991079b1a8]

02 pc 000a4b4d /vendor/lib/egl/libGLES_mali.so [armeabi-v8::382704391211e5e2529010991079b1a8]

03 pc 00090b9f /vendor/lib/egl/libGLES_mali.so [armeabi-v8::382704391211e5e2529010991079b1a8]

04 pc 0009985d /vendor/lib/egl/libGLES_mali.so [armeabi-v8::382704391211e5e2529010991079b1a8]

05 pc 0004815b /vendor/lib/egl/libGLES_mali.so [armeabi-v8::382704391211e5e2529010991079b1a8]

06 pc 00045735 /vendor/lib/egl/libGLES_mali.so (glDrawElements+52) [armeabi-v8::382704391211e5e2529010991079b1a8]

07 pc 0000a547 /vendor/lib/egl/libGLES_meow.so [armeabi-v8::db6b07240ad5a4eab39c51deca3fe9e3]

08 pc 0001f935 /system/lib/libandroid_runtime.so [armeabi-v8::b5d13f4b2a6f625de87a275e259742d2]

09 pc 000064c5 /system/framework/arm/boot-framework.oat (oatdata+21701) [armeabi::d001c573df5934942664d73977cd49f2]

java: com.asha.vrlib.objects.MDAbsObject3D.draw(MDAbsObject3D.java:97) com.asha.vrlib.plugins.MDPanoramaPlugin.renderer(MDPanoramaPlugin.java:91) com.asha.vrlib.MD360Renderer.onDrawFrame(MD360Renderer.java:182) android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1581) android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1280)

以上是崩溃的堆栈,具体报错地方是MDAbsObject3D里的这句 GLES20.glDrawElements(GLES20.GL_TRIANGLES, getNumIndices(), GLES20.GL_UNSIGNED_SHORT, getIndicesBuffer());

muneebcode commented 2 months ago

@James-master Have you resolved this crash?