puerts icon indicating copy to clipboard operation
puerts copied to clipboard

[Unity.Editor] 编辑器里面运行jsEnv(没有Play的状态), 在已连接调试器并且Editor重新编译代码的时候, Unity经常性崩溃

Open PleijaNet opened this issue 5 years ago • 2 comments

确定是 Puerts 导致的, 相关信息似乎是这里(也有可能是Monobehaviour 加了 [ExecuteAlways] 的Attribute并且在update里执行tick导致的) Unity: 2019.4.16 Puerts: ver.7/ver.8

Call Stack for Thread 14772: 0x00007FFFBEC0F784 (ntdll) ZwWaitForAlertByThreadId 0x00007FFFBEBD5071 (ntdll) RtlSleepConditionVariableSRW 0x00007FFFBC64AB69 (KERNELBASE) SleepConditionVariableSRW 0x00007FFF48EB7CF9 (puerts) CrashForExceptionInNonABICompliantCodeRange 0x00007FFF48B296A2 (puerts) CrashForExceptionInNonABICompliantCodeRange 0x00007FFF489A2900 (puerts) std::enable_shared_from_this<v8_inspector::V8Inspector::Counters>::weak_from_this 0x00007FFF492AE2A8 (puerts) CrashForExceptionInNonABICompliantCodeRange 0x00007FFFBD8E7034 (KERNEL32) BaseThreadInitThunk 0x00007FFFBEBBCEC1 (ntdll) RtlUserThreadStart

Call Stack for Thread 2264: 0x00007FFFBEC0F784 (ntdll) ZwWaitForAlertByThreadId 0x00007FFFBEBD5071 (ntdll) RtlSleepConditionVariableSRW 0x00007FFFBC64AB69 (KERNELBASE) SleepConditionVariableSRW 0x00007FFF48EB7CF9 (puerts) CrashForExceptionInNonABICompliantCodeRange 0x00007FFF48B296A2 (puerts) CrashForExceptionInNonABICompliantCodeRange 0x00007FFF489A2900 (puerts) std::enable_shared_from_this<v8_inspector::V8Inspector::Counters>::weak_from_this 0x00007FFF492AE2A8 (puerts) CrashForExceptionInNonABICompliantCodeRange 0x00007FFFBD8E7034 (KERNEL32) BaseThreadInitThunk 0x00007FFFBEBBCEC1 (ntdll) RtlUserThreadStart

======================================================== Unity Crash 报错文件: error.log

PleijaNet avatar Dec 20 '20 18:12 PleijaNet

应该是错误的引用了已经disposed的jsenv吧, 我在调用dispose()前后加editor的dialog卡住进程来检查,不是在调用dispose()的时候有问题, 应该是之后又引用了这个对象

PleijaNet avatar Dec 21 '20 00:12 PleijaNet

我先尝试下把JsEnv改成struct试试看能不能解决内存地址的问题, 这个issue应该不是正常使用导致的

PleijaNet avatar Dec 21 '20 00:12 PleijaNet