Tencent/puerts

[Unity] Bug: Crash on LoadType

Closed this issue · 3 comments

前置阅读 | Pre-reading

Puer的版本 | Puer Version

Latest

Unity的版本 | Unity Version

2021.3

发生在哪个平台 | Platform

Editor(mac)

错误信息 | Error Message

Process: Unity [82341]
Path: /Applications/Unity/*/Unity.app/Contents/MacOS/Unity
Identifier: com.unity3d.UnityEditor5.x
Version: Unity version 2021.3.31f1 (2021.3.31f1)
Code Type: ARM-64 (Native)
Parent Process: Unity Hub [466]
Responsible: Unity Hub [466]
User ID: 501

Date/Time: 2024-04-27 14:26:10.4580 +0300
OS Version: macOS 14.0 (23A344)
Report Version: 12
Anonymous UUID: 18A13659-368B-D301-3925-2FE15E284112

Sleep/Wake UUID: 865E9812-A163-4784-A109-9E640C301B32

Time Awake Since Boot: 200000 seconds
Time Since Wake: 1075 seconds

System Integrity Protection: enabled

Crashed Thread: 0 tid_103 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGILL)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000016a607ff0
Exception Codes: 0x0000000000000002, 0x000000016a607ff0

Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4
Terminating Process: Unity [82341]

VM Region Info: 0x16a607ff0 is in 0x166e04000-0x16a608000; bytes after start: 58736624 bytes before end: 15
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
mapped file 166dfc000-166e04000 [ 32K] r--/rwx SM=COW ...t_id=74d8ce67
---> STACK GUARD 166e04000-16a608000 [ 56.0M] ---/rwx SM=NUL ... for thread 0
Stack 16a608000-16ae04000 [ 8176K] rw-/rwx SM=SHM thread 0

问题重现 | Bug reproduce

I am binding UniTask, the type that it breaks on is Cysharp.Threading.Tasks.UniTask from debugging, I can see that the last call for PuertsDLL.ReturnClass is what's the causing the crash, not sure if it has to do with this type specifically or maybe there's a limit to how many types you can register?

UPDATE: Had the same issue accessing other types like GameObject or Transform. I am also just trying to console.log() the type itself without actually working with instances.

Might be related to my other issue #1709

Was an issue from my side!