cats-oss / android-gpuimage

Android filters based on OpenGL (idea from GPUImage for iOS)
8.97k stars 2.26k forks source link

Multiple GPUImageView in Gridview become black while scrolling #458

Open webgourou opened 5 years ago

webgourou commented 5 years ago

Future Task

Hello,

when using multiple GPUImage view like a thumbnail in a Gridview; When scrolling the gridview, the images could become black. First the bitmap is shown successfully, then we scroll gridview, the GPUImageView are now hidden and once we scroll back to make them reappear, they are black.

It seems the shader program not loaded anymore please see log:

2019-06-13 14:14:43.025 371-970/com.lesafrance.dev.usee D/MALI: gles_state_set_error_internal:76: [MALI] GLES error info: there is no current program object 2019-06-13 14:14:43.046 371-970/com.lesafrance.dev.usee D/MALI: gles_state_set_error_internal:75: [MALI] GLES ctx: 0x7bfc08d0c8, error code:0x501 2019-06-13 14:14:43.046 371-970/com.lesafrance.dev.usee D/MALI: gles_state_set_error_internal:76: [MALI] GLES error info: is not a value generated by OpenGL

I don' t know where the errors happens, on the GPUImageRenderer onSurfaceChanged method, the program number still exist !

Any ideas ?

Thanks

viseator commented 5 years ago

Hi, I tried to use GLTextureView from GPUImage in my project and i found that there are only 32 glContext can be created in an application (Android 9.0, 6.0 has no limit). I don't know whether it's releated to your problem, may be you can count the GPUImageView which shown successully or find a lower version Android Devices to test the case.

JarvisBuop commented 4 years ago

same problem