Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Native] 通过cc.assetManager.loadAny 和 uuid 加载主包内资源时, 有意外报错 导致加载流程被阻塞. #17882

Open
finscn opened this issue Nov 19, 2024 · 1 comment
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@finscn
Copy link
Contributor

finscn commented Nov 19, 2024

Cocos Creator version

3.8.4

System information

android

Issue description

代码如下

        cc.assetManager.loadAny({ uuid: uuid },
            { bundle: 'main' },
            (err: Error, asset: cc.SpriteFrame) => {
                  // ... ...
            });

以上代码 在 web 和小程序里 都能正常执行. 但是在 原生环境执行, 出现下面的错误

image

对应的 引擎代码
image

在报这个错误后, 再过几秒钟, 要加载的资源还是被加载了出来.
但是 这个几秒钟明显时间过长 , 该资源为主包内的本地图片, 不到100k.
不知道是否是这个报错 引起了 内部的重试 等待 超时一类的机制, 导致加载时间过长.

Relevant error log output

No response

Steps to reproduce

如上

Minimal reproduction project

No response

@finscn finscn added Bug Needs Triage Needs to be assigned by the team labels Nov 19, 2024
@longchuan
Copy link
Contributor

loadAny本身是异步的,err会返回错误,需要在完成函数里处理才会不加载。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

2 participants