puerts
puerts copied to clipboard
[unity]执行setInterval后,操作chrome控制台卡死
error log | 日志或报错信息
- unity无响应,只能重启电脑
context | 编译/运行环境
- mac os 11.4
- unity 2020.3.19f1
- 官方unity demo【puerts_unity_demo】
how to reproduce | 复现步骤
1.使用 01_JsCallCs
2.开启debugPort jsEnv = new JsEnv(new DefaultLoader(), 8080);
3.增加update jsEnv.Tick();
4.执行setInterval
jsEnv.Eval(@" setInterval(() => { console.log('1'); }, 1000) ");
5.打开chorme进入调试 devtools://devtools/bundled/inspector.html?v8only=true&ws=127.0.0.1:8080
6. 随意执行 console.log("hello world")
7. 弹出“Developer Tools Access”需要控制另一个进程,以便继续调试
8. 无论继续还是拒绝都会卡死电脑
more | 其他
- 在vscode debug console输入命令,执行不生效,能否可以像在chrome中操作控制台一样
- 不执行setInterval,chrome控制台可以正常操作
可以尝试一下改用 v8 版本plugin。
老版本确认也有问题
#
# Fatal error in , line 0
# Check failed: !isolate->has_pending_exception().
#
#
#
#FailureMessage Object: 0x7ffeebd356b0
==== C stack trace ===============================
0 puerts 0x00000001606e1f63 v8::base::debug::StackTrace::StackTrace() + 19
1 puerts 0x00000001606e7d4b v8::platform::(anonymous namespace)::PrintStackTrace() + 27
2 puerts 0x00000001606dbf83 V8_Fatal(char const*, ...) + 323
3 puerts 0x00000001608944b1 v8::internal::(anonymous namespace)::ConsoleCall(v8::internal::Isolate*, v8::internal::BuiltinArguments const&, void (v8::debug::ConsoleDelegate::*)(v8::debug::ConsoleCallArguments const&, v8::debug::ConsoleContext const&)) + 1201
4 puerts 0x00000001608908b5 v8::internal::Builtin_ConsoleLog(int, unsigned long*, v8::internal::Isolate*) + 53
5 puerts 0x000000016075e639 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 57
6 puerts 0x00000001606f7a42 Builtins_InterpreterEntryTrampoline + 194
7 puerts 0x00000001606f1979 Builtins_ArgumentsAdaptorTrampoline + 185
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) Puerts.PuertsDLL.InvokeJSFunction (intptr,bool) [0x00014] in <6848bc02c3d24aeda1d02c1aa7464e56>:0
at Puerts.JsEnv/<>c.<Tick>b__48_0 (intptr) [0x00001] in /Volumes/DISK/_CODE_/puerts@stable/puerts_unity_demo/Assets/Puerts/Src/JsEnv.cs:532
at System.Collections.Generic.List`1<intptr>.ForEach (System.Action`1<intptr>) [0x00031] in <eae584ce26bc40229c1b1aa476bfa589>:0
at Puerts.JsEnv.Tick () [0x0004c] in /Volumes/DISK/_CODE_/puerts@stable/puerts_unity_demo/Assets/Puerts/Src/JsEnv.cs:530
at PuertsTest.TypedValue.Update () [0x00001] in /Volumes/DISK/_CODE_/puerts@stable/puerts_unity_demo/Assets/Examples/08_TypedValue/TypedValue.cs:28
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x00020] in <eae584ce26bc40229c1b1aa476bfa589>:0
Native stacktrace:
0 libmonobdwgc-2.0.dylib 0x000000014262bc85 mono_handle_native_crash + 242
1 libmonobdwgc-2.0.dylib 0x000000014258bf8c mono_sigill_signal_handler + 46
2 libsystem_platform.dylib 0x00007fff2055ed7d _sigtramp + 29
3 ??? 0x0000000000000000 0x0 + 0
4 puerts 0x00000001606dbf90 _Z9V8_DcheckPKciS0_ + 0
5 puerts 0x00000001608944b1 _ZN2v88internal12_GLOBAL__N_111ConsoleCallEPNS0_7IsolateERKNS0_16BuiltinArgumentsEMNS_5debug15ConsoleDelegateEFvRKNS7_20ConsoleCallArgumentsERKNS7_14ConsoleContextEE + 1201
6 puerts 0x00000001608908b5 _ZN2v88internal18Builtin_ConsoleLogEiPmPNS0_7IsolateE + 53
7 puerts 0x000000016075e639 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 57
8 puerts 0x00000001606f7a42 Builtins_InterpreterEntryTrampoline + 194
9 puerts 0x00000001606f1979 Builtins_ArgumentsAdaptorTrampoline + 185
Debug info from gdb:
(lldb) command source -s 0 '/tmp/mono-gdb-commands.GYwvRF'
Executing commands in '/tmp/mono-gdb-commands.GYwvRF'.
(lldb) process attach --pid 51021
Process 51021 stopped
* thread #1, name = 'Main Thread', stop reason = signal SIGSTOP
frame #0: 0xffffffffffffffff
Target 0: (No executable module.) stopped.
TODO:确认#698 是否相关