I am using cocos2d -x 3.10
android sdk 6.0
android-ndk-r10e
On windows and older android version the shader is working just fine.
Bellow is the logcat from samsung galaxy s6 edge.
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: create rendererRecreatedListener for GLProgramState
**
- 03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: cocos2d:
fullPathForFilename: No file found at shaders/grid.fsh. Possible
missing file.
**
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: cocos2d: ERROR: Failed to compile shader:
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: precision mediump float;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: precision mediump int;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform mat4 CC_PMatrix;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform mat4 CC_MVMatrix;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform mat4 CC_MVPMatrix;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform mat3 CC_NormalMatrix;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform vec4 CC_Time;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform vec4 CC_SinTime;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform vec4 CC_CosTime;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform vec4 CC_Random01;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform sampler2D CC_Texture0;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform sampler2D CC_Texture1;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform sampler2D CC_Texture2;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: uniform sampler2D CC_Texture3;
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: //CC INCLUDES END
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info:
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info:
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: cocos2d: 0:1: L0009: Missing main() function for shader
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info:
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: cocos2d: ERROR: Failed to compile fragment shader
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: create rendererRecreatedListener for GLProgramState
03-19 02:12:06.921 22367 22382 D cocos2d-x debug info: Assert failed: invalid shader
03-19 02:12:06.921 22367 22382 E cocos2d-x assert: d:/Minion/proj.android/…/cocos2d/cocos/./renderer/CCGLProgramState.cpp function:init line:423
03-19 02:12:06.921 22367 22382 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 22382 (GLThread 5093)
03-19 02:12:06.971 3453 3453 D CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1800000 uid : 1000 pid : 3453 tag : ACTIVITY_RESUME_BOOSTER@13
03-19 02:12:06.971 3453 3453 D CustomFrequencyManagerService: FrequencyrequestList.getNextCStateDisableRequest, index: 1
03-19 02:12:06.981 3035 3035 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-19 02:12:06.981 3035 3035 F DEBUG : Build fingerprint: ‘samsung/zeroltexx/zerolte:6.0.1/MMB29K/G925FXXU3DPBQ:user/release-keys’
03-19 02:12:06.981 3035 3035 F DEBUG : Revision: ‘10’
03-19 02:12:06.981 3035 3035 F DEBUG : ABI: ‘arm’
03-19 02:12:06.981 3035 3035 F DEBUG : pid: 22367, tid: 22382, name: GLThread 5093 >>> com.funkymonkey.mygame <<<
03-19 02:12:06.981 3035 3035 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
03-19 02:12:06.991 3035 3035 F DEBUG : r0 00000000 r1 f3612e34 r2 00000000 r3 00000000
03-19 02:12:06.991 3035 3035 F DEBUG : r4 e1463b6c r5 ee4ee280 r6 e0e8e528 r7 44b18000
03-19 02:12:06.991 3035 3035 F DEBUG : r8 00000000 r9 f4c26800 sl 12c8e130 fp f36132ac
03-19 02:12:06.991 3035 3035 F DEBUG : ip f3612e8c sp f3613298 lr e0f5e10c pc e0f0edb0 cpsr 600f0010
03-19 02:12:06.991 3035 3035 F DEBUG :
03-19 02:12:06.991 3035 3035 F DEBUG : backtrace:
03-19 02:12:06.991 3035 3035 F DEBUG : #00 pc 004dadb0 /data/app/com.funkymonkey.mygame-1/lib/arm/libcocos2dcpp.so (cocos2d::Ref::retain()+20)
03-19 02:12:06.991 3035 3035 F DEBUG : #01 pc 0052a108 /data/app/com.funkymonkey.mygame-1/lib/arm/libcocos2dcpp.so (cocos2d::GLProgramState::init(cocos2d::GLProgram*)+240)
03-19 02:12:06.991 3035 3035 F DEBUG : #02 pc 00539b68 /data/app/com.funkymonkey.mygame-1/lib/arm/libcocos2dcpp.so (cocos2d::GLProgramStateCache::getGLProgramState(cocos2d::GLProgram*)+232)
03-19 02:12:06.991 3035 3035 F DEBUG : #03 pc 00529550 /data/app/com.funkymonkey.mygame-1/lib/arm/libcocos2dcpp.so (cocos2d::GLProgramState::getOrCreateWithGLProgram(cocos2d::GLProgram*)+32)
03-19 02:12:06.991 3035 3035 F DEBUG : #04 pc 0038b4b0 /data/app/com.funkymonkey.mygame-1/lib/arm/libcocos2dcpp.so (HelloWorld::init()+1344)
03-19 02:12:06.991 3035 3035 F DEBUG : #05 pc 0038a7f8 /data/app/com.funkymonkey.mygame-1/lib/arm/libcocos2dcpp.so (HelloWorld::create()+132)
03-19 02:12:06.991 3035 3035 F DEBUG : #06 pc 0038a8a8 /data/app/com.funkymonkey.mygame-1/lib/arm/libcocos2dcpp.so (HelloWorld::createScene()+24)
03-19 02:12:06.991 3035 3035 F DEBUG : #07 pc 00389a54 /data/app/com.funkymonkey.mygame-1/lib/arm/libcocos2dcpp.so (AppDelegate::applicationDidFinishLaunching()+224)
03-19 02:12:06.991 3035 3035 F DEBUG : #08 pc 00396130 /data/app/com.funkymonkey.mygame-1/lib/arm/libcocos2dcpp.so (cocos2d::Application::run()+40)
03-19 02:12:06.991 3035 3035 F DEBUG : #09 pc 0039aab4 /data/app/com.funkymonkey.mygame-1/lib/arm/libcocos2dcpp.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit+248)
03-19 02:12:06.991 3035 3035 F DEBUG : #10 pc 000d278d /data/app/com.funkymonkey.mygame-1/oat/arm/base.odex (offset 0xa5000) (void org.cocos2dx.lib.Cocos2dxRenderer.nativeInit(int, int)+80)
03-19 02:12:06.991 3035 3035 F DEBUG : #11 pc 000d37b7 /data/app/com.funkymonkey.mygame-1/oat/arm/base.odex (offset 0xa5000) (void org.cocos2dx.lib.Cocos2dxRenderer.onSurfaceCreated(javax.microedition.khronos.opengles.GL10, javax.microedition.khronos.egl.EGLConfig)+74)
03-19 02:12:06.991 3035 3035 F DEBUG : #12 pc 03e2a149 /system/framework/arm/boot.oat (offset 0x2f20000)