3.15.1 真机启动时崩溃闪退

06-30 16:03:22.435 7341-7341/? E/dalvikvm: >>>>> org.cocos2dx.HelloWorld [ userId:0 | appId:10169 ]
06-30 16:03:22.540 7341-7341/org.cocos2dx.HelloWorld D/dalvikvm: GC_FOR_ALLOC freed 3026K, 46% free 5710K/10544K, paused 16ms, total 16ms
06-30 16:03:22.550 7341-7341/org.cocos2dx.HelloWorld I/PersonaManager: getPersonaService() name persona_policy
06-30 16:03:22.600 7341-7341/org.cocos2dx.HelloWorld D/dalvikvm: Trying to load lib /data/app-lib/org.cocos2dx.HelloWorld-1/libcocos2djs.so 0x41eb0588
06-30 16:03:22.695 7341-7341/org.cocos2dx.HelloWorld D/dalvikvm: Added shared lib /data/app-lib/org.cocos2dx.HelloWorld-1/libcocos2djs.so 0x41eb0588
06-30 16:03:22.695 7341-7341/org.cocos2dx.HelloWorld D/JniHelper: JniHelper::setJavaVM(0x41667230), pthread_self() = 1074495828
06-30 16:03:22.695 7341-7341/org.cocos2dx.HelloWorld D/main: cocos_android_app_init
06-30 16:03:22.700 7341-7341/org.cocos2dx.HelloWorld D/Cocos2dxHelper: isSupportLowLatency:false
06-30 16:03:22.710 7341-7341/org.cocos2dx.HelloWorld D/Cocos2dxHelper: sampleRate: 48000, framesPerBuffer: 960
06-30 16:03:22.710 7341-7341/org.cocos2dx.HelloWorld D/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp: nativeSetAudioDeviceInfo: sampleRate: 48000, bufferSizeInFrames: 960
06-30 16:03:22.745 7341-7341/org.cocos2dx.HelloWorld D/Cocos2dxActivity: model=SM-T800
06-30 16:03:22.745 7341-7341/org.cocos2dx.HelloWorld D/Cocos2dxActivity: product=chagallwifizc
06-30 16:03:22.745 7341-7341/org.cocos2dx.HelloWorld D/Cocos2dxActivity: isEmulator=false
06-30 16:03:22.745 7341-7341/org.cocos2dx.HelloWorld D/EngineDataManager.cpp: nativeSetSupportOptimization: 0
06-30 16:03:22.745 7341-7341/org.cocos2dx.HelloWorld D/Cocos2dxActivity: onResume()
06-30 16:03:22.750 7341-7341/org.cocos2dx.HelloWorld D/AudioFocusManager: requestAudioFocus succeed
06-30 16:03:22.890 7341-7368/? D/cocos2d-x debug info: OpenGL error 0x0500 in F:/xyjphone1/HelloWorld/frameworks/cocos2d-x/cocos/./base/CCConfiguration.cpp gatherGPUInfo 171
06-30 16:03:22.890 7341-7368/? D/cocos2d-x debug info: {
gl.supports_OES_packed_depth_stencil: true
gl.supports_vertex_array_object: true
gl.supports_BGRA8888: false
gl.supports_ATITC: false
gl.supports_S3TC: false
cocos2d.x.version: cocos2d-x-3.15.1
gl.supports_discard_framebuffer: true
cocos2d.x.compiled_with_profiler: false
gl.supports_PVRTC: false
cocos2d.x.build_type: DEBUG
gl.renderer: Mali-T628
gl.supports_OES_depth24: true
gl.supports_ETC1: true
gl.supports_OES_map_buffer: true
cocos2d.x.compiled_with_gl_state_cache: true
gl.version: OpenGL ES-CM 1.1
gl.supports_NPOT: true
gl.max_texture_units: 0
gl.vendor: ARM
gl.max_texture_size: 8192
}
06-30 16:03:22.900 7341-7368/? D/cocos2d-x debug info: OpenGL error 0x0502 in F:/xyjphone1/HelloWorld/frameworks/cocos2d-x/cocos/./renderer/CCRenderer.cpp setupVBOAndVAO 306
06-30 16:03:22.945 7341-7368/? D/cocos2d-x debug info: cocos2d: fullPathForFilename: No file found at script/jsb_prepare.jsc. Possible missing file.
06-30 16:03:22.950 7341-7341/? D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=true
06-30 16:03:23.000 7341-7368/? W/dalvikvm: dvmFindClassByName rejecting ‘org/cocos2dx/lib/Cocos2dxLocalStorage’
06-30 16:03:23.030 7341-7368/? D/cocos2d-x debug info: cocos2d: fullPathForFilename: No file found at script/jsb_boot.jsc. Possible missing file.
06-30 16:03:23.040 7341-7368/? D/cocos2d: android SDK version:19
06-30 16:03:23.040 7341-7368/? D/cocos2d-x debug info: OpenGL error 0x0502 in F:/xyjphone1/HelloWorld/frameworks/cocos2d-x/cocos/./renderer/CCGLProgram.cpp initWithByteArrays 255
06-30 16:03:23.040 7341-7368/? D/cocos2d-x debug info: cocos2d: ERROR: Failed to compile vertex shader
06-30 16:03:23.040 7341-7368/? D/cocos2d-x debug info: Assert failed: Cannot link invalid program
06-30 16:03:23.040 7341-7368/? E/cocos2d-x assert: F:/xyjphone1/HelloWorld/frameworks/cocos2d-x/cocos/./renderer/CCGLProgram.cpp function:link line:599

HelloWorld工程,好像是GL初始化的时候出错,不知道该怎么搞了。

  • 电脑:win7 64位
  • 引擎:3.15.1
  • ndk:r11
  • 设备:Galaxy Tab S SM-T800
  • Android:4.4.2

@minggo

你有改shader吗?错误提示shader编译出错了。


用了6月15从git上check的版本,重新下了3.15.1 可以了。

了解了,应该是GLES3初始化造成的,现在已经去除了GLES3 context的初始化。