tolua
tolua copied to clipboard
table.move 在安卓真机上crash(在tolua_runtime提了相同问题)
测试代码: function ArrayTest(obj1, obj2) Debugger.Log("table.move test") local a1 = {} a1[1] = obj1 a1[2] = obj2 a2 = {} table.move(a1, 1, #a1, 1, a2) Debugger.Log("table.move test end:" .. #a2) end ArrayTest({ a = 1, b = 1 }, { a = 2, b = 2 })
在UnityEditor可以,安卓真机crash,log如下:
2020-10-05 09:55:04.547 26052-26111/? I/Unity: 09:55:04.544-342: table.move test
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
2020-10-05 09:55:04.642 26052-26111/? E/CRASH: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000010 2020-10-05 09:55:04.642 26052-26111/? E/CRASH: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 2020-10-05 09:55:04.642 26052-26111/? E/CRASH: Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a' 2020-10-05 09:55:04.643 26052-26111/? E/CRASH: Build fingerprint: 'OnePlus/OnePlus3/OnePlus3T:8.0.0/OPR1.170623.032/1809142043:user/release-keys' 2020-10-05 09:55:04.643 26052-26111/? E/CRASH: Revision: '0' 2020-10-05 09:55:04.643 26052-26111/? E/CRASH: pid: 26052, tid: 26111, name: UnityMain >>> com.uncleciba.spacevs2 <<< 2020-10-05 09:55:04.643 26052-26111/? E/CRASH: r0 00000008 r1 00000000 r2 00000000 r3 00000018 2020-10-05 09:55:04.643 26052-26111/? E/CRASH: r4 00000003 r5 a473b7b8 r6 00000008 r7 00000000 2020-10-05 09:55:04.643 26052-26111/? E/CRASH: r8 00000008 r9 a4763658 sl 00000000 fp b658e280 2020-10-05 09:55:04.643 26052-26111/? E/CRASH: ip 00000000 sp cbcf9640 lr aaae1604 pc aaadf0f8 cpsr 000065ff 2020-10-05 09:55:04.643 26052-26111/? E/CRASH: backtrace: 2020-10-05 09:55:04.645 26052-26111/? E/CRASH: #00 pc 0001e0f8 /data/app/com.uncleciba.spacevs2-VOvzyKKvv-pZMJyezTmoYg==/lib/arm/libtolua.so 2020-10-05 09:55:04.645 26052-26111/? E/CRASH: #01 pc 00020600 /data/app/com.uncleciba.spacevs2-VOvzyKKvv-pZMJyezTmoYg==/lib/arm/libtolua.so 2020-10-05 09:55:04.646 26052-26111/? E/CRASH: #02 il ........ at (wrapper managed-to-native) LuaInterface.LuaDLL.lua_pcall (intptr,int,int,int) <0xffffffff> 2020-10-05 09:55:04.646 26052-26111/? E/CRASH: #03 il 00000038 at LuaInterface.LuaStatePtr.LuaPCall (int,int,int) <0x00038> 2020-10-05 09:55:04.646 26052-26111/? E/CRASH: #04 il 00000067 at LuaInterface.LuaState.LuaLoadBuffer (byte[],string) <0x00067> 2020-10-05 09:55:04.646 26052-26111/? E/CRASH: #05 il 00000047 at LuaInterface.LuaState.DoFile (string) <0x00047>
是lua5.3吗