Tencent/puerts

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

Closed this issue · 5 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

和这个issue可能一样:#1619
在你的xcode重编译plugin试试呢?如果不行把v8也重编译下试试

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

哦,应该是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

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

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

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

按照上面的方式,修好了