puerts icon indicating copy to clipboard operation
puerts copied to clipboard

[Unity] Bug: IOS 初始化的时候奔溃

Open xtutu opened this issue 11 months ago • 1 comments

前置阅读 | Pre-reading

Puer的版本 | Puer Version

2.0.4

Unity的版本 | Unity Version

2022.3.20

发生在哪个平台 | Platform

iOS

错误信息 | Error Message

xcode 版本 15.2 53cea893a41c43a1642f5e29c0bb870e

cd7eb7ae3ba0cb904581e3eabee6fd67

65a7f469f46c34eee84b80b12a108233 奔溃在这个位置。

奔溃信息: e983d8fd727061a1721e9a4be1ea439c

暂时就这些信息。

问题重现 | Bug reproduce

xtutu avatar Mar 05 '24 10:03 xtutu

和这个issue可能一样:https://github.com/Tencent/puerts/issues/1619 在你的xcode重编译plugin试试呢?如果不行把v8也重编译下试试

chexiongsheng avatar Mar 06 '24 01:03 chexiongsheng

项目里还装了: com.tencent.puerts.webgl 2.0.4 排查下来,发现:只要把这个删掉,IOS 就不会奔溃。

xtutu avatar Mar 06 '24 04:03 xtutu

哦,应该是com.tencent.puerts.webgl 2.0.4导致的,它下面有个cpp文件,里面有些符号和puerts plugin是一样的 https://github.com/zombieyang/puerts_unity_webgl_demo/blob/master/packages/webgl/upm/Runtime/Plugins/WebGL/puerts.cpp

chexiongsheng avatar Mar 06 '24 06:03 chexiongsheng

你试试在 https://github.com/zombieyang/puerts_unity_webgl_demo/blob/master/packages/webgl/upm/Runtime/Plugins/WebGL/puerts.cpp

加宏让这些代码只在webgl生效

#if !defined(__EMSCRIPTEN__)
//原来的代码
#endif

chexiongsheng avatar Mar 06 '24 07:03 chexiongsheng

按照上面的方式,修好了

xtutu avatar Mar 06 '24 08:03 xtutu