Question

I'm having this annoying problem with compiling shader that already compiles on tens of devices but not on 1 or 2 specific

I'm trying to load fragment shader using:

 GLES20.glShaderSource(shader, source);

but I'm keep getting crash with log:

glCompileShader Fatal signal 11 (SIGSEGV) at 0x3412d01

I though that the GLSL version might have a problem compiling the shader but from looking at its version I saw that other devices with the same GLSL versions have compiled it successfully.

The error in OpenGL driver details are:

ZTE 4.0.4

GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 1.00
GL_VENDOR: Qualcomm
GL_RENDERER: Adreno (TM) 200
GL_EXTENSIONS: 
GL_AMD_compressed_ATC_texture 
GL_AMD_performance_monitor 
GL_AMD_program_binary_Z400 
GL_EXT_texture_filter_anisotropic 
GL_EXT_texture_format_BGRA8888 
GL_EXT_texture_type_2_10_10_10_REV 
GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture
GL_OES_depth_texture
GL_OES_depth24 
GL_OES_EGL_image GL_OES_EGL_image_external 
GL_OES_element_index_uint
GL_OES_fbo_render_mipmap 
GL_OES_fragment_precision_high 
GL_OES_get_program_binary 
GL_OES_packed_depth_stencil 
GL_OES_rgb8_rgba8 GL_OES_standard_derivatives 
GL_OES_texture_3D GL_OES_texture_float 
GL_OES_texture_half_float 
GL_OES_texture_half_float_linear 
GL_OES_texture_npot 
GL_OES_vertex_half_float 
GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object
 GL_QCOM_alpha_test
 GL_QCOM_binning_control
 GL_QCOM_driver_control 
GL_QCOM_perfmon_global_mode 
GL_QCOM_extended_get 
GL_QCOM_extended_get2
 GL_QCOM_tiled_rendering 
GL_QCOM_writeonly_rendering 
GL_AMD_compressed_3DC_texture 
Was it helpful?

Solution

The solution is partial. In the shader I defined some long macros that cause this crash with SIGDEV error. I assuming they corrupted my memory and the app got crazy.

I changed all the macros to functions and it solved the bug

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top