bedrock-dev / BedrockOptimizer

Some bug fixes and minor performance optimizations for BDS
18 stars 4 forks source link

红石优化可能引发崩溃 #4

Closed Redbeanw44602 closed 2 years ago

Redbeanw44602 commented 2 years ago

在上周卸载BdsOpt一周中,均未出现电路系统的崩溃日志。但昨天将插件装回后一个晚上出现了两次,希望大佬可以定位下问题。

日志

[Crashed!]
-- Unhandled Exception in -> bedrock_server_mod.exe
-- Exception Code: 0xC0000005
-- C++ STL Exception detected!

[StackTrace] Function CircuitSystem::updateBlocks at 0x7FF6C004EE70  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6C004EF77  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function LevelChunk::tick at 0x7FF6BFF47900  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BFF481AA  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function LevelChunkTickingSystem::_tickLevelChunksAroundActor at 0x7FF6BEF887A0  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BEF8885E  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function LevelChunkTickingSystem::_tickLevelChunksAroundActorView at 0x7FF6BEF88A90  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BEF88B75  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function ??$each@P6AXAEAV?$ViewedEntityContextT@VEntityContext@@V?$FlagComponent@UActorFlag@@@@VBlockSourceComponent@@VLoadedChunksComponent@@@@@Z$$V@?$View@$00VEntityContext@@VEntityRegistry@@U?$type_list@$$V@entt@@V?$FlagComponent@UActorFlag@@@@VBlockSourceComponent@@VLoadedChunksComponent@@@EntityRegistryBase@@QEAAXP6AXAEAV?$ViewedEntityContextT@VEntityContext@@V?$FlagComponent@UActorFlag@@@@VBlockSourceComponent@@VLoadedChunksComponent@@@@@Z@Z at 0x7FF6BEF87F70  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BEF88133  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function LevelChunkTickingSystem::tick at 0x7FF6BEF891E0  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BEF891FA  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function std::_Func_impl_no_alloc<<lambda_32d13dfb866b2b1150b222173a507f00>,void,ITickingSystem &,TickingSystemId>::_Do_call at 0x7FF6BEE8C700  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BEE8C719  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function `anonymous namespace'::DefaultEntitySystemsCollection::foreachTickingSystem at 0x7FF6BF2B7D70  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BF2B8097  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function EntitySystems::tick at 0x7FF6BEE8CFA0  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BEE8D043  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function <lambda_b44508b61f37969cf480280e06e54415>::operator() at 0x7FF6BFCCDEA0  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BFCCDFF4  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function Level::tickEntitySystems at 0x7FF6BFCE2A50  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BFCE2A8A  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function Level::tick at 0x7FF6BFCE1B40  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BFCE2018  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function ServerLevel::tick at 0x7FF6BF54EE60  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BF54EEA9  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function THookTemplate<2929696350043286095,4938590944480407134>::_hook at 0x7FFE95A1F3B0  [LiteLoader.Js.dll<2.6.0.24>]
-- At File E:\actions-runner\_work\LiteLoaderBDS\LiteLoaderBDS\ScriptEngine\API\EventAPI.cpp : Line 1226 
[StackTrace] Function ???????? at 0x7FFE95A1F691  [LiteLoader.Js.dll<2.6.0.24>]
[StackTrace] Function THookTemplate<2929696350043286095,4938590944480407134>::_hook at 0x7FFE951723C0  [LiteLoader.Lua.dll<2.6.0.24>]
-- At File E:\actions-runner\_work\LiteLoaderBDS\LiteLoaderBDS\ScriptEngine\API\EventAPI.cpp : Line 1226 
[StackTrace] Function ???????? at 0x7FFE951726B1  [LiteLoader.Lua.dll<2.6.0.24>]
[StackTrace] Function THookTemplate<2929696350043286095,4938590944480407134>::_hook at 0x7FFE97968EA0  [LiteLoader.dll<2.6.0.0 PRIVATEBUILD>]
-- At File C:\Users\RedbeanW\Desktop\BDS_Work\Project\LiteLoaderBDS\LiteLoader\Kernel\ScheduleAPI.cpp : Line 233 
[StackTrace] Function ???????? at 0x7FFE97968EAA  [LiteLoader.dll<2.6.0.0 PRIVATEBUILD>]
[StackTrace] Function ???????? at 0x7FFE96B1AA5E  [MAGICALCHEST.dll]
[StackTrace] Function GameSession::tick at 0x7FF6BF64B440  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BF64B478  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function Minecraft::update at 0x7FF6BF33BF80  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BF33C9E0  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function ServerInstance::_update at 0x7FF6BF358090  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BF35818D  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function <lambda_09545ac3fb7d475932bfc25c15253480>::operator() at 0x7FF6BF356670  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BF356AE2  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function std::thread::_Invoke<std::tuple<<lambda_09545ac3fb7d475932bfc25c15253480> >,0> at 0x7FF6BF3539D0  [bedrock_server_mod.exe<1.19.22.01>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FF6BF3539DE  [bedrock_server_mod.exe<1.19.22.01>]
[StackTrace] Function o__realloc_base at 0x7FFE9891F440  [ucrtbase.DLL<10.0.14393.2990>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FFE9891F4A0  [ucrtbase.DLL<10.0.14393.2990>]
[StackTrace] Function BaseThreadInitThunk at 0x7FFEAB6513F0  [KERNEL32.DLL<6.3.9600.20389>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FFEAB651412  [KERNEL32.DLL<6.3.9600.20389>]
[StackTrace] Function RtlUserThreadStart at 0x7FFEAB8054D0  [ntdll.dll<6.3.9600.20512>]
-- At File (null) : Line 0 
[StackTrace] Function ???????? at 0x7FFEAB805504  [ntdll.dll<6.3.9600.20512>]

dmp CrashDump_20220903_10-07-04.zip

hhhxiao commented 2 years ago

收到

hhhxiao commented 2 years ago

修了,采用了更保守点的策略,效果应该更不明显了,不过还有优化空间,后面再说,先保证不闪退。 mj不讲武德,函数代码做的事情和函数名有出入,导致我重写后出了点问题