LiteLDev / LeviLamina

A lightweight, modular and versatile mod loader for Minecraft Bedrock Edition, formerly known as LiteLoaderBDS
https://levimc.org/software/levilamina
GNU Lesser General Public License v3.0
1.14k stars 117 forks source link

LLSE插件在onJoin事件中获取并使用玩家的坐标时重载插件会导致崩溃 #1238

Closed FtyLollipop closed 1 year ago

FtyLollipop commented 1 year ago

异常模块

ScriptEngine (脚本引擎)

操作系统

Windows 11

LiteLoader 版本

2.12.4

BDS 版本

1.19.73.02

发生了什么?

LLSE插件在onJoin事件中获取并使用玩家的坐标,时ll reload会导致崩溃

复现此问题的步骤

  1. 在onJoin事件中logger.info(player.pos)
  2. 玩家进服/进服后退出
  3. 控制台ll reload

有关的日志/输出

[2023-04-30 20:26:08.010] [info] System Info: 
[2023-04-30 20:26:08.010] [info]   OS Version: 10.0.22621
[2023-04-30 20:26:08.011] [info]   Is Wine: false
[2023-04-30 20:26:08.011] [info]   CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
[2023-04-30 20:26:08.011] [info]   CPU Counts: 12
[2023-04-30 20:26:08.012] [info]   CPU Arch: x64
[2023-04-30 20:26:08.012] [info]   RAM: 16257 MB
[2023-04-30 20:26:08.012] [info]   Time: 2023-04-30T20:26:08.000+0800
[2023-04-30 20:26:08.012] [info] 
[2023-04-30 20:26:08.013] [info] Exception Info: 
[2023-04-30 20:26:08.013] [info]   Code: 0xC0000409
[2023-04-30 20:26:08.013] [info]   Module: ucrtbase.dll
[2023-04-30 20:26:08.013] [info]   Address: 0x7FF84626F61E
[2023-04-30 20:26:08.014] [info]   Flags: 0x1
[2023-04-30 20:26:08.014] [info]   Number of Parameters: 1
[2023-04-30 20:26:08.014] [info]   Parameter 0: 0x7
[2023-04-30 20:26:08.014] [info] 
[2023-04-30 20:26:08.015] [info] Registers: 
[2023-04-30 20:26:08.015] [info]   RAX: 0x0000000000000001  RBX: 0x000000599DDFE830  RCX: 0x0000000000000007
[2023-04-30 20:26:08.015] [info]   RDX: 0x000049E7B06CBE0A  RSI: 0x000000599DDFE1A0  RDI: 0x00000000FFFFFFFF
[2023-04-30 20:26:08.015] [info]   RBP: 0x000000599DDFD9B0  RSP: 0x000000599DDFD850  R8:  0x00007FF8462F0920
[2023-04-30 20:26:08.016] [info]   R9:  0x000000599DDFD7C8  R10: 0x0000000000000012  R11: 0x0000080080000020
[2023-04-30 20:26:08.016] [info]   R12: 0x0000000000000000  R13: 0x000000599DDFE340  R14: 0x000000599DDFDB60
[2023-04-30 20:26:08.016] [info]   R15: 0x000000599DDFDB90
[2023-04-30 20:26:08.016] [info]   RIP: 0x00007FF84626F61E  EFLAGS: 0x00000202
[2023-04-30 20:26:08.017] [info]   DR0: 0x0000000000000000  DR1: 0x0000000000000000  DR2: 0x0000000000000000
[2023-04-30 20:26:08.017] [info]   DR3: 0x0000000000000000  DR6: 0x0000000000000000  DR7: 0x0000000000000000
[2023-04-30 20:26:08.017] [info]   CS: 0x0033  DS: 0x0000   ES: 0x0000  FS: 0x0000   GS: 0x0000  SS: 0x002B
[2023-04-30 20:26:08.017] [info] 
[2023-04-30 20:26:08.017] [info] Last Assembly: 
[2023-04-30 20:26:08.018] [info]   0x7FF84626F61E --> int 0x29
[2023-04-30 20:26:08.018] [info] 
[2023-04-30 20:26:08.018] [info] Stacktrace: 
[2023-04-30 20:26:08.019] [info]   #0 at pc 0x7FF84626F5D0 ucrtbase.dll -> abort+0x4E
[2023-04-30 20:26:08.019] [info]   #1 at pc 0x7FF84626ED10 ucrtbase.dll -> terminate+0x29
[2023-04-30 20:26:08.020] [info]   #2 at pc 0x7FF82FCB1650 VCRUNTIME140_1.dll -> FindHandler<__FrameHandler4>+0x45B [frame.cpp:693L]
[2023-04-30 20:26:08.020] [info]   #3 at pc 0x7FF82FCB20B0 VCRUNTIME140_1.dll -> __InternalCxxFrameHandler<__FrameHandler4>+0x267 [frame.cpp:357L]
[2023-04-30 20:26:08.021] [info]   #4 at pc 0x7FF82FCB4070 VCRUNTIME140_1.dll -> __CxxFrameHandler4+0xA9 [risctrnsctrl.cpp:306L]
[2023-04-30 20:26:08.021] [info]   #5 at pc 0x7FFFB42B3DDC LiteLoader.Js.dll
[2023-04-30 20:26:08.022] [info]   #6 at pc 0x7FF848D93CF0 ntdll.dll -> RtlpExecuteHandlerForException+0xF
[2023-04-30 20:26:08.023] [info]   #7 at pc 0x7FF848D0E1D0 ntdll.dll -> RtlDispatchException+0x286
[2023-04-30 20:26:08.023] [info]   #8 at pc 0x7FF848D92CC0 ntdll.dll -> KiUserExceptionDispatch+0x2E
[2023-04-30 20:26:08.025] [info]   #9 at pc 0x7FF84644FD80 KERNELBASE.dll -> RaiseException+0x6C
[2023-04-30 20:26:08.025] [info]   #10 at pc 0x7FF82FC66630 VCRUNTIME140.dll -> _CxxThrowException+0x90 [throw.cpp:75L]
[2023-04-30 20:26:08.026] [info]   #11 at pc 0x7FFFB4223557 LiteLoader.Js.dll
[2023-04-30 20:26:08.026] [info]   #12 at pc 0x7FFFB422357A LiteLoader.Js.dll
[2023-04-30 20:26:08.026] [info]   #13 at pc 0x7FFFB3F5759D LiteLoader.Js.dll
[2023-04-30 20:26:08.026] [info]   #14 at pc 0x7FFFB41BED95 LiteLoader.Js.dll
[2023-04-30 20:26:08.027] [info]   #15 at pc 0x7FFFB41ED8AF LiteLoader.Js.dll
[2023-04-30 20:26:08.027] [info]   #16 at pc 0x7FFFB4226740 LiteLoader.Js.dll
[2023-04-30 20:26:08.028] [info]   #17 at pc 0x7FFFB42219F5 LiteLoader.Js.dll
[2023-04-30 20:26:08.028] [info]   #18 at pc 0x7FFFB724FB47 LiteLoader.dll
[2023-04-30 20:26:08.058] [info]   #19 at pc 0x7FF7A317C280 bedrock_server_mod.exe -> Level::tick+0x4F
[2023-04-30 20:26:08.060] [info]   #20 at pc 0x7FF7A30794E0 bedrock_server_mod.exe -> GameSession::tick+0x3B
[2023-04-30 20:26:08.061] [info]   #21 at pc 0x7FF7A2E5D4E0 bedrock_server_mod.exe -> Minecraft::update+0x7BA
[2023-04-30 20:26:08.062] [info]   #22 at pc 0x7FF7A269BF10 bedrock_server_mod.exe -> ServerInstance::_update+0xF2
[2023-04-30 20:26:08.063] [info]   #23 at pc 0x7FF7A269A2D0 bedrock_server_mod.exe -> <lambda_f2e707221d48fb1510572c959b70280b>::operator()+0x4C7
[2023-04-30 20:26:08.064] [info]   #24 at pc 0x7FF7A2696650 bedrock_server_mod.exe -> std::thread::_Invoke<std::tuple<<lambda_f2e707221d48fb1510572c959b70280b> >,0>+0xE
[2023-04-30 20:26:08.064] [info]   #25 at pc 0x7FF8462192D0 ucrtbase.dll -> thread_start<unsigned int (__cdecl*)(void *),1>+0x93
[2023-04-30 20:26:08.065] [info]   #26 at pc 0x7FF847942680 KERNEL32.DLL -> BaseThreadInitThunk+0x1D
[2023-04-30 20:26:08.065] [info]   #27 at pc 0x7FF848D4A9D0 ntdll.dll -> RtlUserThreadStart+0x28
[2023-04-30 20:26:08.065] [info] 
[2023-04-30 20:26:08.094] [info] Modules: 
[2023-04-30 20:26:08.094] [info]   0x7FF847460000  ADVAPI32.dll<6.2.22621.1485>
[2023-04-30 20:26:08.095] [info]   0x7FFFFEF20000  CONCRT140.dll<14.32.31332.0>
[2023-04-30 20:26:08.096] [info]   0x7FF846800000  CRYPT32.dll<6.2.22621.674>
[2023-04-30 20:26:08.096] [info]   0x7FF8457A0000  CRYPTBASE.DLL<6.2.22621.1>
[2023-04-30 20:26:08.096] [info]   0x7FF8458C0000  CRYPTSP.dll<6.2.22621.1>
[2023-04-30 20:26:08.096] [info]   0x7FF844C80000  DNSAPI.dll<6.2.22621.1485>
[2023-04-30 20:26:08.096] [info]   0x7FF845E90000  DPAPI.DLL<6.2.22621.1>
[2023-04-30 20:26:08.097] [info]   0x7FF8477E0000  GDI32.dll<6.2.22621.608>
[2023-04-30 20:26:08.097] [info]   0x7FF847B10000  IMM32.DLL<6.2.22621.1344>
[2023-04-30 20:26:08.097] [info]   0x7FF844C50000  IPHLPAPI.DLL<6.2.22621.1>
[2023-04-30 20:26:08.097] [info]   0x7FF847930000  KERNEL32.DLL<6.2.22621.1485>
[2023-04-30 20:26:08.098] [info]   0x7FF8463C0000  KERNELBASE.dll<6.2.22621.1555>
[2023-04-30 20:26:08.098] [info]   0x7FFFFAB60000  LLMoney.dll
[2023-04-30 20:26:08.098] [info]   0x7FFFFEA30000  LLPreLoader.dll
[2023-04-30 20:26:08.099] [info]   0x7FFFB3F10000  LiteLoader.Js.dll<2.12.4.0>
[2023-04-30 20:26:08.099] [info]   0x7FFFB2160000  LiteLoader.Lua.dll<2.12.4.0>
[2023-04-30 20:26:08.099] [info]   0x7FFFB1970000  LiteLoader.NodeJs.dll<2.12.4.0>
[2023-04-30 20:26:08.100] [info]   0x7FFFB11C0000  LiteLoader.Python.dll<2.12.4.0>
[2023-04-30 20:26:08.100] [info]   0x7FFFB7140000  LiteLoader.dll<2.12.4.0>
[2023-04-30 20:26:08.100] [info]   0x7FF82FCC0000  MSVCP140.dll<14.32.31332.0>
[2023-04-30 20:26:08.100] [info]   0x7FF847690000  NSI.dll<6.2.22621.1>
[2023-04-30 20:26:08.100] [info]   0x7FF846CC0000  OLEAUT32.dll<6.2.22621.608>
[2023-04-30 20:26:08.101] [info]   0x7FF847D00000  PSAPI.DLL<6.2.22621.1>
[2023-04-30 20:26:08.101] [info]   0x7FFFF72C0000  PermissionAPI.dll
[2023-04-30 20:26:08.101] [info]   0x7FF8476C0000  RPCRT4.dll<6.2.22621.1555>
[2023-04-30 20:26:08.101] [info]   0x7FF847A00000  SHCORE.dll<6.2.22621.900>
[2023-04-30 20:26:08.101] [info]   0x7FF848460000  SHELL32.dll<6.2.22621.1485>
[2023-04-30 20:26:08.102] [info]   0x7FF845390000  SSPICLI.DLL<6.2.22621.1485>
[2023-04-30 20:26:08.102] [info]   0x7FF825170000  Secur32.dll<6.2.22621.1>
[2023-04-30 20:26:08.102] [info]   0x7FF845A00000  UMPDC.dll<6.2.22621.1>
[2023-04-30 20:26:08.102] [info]   0x7FF847B50000  USER32.dll<6.2.22621.1485>
[2023-04-30 20:26:08.102] [info]   0x7FF845640000  USERENV.dll<6.2.22621.1>
[2023-04-30 20:26:08.103] [info]   0x7FF82FC60000  VCRUNTIME140.dll<14.32.31332.0>
[2023-04-30 20:26:08.103] [info]   0x7FF82FCB0000  VCRUNTIME140_1.dll<14.32.31332.0>
[2023-04-30 20:26:08.103] [info]   0x7FF83B5A0000  VERSION.dll<6.2.22621.1>
[2023-04-30 20:26:08.103] [info]   0x7FF83CFD0000  WINHTTP.dll<6.2.22621.1485>
[2023-04-30 20:26:08.103] [info]   0x7FF83D260000  WINMM.dll<6.2.22621.608>
[2023-04-30 20:26:08.104] [info]   0x7FF847510000  WS2_32.dll<6.2.22621.1>
[2023-04-30 20:26:08.104] [info]   0x7FF845AE0000  bcrypt.dll<6.2.22621.1344>
[2023-04-30 20:26:08.104] [info]   0x7FF846310000  bcryptPrimitives.dll<6.2.22621.1344>
[2023-04-30 20:26:08.105] [info]   0x7FF7A1D90000  bedrock_server_mod.exe
[2023-04-30 20:26:08.105] [info]   0x7FF8470D0000  combase.dll<6.2.22621.1485>
[2023-04-30 20:26:08.105] [info]   0x7FF843A80000  dbghelp.dll<6.2.22621.1>
[2023-04-30 20:26:08.105] [info]   0x7FF83CF90000  dhcpcsvc.DLL<6.2.22621.1344>
[2023-04-30 20:26:08.105] [info]   0x7FF83CFB0000  dhcpcsvc6.DLL<6.2.22621.1344>
[2023-04-30 20:26:08.106] [info]   0x7FF83B220000  fwpuclnt.dll<6.2.22621.1105>
[2023-04-30 20:26:08.106] [info]   0x7FF8469E0000  gdi32full.dll<6.2.22621.1344>
[2023-04-30 20:26:08.106] [info]   0x7FF845140000  kernel.appcore.dll<6.2.22621.1>
[2023-04-30 20:26:08.106] [info]   0x7FFFB6900000  libcrypto-1_1-x64.dll<1.1.1.10>
[2023-04-30 20:26:08.107] [info]   0x7FFFB6C50000  libcrypto-3-x64.dll<3.0.5.0>
[2023-04-30 20:26:08.107] [info]   0x7FFFAAA20000  libnode.dll<16.16.0.0>
[2023-04-30 20:26:08.107] [info]   0x7FFFFB2C0000  libssl-1_1-x64.dll<1.1.1.10>
[2023-04-30 20:26:08.107] [info]   0x7FFFE54B0000  libssl-3-x64.dll<3.0.5.0>
[2023-04-30 20:26:08.107] [info]   0x7FFFFFC40000  lua5.4.3.dll
[2023-04-30 20:26:08.107] [info]   0x7FF846760000  msvcp_win.dll<6.2.22621.608>
[2023-04-30 20:26:08.108] [info]   0x7FF847EA0000  msvcrt.dll<7.0.22621.608>
[2023-04-30 20:26:08.108] [info]   0x7FF8455A0000  mswsock.dll<6.2.22621.1>
[2023-04-30 20:26:08.108] [info]   0x7FF810B50000  napinsp.dll<6.2.22621.1>
[2023-04-30 20:26:08.108] [info]   0x7FF8122B0000  nlansp_c.dll<6.2.22621.1>
[2023-04-30 20:26:08.108] [info]   0x7FF848CF0000  ntdll.dll<6.2.22621.1485>
[2023-04-30 20:26:08.109] [info]   0x7FF845160000  ntmarta.dll<6.2.22621.1>
[2023-04-30 20:26:08.109] [info]   0x7FF846E60000  ole32.dll<6.2.22621.608>
[2023-04-30 20:26:08.109] [info]   0x7FF810B80000  pnrpnsp.dll<6.2.22621.1>
[2023-04-30 20:26:08.109] [info]   0x7FF845A20000  powrprof.dll<6.2.22621.1344>
[2023-04-30 20:26:08.109] [info]   0x7FFFB0D60000  python310.dll<3.10.9150.1013>
[2023-04-30 20:26:08.109] [info]   0x7FF83AD80000  rasadhlp.dll<6.2.22621.1>
[2023-04-30 20:26:08.110] [info]   0x7FF8450B0000  rsaenh.dll<6.2.22621.1>
[2023-04-30 20:26:08.110] [info]   0x7FF847000000  sechost.dll<6.2.22621.1555>
[2023-04-30 20:26:08.110] [info]   0x7FF848C50000  shlwapi.dll<6.2.22621.608>
[2023-04-30 20:26:08.110] [info]   0x7FFFB6800000  sqlite3.dll
[2023-04-30 20:26:08.111] [info]   0x7FF8461F0000  ucrtbase.dll<6.2.22621.608>
[2023-04-30 20:26:08.111] [info]   0x7FF846390000  win32u.dll<6.2.22621.1555>
[2023-04-30 20:26:08.111] [info]   0x7FF8440F0000  windows.storage.dll<6.2.22621.1485>
[2023-04-30 20:26:08.111] [info]   0x7FF810BA0000  winrnr.dll<6.2.22621.1>
[2023-04-30 20:26:08.111] [info]   0x7FF843FB0000  wintypes.dll<6.2.22621.1485>
[2023-04-30 20:26:08.112] [info]   0x7FF8173B0000  wshbth.dll<6.2.22621.1>

