LeviLamina icon indicating copy to clipboard operation
LeviLamina copied to clipboard

NBT的奇怪崩溃(貌似与中文有关)

Open twoone-3 opened this issue 3 years ago • 1 comments

异常模块

Core(核心)

操作系统

Windows 11

LiteLoader版本

2.3.1

BDS版本

1.19

发生了什么?

使用CompoundTag服务器崩溃

复现此问题的步骤

	auto a = CompoundTag::fromSNBT(R"({
    "a24z": {
        "a4z": {},
        "az": [1f, 1f, 1f],
        "az3": "az2"
    },
    "列表": []
})");
	logger.warn("{}", a->get("列表")->toJson(4));

注:文件以UTF8保存

有关的日志/输出

[Crashed!]
-- Unhandled Exception in -> LiteLoader.dll
-- Exception Code: 0xC0000005
-- Minidump generated in Directory ./logs/Crash

[StackTrace] Function Tag::toJson at 0x7FFA9A66FC50  [LiteLoader.dll<2.3.1.2198>]
[StackTrace] Function entry at 0x7FFA9A02F520  [BDSpyrunner.dll]
-- At File C:\Users\31976\Desktop\BDSpyrunner\Init.cpp : Line 37
[StackTrace] Function THookTemplate<1745144914232631845,238647026>::_hook at 0x7FFA9A02FD80  [BDSpyrunner.dll]
-- At File C:\Users\31976\Desktop\BDSpyrunner\Init.cpp : Line 62
[StackTrace] Function __scrt_common_main_seh at 0x7FF79F1ADEC4  [bedrock_server_mod.exe<1.19.1.01>]
[StackTrace] Function BaseThreadInitThunk at 0x7FFB0FE554D0  [KERNEL32.DLL<6.2.22000.708>]
[StackTrace] Function RtlUserThreadStart at 0x7FFB102E4830  [ntdll.dll<6.2.22000.708>]

插件列表

BDSpyrunner

twoone-3 avatar Jun 23 '22 09:06 twoone-3

与string_span有关,使用string或string_view类型的key手动查找结果均正常,由于是MCAPI函数,暂时没有特别好的解决办法

xiaoqch avatar Jun 24 '22 11:06 xiaoqch