Failed to link program OpenGL error 0x0501

Hi…
I get this error:
cocos2d: ERROR: compileProgram: failed to link program OpenGL error 0x0501 in /home/simo/Desktop/cocos2d-x/Akrasiel/cocos2d/cocos/renderer/backend/opengl/TextureGL.cpp updateData 207

By the way, my game still runs and nothing seems to work bad… so i suspect this is not a critical error, but does iti means?

Thanks

0x0501 represent GL_INVALID_VALUE. Can you provide more info about it?

Yes, i have installed on Debian 10 with no problem using official guide, everything works fine, my game run smooth and flawlessly with sound, but that error appears on console, really, this error does not disturb me … just curious about it.

I’m using QtCreator but as i said, i see no really problem on my project… i don’t know what else to say :stuck_out_tongue:

I’m seeing this too, both in the emulator and on an Android 8.1 device:

20963-21130/com.localhost.game I/Adreno: QUALCOMM build                   : 8e59954, I0be83d0d26
    Build Date                       : 09/22/17
    OpenGL ES Shader Compiler Version: EV031.21.02.00
    Local Branch                     : O17A
    Remote Branch                    : 
    Remote Branch                    : 
    Reconstruct Branch               : 
20963-21130/com.localhost.game I/OpenGLRenderer: Initialized EGL, version 1.4
20963-21130/com.localhost.game D/OpenGLRenderer: Swap behavior 2
20963-21113/com.localhost.game D/cocos2d-x debug info: {
    	cocos2d.x.version: cocos2d-x-4.0
    	vendor: Qualcomm
    	cocos2d.x.compiled_with_profiler: false
    	max_texture_units: 96
    	cocos2d.x.build_type: DEBUG
    	renderer: Adreno (TM) 430
    	cocos2d.x.compiled_with_gl_state_cache: true
    	max_samples_allowed: 0
    	supports_OES_depth24: true
    	version: OpenGL ES 3.2 V@258.0 (GIT@8e59954, I0be83d0d26) (Date:09/22/17)
    	max_vertex_attributes: 32
    	supports_NPOT: true
    	supports_vertex_array_object: true
    	max_texture_size: 16384
    	supports_S3TC: false
    	supports_discard_framebuffer: true
    	supports_ETC1: true
    	supports_OES_map_buffer: false
    	supports_PVRTC: false
    	supports_BGRA8888: false
    	supports_ATITC: true
    	supports_OES_packed_depth_stencil: true
    }
20963-21113/com.localhost.game D/cocos2d-x debug info: OpenGL error 0x0501 in ../../../../../../cocos2d/cocos/renderer/backend/opengl/TextureGL.cpp updateData 207        

and

20963-21113/com.localhost.game I/Adreno: Error: input v_fragmentColor not declared in output from previous stage.
    Error: Linking failed.
20963-21113/com.localhost.game D/cocos2d-x debug info: OpenGL error 0x0501 in ../../../../../../cocos2d/cocos/renderer/backend/opengl/TextureGL.cpp updateData 207

On a possibly unrelated note, Spine animations do not work at all on Android. They’re completely invisible, with no errors coming up, using the V4 spine code. The Esoteric Software developer working on the cocos2d-x spine code also just noted this. On Windows, it works fine, but the sprite batching is broken, so Spine animations are taking up an insane number of draw calls.

If I run the Android game in the emulator, and choose Desktop OpenGL as the rendering engine, then it works, but other than that, on Android devices it does not.

1 Like

QT Creator observes the CMakeLists file. Just point to it and go. Then keep it up to date. This helps ensure you aren’t missing any build settings. But maybe this is a bug. We don’t test Linux a lot.

1 Like

I met this issue at all platforms ios, android, win32 when I start use cocos2d-x-4.0, this issue could be fixed, please reference at: https://github.com/c4games/engine-x/pull/52/files

@halx99 Thank you, i will take a look.

@coulsonwang

You are welcome, we create a unique repo engine-x which is based on cocos2d-x-4.0 to do more ahead of researching, just want make cocos2d-x better.