我在mac osx桌面上测试了我的游戏,它运行正常。
每当我尝试在64位设备上播放时,它会在随机位置崩溃(在其中一个菜单场景中......例如在实际的游戏场景中不会发生......)这些似乎与多个deallocations ..当我使用Sprites和menuitems时它会崩溃,但我认为它不是特定于一件事...... cocos2d-x v3.13.1代码是不受影响的。
为什么我认为它与64位有关? 我在iPhone 6s Plus,iPad Pro1和iPhone 5上测试了iOS 10.2和10.1上的游戏。 该游戏在iPhone 5上完美播放(不支持arm64但是支持armv7)。
为什么会这样?
以下是iPhone5和iPhone 6s plus的初始日志行(与GL相关):
2016-12-30 14:13:47.205163 mygame[443:20061] [DYMTLInitPlatform] platform initialization successful
{
cocos2d.x.version: cocos2d-x-3.13.1
cocos2d.x.compiled_with_gl_state_cache: true
cocos2d.x.build_type: DEBUG
gl.supports_vertex_array_object: true
cocos2d.x.compiled_with_profiler: false
gl.renderer: PowerVR SGX 543
gl.vendor: Imagination Technologies
gl.version: OpenGL ES 2.0 IMGSGX543-128
gl.max_texture_size: 4096
gl.max_samples_allowed: 4
gl.supports_S3TC: false
gl.supports_ATITC: false
gl.supports_ETC1: false
gl.supports_OES_packed_depth_stencil: true
gl.max_texture_units: 8
gl.supports_PVRTC: true
gl.supports_NPOT: true
gl.supports_OES_map_buffer: true
gl.supports_OES_depth24: true
gl.supports_discard_framebuffer: true
gl.supports_BGRA8888: false
}
//=======================
2016-12-30 14:12:28.310751 mygame[733:79376] [DYMTLInitPlatform] platform initialization successful
2016-12-30 14:12:28.702187 mygame[733:79273] Metal GPU Frame Capture Enabled
2016-12-30 14:12:28.703649 mygame[733:79273] Metal API Validation Enabled
{
gl.supports_OES_map_buffer: true
gl.supports_vertex_array_object: true
cocos2d.x.version: cocos2d-x-3.13.1
gl.vendor: Apple Inc.
gl.supports_PVRTC: true
gl.renderer: Apple A9 GPU
cocos2d.x.compiled_with_profiler: false
gl.supports_S3TC: false
gl.version: OpenGL ES 2.0 Metal - 38.3
cocos2d.x.build_type: DEBUG
gl.max_texture_size: 4096
gl.supports_ETC1: false
gl.supports_BGRA8888: false
gl.max_texture_units: 8
gl.max_samples_allowed: 4
gl.supports_OES_packed_depth_stencil: true
gl.supports_ATITC: false
gl.supports_NPOT: true
gl.supports_discard_framebuffer: true
cocos2d.x.compiled_with_gl_state_cache: true
gl.supports_OES_depth24: true
}
更新:我在x64(Mac OSX桌面)上测试过它,效果很好。所以它与iOS 64位或iOS金属框架等有关...... ??