用了bundle,ide正常,ios真机报错

Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 6998, TID: 1796540, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4 CommonLobby3x-mobile 0x00000001047905ec _ZN2cc3gfx14CCMTLSwapchain6doInitERKNS0_13SwapchainInfoE + 176
5 CommonLobby3x-mobile 0x000000010473dd58 _ZN2cc3gfx9Swapchain10initializeERKNS0_13SwapchainInfoE + 144
6 CommonLobby3x-mobile 0x000000010471eba8 _ZZN2cc3gfx14SwapchainAgent6doInitERKNS0_13SwapchainInfoEEN13SwapchainInit7executeEv + 32
7 CommonLobby3x-mobile 0x000000010418bbb8 _ZN2cc12MessageQueue15executeMessagesEv + 68
8 CommonLobby3x-mobile 0x000000010418bc14 _ZN2cc12MessageQueue13flushMessagesEv + 52
9 CommonLobby3x-mobile 0x000000010418b4c0 _ZN2cc12MessageQueue18consumerThreadLoopEv + 64
10 CommonLobby3x-mobile 0x00000001041946b4 ZNSt3__18__invokeB7v160006IMN2cc12MessageQueueEDoFvvEPS2_JEvEEDTcldsdeclsr3stdE7declvalIT0_EEclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT1_EEEEOS7_OS6_DpOS8 + 116
11 CommonLobby3x-mobile 0x0000000104194634 _ZNSt3__116__thread_executeB7v160006INS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEMN2cc12MessageQueueEDoFvvEJPS7_EJLm2EEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE + 48
12 CommonLobby3x-mobile 0x00000001041942e0 ZNSt3__114__thread_proxyB7v160006INS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN2cc12MessageQueueEDoFvvEPS8_EEEEEPvSD + 84
13 libsystem_pthread.dylib 0x000000020dfcb4d4 _pthread_start + 136
14 libsystem_pthread.dylib 0x000000020dfcaa10 thread_start + 8
Main Thread Checker: UI API called on a background thread: -[UIView layer]
PID: 6998, TID: 1796540, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4 CommonLobby3x-mobile 0x00000001047905ec _ZN2cc3gfx14CCMTLSwapchain6doInitERKNS0_13SwapchainInfoE + 176
5 CommonLobby3x-mobile 0x000000010473dd58 _ZN2cc3gfx9Swapchain10initializeERKNS0_13SwapchainInfoE + 144
6 CommonLobby3x-mobile 0x000000010471eba8 _ZZN2cc3gfx14SwapchainAgent6doInitERKNS0_13SwapchainInfoEEN13SwapchainInit7executeEv + 32
7 CommonLobby3x-mobile 0x000000010418bbb8 _ZN2cc12MessageQueue15executeMessagesEv + 68
8 CommonLobby3x-mobile 0x000000010418bc14 _ZN2cc12MessageQueue13flushMessagesEv + 52
9 CommonLobby3x-mobile 0x000000010418b4c0 _ZN2cc12MessageQueue18consumerThreadLoopEv + 64
10 CommonLobby3x-mobile 0x00000001041946b4 ZNSt3__18__invokeB7v160006IMN2cc12MessageQueueEDoFvvEPS2_JEvEEDTcldsdeclsr3stdE7declvalIT0_EEclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT1_EEEEOS7_OS6_DpOS8 + 116
11 CommonLobby3x-mobile 0x0000000104194634 _ZNSt3__116__thread_executeB7v160006INS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEMN2cc12MessageQueueEDoFvvEJPS7_EJLm2EEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE + 48
12 CommonLobby3x-mobile 0x00000001041942e0 ZNSt3__114__thread_proxyB7v160006INS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN2cc12MessageQueueEDoFvvEPS8_EEEEEPvSD + 84
13 libsystem_pthread.dylib 0x000000020dfcb4d4 _pthread_start + 136
14 libsystem_pthread.dylib 0x000000020dfcaa10 thread_start + 8
16:49:07 [INFO]: JS: [PHYSICS]: using bullet.
16:49:07 [DEBUG]: EventBus[Engine] has no listener found!
16:49:07 [ERROR]: JS: Error 5302, please go to https://github.com/cocos-creator/engine/blob/develop/EngineErrorMap.md#5302 to see details. Arguments: 21841UwWrBHyKbYnRoXtJra
16:49:07 [ERROR]: JS: Error 3817, please go to https://github.com/cocos-creator/engine/blob/develop/EngineErrorMap.md#3817 to see details. Arguments: Canvas, 3
16:49:07 [DEBUG]: JS: Corrupted component value: [object Object]
16:49:08 [INFO]: for2d/builtin-sprite|sprite-vs:vert|sprite-fs:frag|CC_USE_EMBEDDED_ALPHA0|USE_TEXTURE1|IS_GRAY0 compile succeed.

上面错误内容,image
项目这是启动场景,里面挂了脚本在Sys的bundle中,然后Sys的Bundle优先级为1
image

image
resource为8
image
resource里啥也没有,之前报错提示must load sys bundle first 我就把优先级提前了,现在是啥问题,似乎还是bundle的问题

3817

Sorry, the component of ‘%s’ which with an index of %s is corrupted! It has been removed.

5302

Can not find class ‘%s’

bundle优先级是从大到小排序的,最高是内置 internal 20,所以1其实是最低。:dog:

参考 https://docs.cocos.com/creator/manual/zh/asset/bundle.html#优先级

image ,你右击点导出资源包看是不是同一个场景多个包嵌套调用的情况

刚测试了下,把Subitems与Sys的互相依赖去掉了,测试发布仍是5302 3817错误

image
我把Sys的bundle等级改到20 就会报please load bundle first

我遇到过,你把bundle的优先级调一下,就是跟据场景加载的先后顺序调整

我的入场场景就 load一个bundle 是Sys ,这个Sys调成几呀,我调到20说Please load bundle Sys first,调低1又报:
16:49:07 [ERROR]: JS: Error 5302, please go to https://github.com/cocos-creator/engine/blob/develop/EngineErrorMap.md#5302 to see details. Arguments: 21841UwWrBHyKbYnRoXtJra
16:49:07 [ERROR]: JS: Error 3817, please go to https://github.com/cocos-creator/engine/blob/develop/EngineErrorMap.md#3817 to see details. Arguments: Canvas, 3
16:49:07 [DEBUG]: JS: Corrupted component value: [object Object]
16:49:08 [INFO]: for2d/builtin-sprite|sprite-vs:vert|sprite-fs:frag|CC_USE_EMBEDDED_ALPHA0|USE_TEXTURE1|IS_GRAY0 compile succeed.

吐血了,

吐血了吐血了

你代码在Sys下吗,你手动加载了Sys包吗

自定义的包使用里面的资源时都得手动加载

应该assetbundle load过了,是不是真机必须加路径,我没加路径 ide 网页都是好的,就真机不行

你先打包一个 web 试试。

大佬,web端正常的

层级问题,你加载某个bundle,该bundle依赖了sys的资源,而sys比你要加载的那个bundle的优先级要高~

破案了image
都拿出来放到主包,MainLoading中AssetBundle.loadBundle(“Sys”)再进行其他业务逻辑正常。
另bundle 优先级写的7