xlua_report_object_relationship() 会闪退
RT. Mac, Unity 2021.3.33f1 + xlua-v2.1.16_ndkr21b_with_win + Lua 5.4.1 版本,不是必现,但是概率非常大。
Obtained 41 stack frames. #0 0x007ff801c866b2 in _platform_strlen #1 0x00000160126921 in mono_string_new_checked #2 0x0000016014a824 in mono_string_new_handle #3 0x000001600e977d in ves_icall_string_new_wrapper #4 0x00000144371e87 in (Unknown) #5 0x00000188ef2d78 in (wrapper managed-to-native) XLua.LuaDLL.Lua:xlua_report_object_relationship (intptr,XLua.LuaDLL.ObjectRelationshipReport) [{0x7fe995bb37a0} + 0xa8] (0x188ef2cd0 0x188ef2e1d) [0x14ff02a80 - Unity Child Domain] #6 0x00000188ef0773 in XLua.LuaMemoryLeakChecker:StopCheck (XLua.LuaEnv,bool) [{0x7fe995d0fb98} + 0x173] [/Volumes/disk2/P6/Engine3.0/Assets/Scripts/3rd/XLua/Src/LuaMemoryLeakChecker/LuaMemoryLeakChecker.cs :: 354u] (0x188ef0600 0x188ef086e) [0x14ff02a80 - Unity Child Domain] #7 0x0000015ff6b63c in mono_jit_runtime_invoke #8 0x0000016012101b in do_runtime_invoke #9 0x00000160120f58 in mono_runtime_invoke #10 0x00000101161aa7 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) #11 0x0000010113df36 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) #12 0x00000101100b91 in MonoBehaviour::CallMethodIfAvailable(int) #13 0x00000101100a36 in MonoBehaviour::CallUpdateMethod(int) #14 0x00000100b5c49c in void BaseBehaviourManager::CommonUpdate<BehaviourManager>() #15 0x00000100b5c26d in BehaviourManager::Update() #16 0x00000100da0980 in InitPlayerLoopCallbacks()::UpdateScriptRunBehaviourUpdateRegistrator::Forward() #17 0x00000100d90ead in ExecutePlayerLoop(NativePlayerLoopSystem*) #18 0x00000100d90e65 in ExecutePlayerLoop(NativePlayerLoopSystem*) #19 0x00000100d91305 in PlayerLoop() #20 0x0000010210e3f3 in EditorPlayerLoop::Execute()
可能是out of memory了。
================================================================= Native Crash Reporting Got a UNKNOWN while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application.
Managed Stacktrace:
at <0xffffffff>
at System.Object:__icall_wrapper_ves_icall_string_new_wrapper <0x000c2>
at <>c__DisplayClass8_0:<getRelationship>b__0 <0x00122>
at <0xffffffff>
at XLua.LuaDLL.Lua:xlua_report_object_relationship <0x00106>
at QT.LuaMemoryLeakChecker:getRelationship <0x003ca>
也出现类似问题,lua5.4.7