插件列表

20:34:13 INFO [Server] 插件列表 [7]
20:34:13 INFO [Server] - LLMoney [v2.12.0] (LLMoney.dll)
20:34:13 INFO [Server]   EconomyCore for LiteLoaderBDS
20:34:13 INFO [Server] - ScriptEngine-Lua [v2.12.4] (LiteLoader.Lua.dll)
20:34:13 INFO [Server]   Lua ScriptEngine for LiteLoaderBDS
20:34:13 INFO [Server] - PermissionAPI [v2.9.0] (PermissionAPI.dll)
20:34:13 INFO [Server]   Builtin & Powerful permission API for LiteLoaderBDS
20:34:13 INFO [Server] - ScriptEngine-QuickJs [v2.12.4] (LiteLoader.Js.dll)
20:34:13 INFO [Server]   Javascript ScriptEngine for LiteLoaderBDS
20:34:13 INFO [Server] - ScriptEngine-Python [v2.12.4] (LiteLoader.Python.dll)
20:34:13 INFO [Server]   Python ScriptEngine for LiteLoaderBDS
20:34:13 INFO [Server] - PlayerStatsTracker [v1.0.0] (PlayerStatsTracker.js)
20:34:13 INFO [Server]   Track player stats.
20:34:13 INFO [Server] - ScriptEngine-NodeJs [v2.12.4] (LiteLoader.NodeJs.dll)
20:34:13 INFO [Server]   Node.js ScriptEngine for LiteLoaderBDS
OEOTYAN commented 1 year ago

这种情况pos有可能是null,试试进行判定