1.7.0正式版,1.8.0正式版,1.7.2beta2都会在IOS中频繁闪退,Android中却没事

因为麻将游戏所以需要四个设备,两个Android设备两个IOS设备…

开发过程中Web上调试一切正常.

打包原生平台后:在麻将的战斗场景中,IOS两个设备频繁闪退,Android两个设备从未发生过闪退.

通过JSB2.0调试,safari一直都未有错误出现,但是xcode上就经常报错,具体信息见下方截图:




看起来是有节点已经destroy后导致的问题?

有没有办法整理一个复现的demo出来让我们调试、细查一下?
目测是c++层用到了非法的JS 函数对象导致的问题。

如果不方便发论坛上,也可以联系我的QQ号。稍后私信给你。

你QQ多少?

+1 同闪退。

不过项目太大,很难整理重现demo。

+1 同样ios闪退, 没能搞出重现的demo, 只能等待修复…

今天把工程发给引擎组相关人员了,并和引擎组的人员联调和讨论后···目前给的解决方案是先用SM不要用JSC,目前报错都是在JSC线程中,他们排查需要时间。我试过了,把引擎底层切换成SM后不会崩溃了。但是性能和内存上没有JSC爽。期待引擎组能尽早找到原因彻底修复这个bug。

请问如何在IOS工程中将JS引擎换成SM?

同样是 ios 上或者mac模拟器上 经常闪退 期待 解决方案

安卓上也偶尔会闪退,1.8.0版本

构建的时候用link或者default,xcode中就能看到cocos的工程,然后找到config.hpp文件.

然后倒入两个.a库
位置在/Applications/CocosCreator.app/Contents/Resources/cocos2d-x/external/ios/libs/

多谢回复!!!

+1 之前是使用runAction动画系统闪退

现在是除了Action动画系统 也会闪退

但是堆栈是再AutomaticThread 根本不知道什么原因

这样配置 mac模拟器会报错
2018-01-08T09:56:24.519Z - normal: Simulator: Initializing SpiderMonkey, version: JavaScript-C52.0.2
2018-01-08T09:56:24.544Z - normal: Simulator: JS: Cocos2d-x-lite v1.7.0
2018-01-08T09:56:24.545Z - normal: Simulator: ERROR: can’t redefine non-configurable property “setSearchPaths”, location: (no filename):0:0
2018-01-08T09:56:24.545Z - normal: Simulator: STACK:
2018-01-08T09:56:24.546Z - normal: Simulator:
2018-01-08T09:56:24.547Z - normal: Simulator: Evaluating src/jsb_polyfill.js failed (evaluatedOK == JS_FALSE)
2018-01-08T09:56:24.548Z - normal: Simulator: ERROR: can’t redefine non-configurable property “getName”, location: src/jsb_polyfill.js:22136:9
2018-01-08T09:56:24.549Z - normal: Simulator: STACK:
2018-01-08T09:56:24.550Z - normal: Simulator: [148]</js.get@src/jsb_polyfill.js:22136:9
2018-01-08T09:56:24.550Z - normal: Simulator: [172]<@src/jsb_polyfill.js:25284:9
2018-01-08T09:56:24.550Z - normal: Simulator: newRequire@src/jsb_polyfill.js:20:9
2018-01-08T09:56:24.551Z - normal: Simulator: newRequire/<@src/jsb_polyfill.js:21:18
2018-01-08T09:56:24.551Z - normal: Simulator: [180]<@src/jsb_polyfill.js:26496:7
2018-01-08T09:56:24.551Z - normal: Simulator: newRequire@src/jsb_polyfill.js:20:9
2018-01-08T09:56:24.552Z - normal: Simulator: newRequire/<@src/jsb_polyfill.js:21:18
2018-01-08T09:56:24.552Z - normal: Simulator: [192]<@src/jsb_polyfill.js:30493:7
2018-01-08T09:56:24.552Z - normal: Simulator: newRequire@src/jsb_polyfill.js:20:9
2018-01-08T09:56:24.552Z - normal: Simulator: outer@src/jsb_polyfill.js:26:44
2018-01-08T09:56:24.553Z - normal: Simulator: @src/jsb_polyfill.js:2:13
2018-01-08T09:56:24.553Z - normal: Simulator: @src/jsb_polyfill.js:1:2
2018-01-08T09:56:24.553Z - normal: Simulator: @main.js:97:5
2018-01-08T09:56:24.554Z - normal: Simulator: @main.js:1:2
2018-01-08T09:56:24.554Z - normal: Simulator:
creator 1.7.2
自定义引擎是 1.7分支

顶一下,这个问题解决了吗?

你重新绑定了 setSearchPaths ?

没有 绑定过
但是我执行过 tojs里面的 genbindings.py

麻烦在看看 是什么问题吧

+1 麻烦在看看 是什么问题吧

解决一个iOS上比较容易触发的潜在问题:

https://github.com/cocos-creator/cocos2d-x-lite/pull/1062

你们合并这个补丁,看看是否还会出现问题。