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

基于UE5.2.0和Unlua2.3.6的项目,非PIE模式运行游戏经常遇到Unlua注册蓝图反射类型时因断言错误导致的崩溃,错误日志截图如下: #720

Open
AlexMeng1986 opened this issue Aug 11, 2024 · 1 comment

Comments

@AlexMeng1986
Copy link

AlexMeng1986 commented Aug 11, 2024

屏幕截图 2024-08-11 163056

断言错误直接原因是类FClassRegistry中两个TMap数据成员Classes和Name2Classes缓存的内容出现了不一致,游戏运行过程中执行GC销毁某些UClass会调用UClassRegistry的NotifyUObjectDeleted函数,但该函数并没有因该UClass的销毁而去移除Classes和Name2Classes中对应元素,这就导致Classes和Name2Class缓存了已经析构掉的、数据败坏的UClass,所以当引擎重用上述UClass内存的时候会导致Name2Classes中没有,而Classes中有,就发生了断言错误导致的崩溃。请问应该如何解决该类问题呢?

@qqwx1986
Copy link

这个问题在Release2.3.6 出现很频繁(打包后),但是用git拉最新的master会好些,因为后续有个修改dd4d7cc 改了一部分,但是问题好像还是会出现,然后DelegateRegistry也会有类似的问题
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants