我们是在cocos2dx3.11下运行spine。我们特效用的spine开发工具版本为3.8.99。我这边开发将spine runtime升级到了3.8。但在手机上运行时偶现崩溃。尤其在安卓上比较明显。不知有没有好的解决方法?
这边的崩溃点往往是在spine::EventQueue::drain()+39处。不知是什么原因?
cocos2dx3.11下spine3.8偶现闪退
- Изменено
请提供一个能够可靠地重现问题的编译小型项目。
Please provide a compiling, small project that reliably reproduces the issue.
Mario написал请提供一个能够可靠地重现问题的编译小型项目。
Please provide a compiling, small project that reliably reproduces the issue.
你好,现在这种闪退的情况是偶现的。大概一天内的设备崩溃率在5%-8%之间。有的设备在二三十分钟出现闪退,有的设备在三五个小时出现闪退,也有更长时间的。崩溃点是在EventQueue::drain()里面的queueEntry->entry。其中entry为空。见下图。
我有一种比较容易重现这种崩溃的方法,就是一个接一个播放特效。在sp.EventType.ANIMATION_COMPLETE回调中回调上去再创建并播放下一个特效。这样很容易在刚开始播下一个特效时出现崩溃。崩溃在哪一个特效不确定。可能刚开始播放第3个特效时出现崩溃,可能刚开始播放第7个特效时出现崩溃,等等。但如果我把参数里的回调放在下一帧执行的话这种崩溃就基本上可以避免。不过我的项目本身并不会一个接一个播放特效,所以这种偶现的崩溃原因我并不是很清楚。
我可以裁剪一个连续播放特效的测试项目出来。大概会有几百兆。我是通过附件上传上来吗?
The forum can't do hundreds of megabytes in an attachment. Maybe you can cut down the size but only including the code and assets for the simple repro project? Otherwise you can send a link to Dropbox/Google Drive/another file host.
Mario написалThe forum can't do hundreds of megabytes in an attachment. Maybe you can cut down the size but only including the code and assets for the simple repro project? Otherwise you can send a link to Dropbox/Google Drive/another file host.
你好,我将测试工程的压缩包放到googleDrive了。链接是
这是苹果测试工程。你需要用你的证书就可以在苹果手机上调试了。
谢谢你。 我在这里开了一个问题。 我希望这周能够解决这个问题:
https://github.com/EsotericSoftware/spine-runtimes/issues/2206
Thank you. I've opened an issue here. I hope to be able to fix this this week:
https://github.com/EsotericSoftware/spine-runtimes/issues/2206
抱歉,您给我发了一个庞大的项目,其中没有任何关于如何构建它、重现问题的代码所在位置等的说明。
请修改我们的spine-cocos2dx示例项目中的示例场景之一,以便问题可以重现。
https://github.com/EsotericSoftware/spine-runtimes/tree/4.1/spine-cocos2dx/example/Classes
I'm sorry, you've sent me a huge project which doesn't have any instructions on how to build it, where the code that reproduces the issue can be located, and so on.
Please modify one of the example scenes in our spine-cocos2dx example project, such that the issue can be reproduced.
https://github.com/EsotericSoftware/spine-runtimes/tree/4.1/spine-cocos2dx/example/Classes
你好,我的项目是用lua开发的。运行项目需要在mac电脑上进入frameworks\runtime-src\proj.ios_mac用xCode打开.xcodeproj文件即可在debug模式下编译运行。
xCode在真机上运行需要开发证书。这需要你们用你们的证书来运行。
lua代码在src\与src\views\login下。动效资源在res\animation下。
如果对lua代码进行了修改则需要打开终端切换到tools\目录运行./mk_package.sh命令即可将修改的lua代码打包更新到项目。之后在xCode上编译运行的就是更新后的内容。
Mario написал抱歉,您给我发了一个庞大的项目,其中没有任何关于如何构建它、重现问题的代码所在位置等的说明。
请修改我们的spine-cocos2dx示例项目中的示例场景之一,以便问题可以重现。
https://github.com/EsotericSoftware/spine-runtimes/tree/4.1/spine-cocos2dx/example/ClassesI'm sorry, you've sent me a huge project which doesn't have any instructions on how to build it, where the code that reproduces the issue can be located, and so on.
Please modify one of the example scenes in our spine-cocos2dx example project, such that the issue can be reproduced.
https://github.com/EsotericSoftware/spine-runtimes/tree/4.1/spine-cocos2dx/example/Classes
你好,可以在我的工程里用xCode真机调试吗?
当然,我不明白为什么不。
Sure, I don't see why not.
Mario написал当然,我不明白为什么不。
Sure, I don't see why not.
你们在手机上运行起来我那个项目了吗?现在找到报错的原因了吗?
请问现在有解决方案了吗?
不,因为我已经要求您修改我们的示例场景之一。 恐怕我无法花时间弄清楚如何构建您的项目。
No, as I've asked you to modify one of our example scenes. I can not spend time figuring out how to build your project I'm afraid.
Mario написал不,因为我已经要求您修改我们的示例场景之一。 恐怕我无法花时间弄清楚如何构建您的项目。
No, as I've asked you to modify one of our example scenes. I can not spend time figuring out how to build your project I'm afraid.
我用你们的项目运行不起来。要从你们的示例场景来修改这种偶现的bug也是比较困难的。
我将我之前的项目做了进一步简化。项目大小也大大缩小。我的项目已经构建好了。你们用我的项目在xcode debug模式下直接运行就可以了。不需要花时间去考虑如何构建项目。你看用我的项目能不能运行起来?
我的项目中,spine目录在frameworks/cocos2d-x/cocos/editor-support/spine下。报错的地方也是在这里。
运行xcode的目录在frameworks/runtime-src/proj.ios_mac下
lua场景在src/controller/views/login/layer/中。lua部分不需要修改。直接用xcode运行到手机上就可以了。
我将新的项目上传到了google drive上。请查阅: