I have two activities (A and B) A is just a listview and in B there is a surfaceview that i use in JNI code opengl-es for drawing, and a thread in java for sound. It works fine the first time , and i can do three or four movements from A to B and them press the back button going back to A. However after three or four of this movements, The activity B crashes and it does not give any error the only output is:
05-30 15:12:12.535: D/libEGL(10296): loaded /system/lib/egl/libGLES_android.so
05-30 15:12:12.558: D/libEGL(10296): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
05-30 15:12:12.687: D/libEGL(10296): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
05-30 15:12:12.695: D/libEGL(10296): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
and try to do the oncreate method in activity A. In the JNI code i clean all the data i remove all the used memory, i stop all the threads.. and i can see that there is no thread or extra memory lying around. However i cannot detect the crash because it does not happen at a specific location its really random and anoying because it does not give any error. in the activity B i remove all the actions related to the surfaceview.
Does this ever happen to someone?