[ compile [==== ] 10% 0.0s ]
<— Last few GCs —>
[51332:0x7f855b631000] 73849 ms: Mark-sweep 1897.1 (2018.4) -> 1897.0 (1987.4) MB, 856.4 / 1.0 ms (average mu = 0.349, current mu = 0.000) last resort GC in old space requested
[51332:0x7f855b631000] 74768 ms: Mark-sweep 1897.0 (1987.4) -> 1897.0 (1987.4) MB, 919.6 / 0.4 ms (average mu = 0.198, current mu = 0.000) last resort GC in old space requested
<— JS stacktrace —>
==== JS stack trace =========================================
0: ExitFrame [pc: 0x11074e42b]
Security context: 0x004762842321 <String[#7]: file://>
1: fromString(aka fromString) [0x479d3a22e1] [buffer.js:315] [bytecode=0x4754167c51 offset=56](this=0x0047f6c804d1 ,0x0047b8320fa1 <Very long string[33743985]>,0x00472e1b4a41 <String[#4]: utf8>)
2: from [0x472e1924e1] [buffer.js:196] [bytecode=0x4754167891 offset=11](this=0x00479d383541 <JSFunction Buffer (sfi = 0x472e183189)>,0x00…
[51249] Error: Window “worker” crashed: [object Object]
at WebContents. (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/main/window.js:1:2492)
at WebContents.emit (events.js:199:15)
at WebContents.EventEmitter.emit (domain.js:469:20)
at WebContents.topLevelDomainCallback (domain.js:124:23)
[51249] Worker window crashed, reload to restart worker
之前哪个版本是正常的:TS代码量过多,编译堆栈溢出导致
手机型号:
手机浏览器:
编辑器操作系统:
重现概率:100%重现
D:\CocosDashboard_1.0.10\resources.editors\Creator\2.2.2\CocosCreator.exe --js-flags="–max-old-space-size=8192" --path F:\Test\TestDemo\20211123\004 --build “platform=android;debug=true”
我这边的命令行是这样的,没有报错
Cocos Creator 2.4.4 一样有这个问题。代码量超过一定数量之后,90%的编译都会报:Worker window crashed, reload to restart worker 之后中断。
解决方法只能是关闭sourceMaps,但这样调试会变得很麻烦。
希望有其他方案啊
请问我也出现了这个报错,但是加了这句–js-flags="–max-old-space-size=16384"可以了一段时间,再增加了些内容就又失败了,再往上增加也没用,请问目前有什么解决方法
CocosCreator.exe –js-flags="–max-old-space-size=16384" --path …/…/ --build “platform=android;debug=false;md5Cache=false;packageName=com.xxx.zmxx;sourceMaps=false”