This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

There is a crash when doing glclearColor on the arm Mali-G71, Mali-G72

Hello, I'm a developer in fiends of graphic.

I found the bugs my application regarding mali.so. So, I want to get some advices.

My app accor an abnormal termination when doing glClearColor().

It happens not always, but quite often.

There is the callstacks. (refer to below)

[ARM Mali-G71 MP20 546 MHz GPU]
backtrace:
1.   #00  pc 000000000054426c  /system/vendor/lib/egl/libGLES_mali.so (_ZL24get_window_target_bufferP18egl_winsys_displayP18egl_winsys_surfacePP16egl_color_buffer+1200)
2.   #01  pc 00000000005771ac  /system/vendor/lib/egl/libGLES_mali.so (eglp_window_next_render_target+64)
3.   #02  pc 0000000000577068  /system/vendor/lib/egl/libGLES_mali.so (eglp_first_operation_cb+56)
4.   #03  pc 000000000042f3a4  /system/vendor/lib/egl/libGLES_mali.so (gles_fb_first_operation_cb+32)
5.   #04  pc 0000000000426edc  /system/vendor/lib/egl/libGLES_mali.so (glesx_fbp_prepare_to_render+48)
6.   #05  pc 000000000042de74  /system/vendor/lib/egl/libGLES_mali.so (gles_fbp_clear+52)
7.   #06  pc 000000000042c694  /system/vendor/lib/egl/libGLES_mali.so (gles_fb_clear+284)


[ARM Mali-G72 MP18 572 MHz GPU]

backtrace:
1.   #00  pc 0000000000457530  /vendor/lib/egl/libGLES_mali.so
2.   #01  pc 0000000000583ab4  /vendor/lib/egl/libGLES_mali.so
3.   #02  pc 0000000000583970  /vendor/lib/egl/libGLES_mali.so
4.   #03  pc 00000000004d4e60  /vendor/lib/egl/libGLES_mali.so
5.   #04  pc 00000000004cc8e8  /vendor/lib/egl/libGLES_mali.so
6.   #05  pc 00000000004d3928  /vendor/lib/egl/libGLES_mali.so
7.   #06  pc 00000000004d2134  /vendor/lib/egl/libGLES_mali.so

I wanna get the answer.

Thans for reading my post.

Best Regards.

Parents
  • In that case, the timing of abnormal termination is before the rendering something.
    There is the source code. (refer to below)

     //render n-1 frame
     //then, do swapbuffer

     //prepare rendering n frame
     glEnable(GL_TEXTURE_2D);
     
     glEnable(GL_CULL_FACE);
     glEnable(GL_DEPTH_TEST);
     glDisable(GL_BLEND);
     glEnable(GL_FOG);

     glActiveTexture(GL_TEXTURE0);

     glClearDepthf(1.0);
     
     glFrontFace(GL_CW);
     
     glCullFace(GL_BACK);
     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

     glDepthFunc(GL_LEQUAL);
     glAlphaFunc( GL_GREATER, 0.0f );
     
     glLineWidth(1.0f);
     glPointSize(1.0f);
     
     glClearColor(245.0f/255.0f, 243.0f/255.0f, 222.0f/255.0f, 1.0f);
     
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // here

Reply
  • In that case, the timing of abnormal termination is before the rendering something.
    There is the source code. (refer to below)

     //render n-1 frame
     //then, do swapbuffer

     //prepare rendering n frame
     glEnable(GL_TEXTURE_2D);
     
     glEnable(GL_CULL_FACE);
     glEnable(GL_DEPTH_TEST);
     glDisable(GL_BLEND);
     glEnable(GL_FOG);

     glActiveTexture(GL_TEXTURE0);

     glClearDepthf(1.0);
     
     glFrontFace(GL_CW);
     
     glCullFace(GL_BACK);
     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

     glDepthFunc(GL_LEQUAL);
     glAlphaFunc( GL_GREATER, 0.0f );
     
     glLineWidth(1.0f);
     glPointSize(1.0f);
     
     glClearColor(245.0f/255.0f, 243.0f/255.0f, 222.0f/255.0f, 1.0f);
     
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // here

Children