cocos creator restart游戏崩溃报错

  • Creator 版本:v2.1.1

  • 目标平台: chrome

  • 详细报错信息,包含调用堆栈:
    set @ CCMaterial.js:81
    copy @ CCMaterial.js:130
    getInstantiatedMaterial @ CCMaterial.js:115
    292.GraySpriteState._switchGrayMaterial @ gray-sprite-state.js:28
    _updateDisabledState @ CCButton.js:857
    _updateState @ CCButton.js:736
    __preload @ CCButton.js:426
    (anonymous) @ VM1049:3
    invoke @ node-activator.js:66
    activateNode @ node-activator.js:226
    _activate @ CCScene.js:111
    runSceneImmediate @ CCDirector.js:466
    (anonymous) @ boot.js:368
    (anonymous) @ CCAssetLibrary.js:246
    (anonymous) @ CCLoader.js:273
    (anonymous) @ utils.js:81
    setTimeout (async)
    callInNextTick @ utils.js:80
    (anonymous) @ CCLoader.js:269
    157.proto.allComplete @ loading-items.js:529
    157.proto.itemComplete @ loading-items.js:721
    157.LoadingItems.itemComplete @ loading-items.js:379
    160.proto.flowOut @ pipeline.js:319
    (anonymous) @ pipeline.js:67
    (anonymous) @ uuid-loader.js:181
    (anonymous) @ CCLoader.js:316
    157.proto.allComplete @ loading-items.js:529
    157.proto.itemComplete @ loading-items.js:721
    157.LoadingItems.itemComplete @ loading-items.js:379
    160.proto.flowOut @ pipeline.js:319
    (anonymous) @ pipeline.js:67
    (anonymous) @ uuid-loader.js:181
    (anonymous) @ CCLoader.js:316
    157.proto.allComplete @ loading-items.js:529
    157.proto.itemComplete @ loading-items.js:721
    157.LoadingItems.itemComplete @ loading-items.js:379
    160.proto.flowOut @ pipeline.js:319
    (anonymous) @ pipeline.js:67
    (anonymous) @ uuid-loader.js:181
    (anonymous) @ CCLoader.js:316
    157.proto.allComplete @ loading-items.js:529
    157.proto.itemComplete @ loading-items.js:721
    157.LoadingItems.itemComplete @ loading-items.js:379
    160.proto.flowOut @ pipeline.js:319
    flow @ pipeline.js:87
    (anonymous) @ pipeline.js:64
    (anonymous) @ downloader.js:269
    loadCallback @ downloader.js:106
    load (async)
    downloadImage @ downloader.js:122
    153.Downloader.handle @ downloader.js:266
    flow @ pipeline.js:51
    flow @ pipeline.js:84
    160.proto.flowIn @ pipeline.js:275
    157.proto.append @ loading-items.js:508
    147.proto.flowInDeps @ CCLoader.js:327
    loadDepends @ uuid-loader.js:111
    loadUuid @ uuid-loader.js:292
    156.Loader.handle @ loader.js:289
    flow @ pipeline.js:51
    (anonymous) @ pipeline.js:64
    (anonymous) @ downloader.js:269
    xhr.onload @ text-downloader.js:39
    load (async)
    163.module.exports @ text-downloader.js:36
    downloadUuid @ downloader.js:131
    153.Downloader.handle @ downloader.js:266
    flow @ pipeline.js:51
    (anonymous) @ pipeline.js:64
    (anonymous) @ asset-loader.js:83
    queryAssetInfo @ CCAssetLibrary.js:184
    148.AssetLoader.handle @ asset-loader.js:49
    flow @ pipeline.js:51
    160.proto.flowIn @ pipeline.js:275
    157.proto.append @ loading-items.js:508
    147.proto.flowInDeps @ CCLoader.js:327
    loadDepends @ uuid-loader.js:111
    loadUuid @ uuid-loader.js:292
    156.Loader.handle @ loader.js:289
    flow @ pipeline.js:51
    (anonymous) @ pipeline.js:64
    (anonymous) @ downloader.js:269
    xhr.onload @ text-downloader.js:39
    load (async)
    163.module.exports @ text-downloader.js:36
    downloadUuid @ downloader.js:131
    153.Downloader.handle @ downloader.js:266
    flow @ pipeline.js:51
    (anonymous) @ pipeline.js:64
    (anonymous) @ asset-loader.js:83
    queryAssetInfo @ CCAssetLibrary.js:184
    148.AssetLoader.handle @ asset-loader.js:49
    flow @ pipeline.js:51
    160.proto.flowIn @ pipeline.js:275
    157.proto.append @ loading-items.js:508
    147.proto.flowInDeps @ CCLoader.js:327
    loadDepends @ uuid-loader.js:111
    loadUuid @ uuid-loader.js:292
    156.Loader.handle @ loader.js:289
    flow @ pipeline.js:51
    flow @ pipeline.js:42
    flow @ pipeline.js:42
    160.proto.flowIn @ pipeline.js:275
    157.proto.append @ loading-items.js:508
    147.proto.load @ CCLoader.js:292
    loadJson @ CCAssetLibrary.js:230
    (anonymous) @ boot.js:360
    (anonymous) @ CCLoader.js:273
    (anonymous) @ utils.js:81
    setTimeout (async)
    callInNextTick @ utils.js:80
    (anonymous) @ CCLoader.js:269
    157.proto.allComplete @ loading-items.js:529
    157.proto.itemComplete @ loading-items.js:721
    157.LoadingItems.itemComplete @ loading-items.js:379
    160.proto.flowOut @ pipeline.js:319
    flow @ pipeline.js:87
    (anonymous) @ pipeline.js:64
    (anonymous) @ downloader.js:269
    xhr.onload @ text-downloader.js:39
    load (async)
    163.module.exports @ text-downloader.js:36
    153.Downloader.handle @ downloader.js:266
    flow @ pipeline.js:51
    flow @ pipeline.js:84
    160.proto.flowIn @ pipeline.js:275
    157.proto.append @ loading-items.js:508
    147.proto.load @ CCLoader.js:292
    (anonymous) @ boot.js:347
    (anonymous) @ CCGame.js:357
    onceWrapper @ event-target.js:190
    214.CallbacksInvoker.invoke @ callbacks-invoker.js:258
    mainLoop @ CCDirector.js:958
    callback @ CCGame.js:641
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    requestAnimationFrame (async)
    callback @ CCGame.js:635
    106render-flow.js:63 Uncaught TypeError: Cannot read property ‘_assembler’ of null
    at RenderFlow.245._proto._updateRenderData (render-flow.js:63)
    at RenderFlow.245._proto._children (render-flow.js:101)
    at RenderFlow.245._proto._children (render-flow.js:101)
    at RenderFlow.245._proto._children (render-flow.js:101)
    at Function.245.RenderFlow.visit (render-flow.js:203)
    at Object.render (index.js:182)
    at 51.cc.Director.mainLoop (CCDirector.js:955)
    at callback (CCGame.js:641)

  • 重现方式:点击重启游戏按钮

  • 之前哪个版本是正常的 :未尝试

  • 手机型号 :

  • 手机浏览器 :

  • 编辑器操作系统 :

  • 编辑器之前是否有其它报错 :

  • 出现概率:100%

  • 额外线索:

可以给个demo吗,restart 不该出现这样的问题。

bezierTest.zip (758.1 KB)

这是一个简单的demo就一个场景,一个重新开始游戏按钮

升级到 2.1.2 没有出现报错问题

好的,我升级一下引擎。另外发现audioEngine的方法stop(audioId)不起作用,我用了stopAllEffects()才起作用,是不是我的音乐文件太大还是怎么回事,cc.audioEngine.isMusicPlaying()也会出现问题,我点击关闭音乐,音乐还在播放,cc.audioEngine.isMusicPlaying()的返回值还是false

谢谢您了

我也是这个问题 背景音乐无法停止 ,楼主解决了吗 ?