游戏是回合制游戏,在点击任务,发生切换场景并寻路时特别容易崩溃,但是自己看错误堆栈完全看不出有关联的地方,下面贴堆栈信息,求帮忙>_<。
简版的:
1#00 pc 0056126c libcocos2dlua.so lua_register_cocos2dx_AutoPolygon(lua_State*) [armeabi-v5te]
2#01 pc 7a8e61bc
3java:
4org.cocos2dx.lib.Cocos2dxRenderer.nativeRender(Native Method)
5org.cocos2dx.lib.Cocos2dxRenderer.onDrawFrame(Cocos2dxRenderer.java:105)
6android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
7android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
详细版本的:
1#00 pc 0056126c libcocos2dlua.so lua_register_cocos2dx_AutoPolygon(lua_State*) [armeabi-v5te]
2#01 pc 006cd274 /data/app/com.tangyaoGame.rdzs-2/lib/arm/libcocos2dlua.so [armeabi-v5te]
3#02 pc 006c00b9 /data/app/com.tangyaoGame.rdzs-2/lib/arm/libcocos2dlua.so (lua_pcall+20) [armeabi-v5te]
4#03 pc 004e46e4 libcocos2dlua.so lua_cocos2dx_GLView_setFrameSize(lua_State*) [armeabi-v5te]
5#04 pc 004e45e0 libcocos2dlua.so lua_cocos2dx_Node_setScale(lua_State*) [armeabi-v5te]
6#05 pc 005ca8b4 /data/app/com.tangyaoGame.rdzs-2/lib/arm/libcocos2dlua.so [armeabi-v5te]
7#06 pc 00a876ec libcocos2dlua.so cocos2d::Physics3DWorld::sweepShape(cocos2d::Physics3DShape*, cocos2d::Mat4 const&, cocos2d::Mat4 const&, cocos2d::Physics3DWorld::HitResult*) [armeabi-v5te]
8#07 pc 00a4fdc4 /data/app/com.tangyaoGame.rdzs-2/lib/arm/libcocos2dlua.so (cocos2d::update(float)+128) [armeabi-v5te]
9#08 pc 00a53bb0 libcocos2dlua.so cocos2d::GLProgram::setUniformLocationWith4i(int, int, int, int, int) [armeabi-v5te]
10#09 pc 00a3d5cc libcocos2dlua.so cocos2d::UserDefault::setDataForKey(char const*, cocos2d::Data const&) [armeabi-v5te]
11#10 pc 00a3d610 libcocos2dlua.so cocos2d::UserDefault::setDataForKey(char const*, cocos2d::Data const&) [armeabi-v5te]
12#11 pc 004def33 libcocos2dlua.so lua_cocos2dx_Node__setLocalZOrder(lua_State*) [armeabi-v5te]
13#12 pc 0055b3a5 /data/app/com.tangyaoGame.rdzs-2/oat/arm/base.odex (oatexec+787365) [armeabi]
14 java:
15 org.cocos2dx.lib.Cocos2dxRenderer.onDrawFrame(Cocos2dxRenderer.java:105)
16 android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1535)
17 android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
感觉是同一个错误, 谢谢了
lua_cocos2dx_Node__setLocalZOrder
某个node空节点设置层级崩溃,看下lua脚本哪边调用了设置setZOrder(),也可能不是的,log逐步查看吧
意思是 我对某个空的节点 调用了 setLocalZorder是吗
lua里面你常写的应该是setZorder()
逐步log找找哪个节点在切换场景的时候被释放了还在调用函数吧
在一些关键的地方做打印 下一次崩溃了 就好查到了