OGSR-Engine icon indicating copy to clipboard operation
OGSR-Engine copied to clipboard

Catastrophic save bug

Open ketxxx opened this issue 2 years ago • 4 comments

I don't know the exact cause of this but here is a log dump and link to a video of the CTD in "action". I've tried starting a new game in case the CTD is just a fluke but the exact same thing happens, I've also thoroughly checked the files changed since this started happening and there is no errors on my part that I can see.

EDIT: After more digging based on the information I have this CTD seems to be being caused by the save state system in the engine being totally borked and/or because of the beta LuaJit the engine is now using.

Video DL link: https://mega.nz/file/H951xaBJ#ijwMwkKS7I1MbgouGVLJforJttH_a35ZFILQa4Z6mVI

Log:

[02.11.21 19:02:45.601] * Saving spawns...
[02.11.21 19:02:45.601] * Saving objects...
[02.11.21 19:02:45.643] * 19345 objects are successfully saved
[02.11.21 19:02:45.650] * Game shit.sav is successfully saved to file 'c:\users\public\documents\stalker-shoc\savedgames\shit.sav'
[02.11.21 19:02:45.656] ! [R_occlusion::cleanup_lost]: cleanup 14 lost queries
[02.11.21 19:02:59.457] 
FATAL ERROR

[error]Expression    : FATAL ERROR
[error]Function      : CInifile::r_section
[error]File          : d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrcore\xr_ini.cpp
[error]Line          : 358
[error]Description   : Can't open section 'acStrelok'

[02.11.21 19:02:59.457] ***************************[ScriptCrashHandler]**********************************
[02.11.21 19:02:59.457] stack traceback:
	[C]: in function 'CSavedGameWrapper'
	...chernobyl\gamedata\scripts\ui_mm_save_load_dialog.script:61: in function 'file_data'
	...chernobyl\gamedata\scripts\ui_mm_save_load_dialog.script:251: in function 'OnListItemClickedLoad'
	...chernobyl\gamedata\scripts\ui_mm_save_load_dialog.script:214: in function <...chernobyl\gamedata\scripts\ui_mm_save_load_dialog.script:210>
[02.11.21 19:02:59.457] 	Locals: 
[02.11.21 19:02:59.457] 	 Userdata: (*temporary)
[02.11.21 19:02:59.457] 	 string (*temporary) : shit
[02.11.21 19:02:59.457] 	 Userdata: (*temporary)
[02.11.21 19:02:59.457] 	End
[02.11.21 19:02:59.457] 	Locals: 
[02.11.21 19:02:59.457] 	 string fname : shit
[02.11.21 19:02:59.458] 	End
[02.11.21 19:02:59.458] 	Locals: 
[02.11.21 19:02:59.458] 	 Userdata: self
[02.11.21 19:02:59.458] 			 Userdata: self.owner
[02.11.21 19:02:59.458] 					 Userdata: self.owner.save_dlg
[02.11.21 19:02:59.458] 							 number self.owner.save_dlg.msgbox_id : 0.000000
[02.11.21 19:02:59.458] 							 userdata self.owner.save_dlg.form : (CUIStatic): 00000202708CF780
[02.11.21 19:02:59.458] 							 string self.owner.save_dlg.new_save : shit
[02.11.21 19:02:59.458] 							 boolean self.owner.save_dlg.is_save_dlg : true
[02.11.21 19:02:59.458] 							 userdata self.owner.save_dlg.message_box : (CUIMessageBoxEx): 0000020274EEAFC0
[02.11.21 19:02:59.458] 					 userdata self.owner.shniaga : (CUIMMShniaga): 0000020274E14D90
[02.11.21 19:02:59.458] 					 number self.owner.mbox_mode : 0.000000
[02.11.21 19:02:59.458] 					 userdata self.owner.message_box : (CUIMessageBoxEx): 0000020274EEFCF0
[02.11.21 19:02:59.458] 			 number self.msgbox_id : 0.000000
[02.11.21 19:02:59.458] 			 userdata self.file_data : (CUIStatic): 00000202708D86E0
[02.11.21 19:02:59.458] 			 userdata self.file_caption : (CUIStatic): 00000202708D7D30
[02.11.21 19:02:59.458] 			 userdata self.form : (CUIStatic): 00000202708D5C40
[02.11.21 19:02:59.458] 			 userdata self.message_box : (CUIMessageBoxEx): 0000020274EEC820
[02.11.21 19:02:59.458] 	 userdata list_box : (CUIListWnd): 000002027118E8F0
[02.11.21 19:02:59.458] 	 userdata picture : (CUIStatic): 00000202708D7950
[02.11.21 19:02:59.458] 	 number itm_index : 0.000000
[02.11.21 19:02:59.458] 	 Userdata: item
[02.11.21 19:02:59.458] 			 userdata item.fage : (CUIStatic): 00000202708D7570
[02.11.21 19:02:59.458] 			 userdata item.fn : (CUIStatic): 00000202708D6020
[02.11.21 19:02:59.458] 	 string item_text : shit
[02.11.21 19:02:59.458] 	 function (*temporary) : [[function]]
[02.11.21 19:02:59.458] 	 number (*temporary) : 0.000000
[02.11.21 19:02:59.458] 	End
[02.11.21 19:02:59.458] 	Locals: 
[02.11.21 19:02:59.458] 	 Userdata: self
[02.11.21 19:02:59.458] 			 Userdata: self.owner
[02.11.21 19:02:59.458] 					 Userdata: self.owner.save_dlg
[02.11.21 19:02:59.458] 							 number self.owner.save_dlg.msgbox_id : 0.000000
[02.11.21 19:02:59.458] 							 userdata self.owner.save_dlg.form : (CUIStatic): 00000202708CF780
[02.11.21 19:02:59.458] 							 string self.owner.save_dlg.new_save : shit
[02.11.21 19:02:59.458] 							 boolean self.owner.save_dlg.is_save_dlg : true
[02.11.21 19:02:59.458] 							 userdata self.owner.save_dlg.message_box : (CUIMessageBoxEx): 0000020274EEAFC0
[02.11.21 19:02:59.458] 					 userdata self.owner.shniaga : (CUIMMShniaga): 0000020274E14D90
[02.11.21 19:02:59.458] 					 number self.owner.mbox_mode : 0.000000
[02.11.21 19:02:59.458] 					 userdata self.owner.message_box : (CUIMessageBoxEx): 0000020274EEFCF0
[02.11.21 19:02:59.458] 			 number self.msgbox_id : 0.000000
[02.11.21 19:02:59.458] 			 userdata self.file_data : (CUIStatic): 00000202708D86E0
[02.11.21 19:02:59.458] 			 userdata self.file_caption : (CUIStatic): 00000202708D7D30
[02.11.21 19:02:59.458] 			 userdata self.form : (CUIStatic): 00000202708D5C40
[02.11.21 19:02:59.458] 			 userdata self.message_box : (CUIMessageBoxEx): 0000020274EEC820
[02.11.21 19:02:59.458] 	End
[02.11.21 19:02:59.458] *********************************************************************************
[02.11.21 19:02:59.458] ********************************************************************************
[02.11.21 19:02:59.458] !![LogStackTrace] Thread: [X-RAY Primary thread]
[02.11.21 19:02:59.608] !!stack trace:
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrCore.dll], AddrPC.Offset: [00007FF8E7353E58], Fun: [BuildStackTrace()] + [48 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrcore\stacktrace_collector.cpp-->152]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrCore.dll], AddrPC.Offset: [00007FF8E737A7E1], Fun: [LogStackTrace()] + [73 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrcore\xrdebugnew.cpp-->58] + [13 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrCore.dll], AddrPC.Offset: [00007FF8E737A626], Fun: [xrDebug::backend()] + [174 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrcore\xrdebugnew.cpp-->172]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrCore.dll], AddrPC.Offset: [00007FF8E737A563], Fun: [xrDebug::fatal()] + [131 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrcore\xrdebugnew.cpp-->252]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrCore.dll], AddrPC.Offset: [00007FF8E737789A], Fun: [CInifile::r_section()] + [250 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrcore\xr_ini.cpp-->359]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrCore.dll], AddrPC.Offset: [00007FF8E7377AE7], Fun: [CInifile::r_string()] + [99 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrcore\xr_ini.cpp-->367]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrCore.dll], AddrPC.Offset: [00007FF8E7377A71], Fun: [CInifile::r_clsid()] + [9 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrcore\xr_ini.cpp-->506]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B687135A], Fun: [F_entity_Create()] + [78 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\common_ai\xrserver_factory.cpp-->14] + [58 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B657D1E0], Fun: [CALifeObjectRegistry::get_object()] + [248 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\alife_object_registry.cpp-->123] + [5 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B6586555], Fun: [CSavedGameWrapper::CSavedGameWrapper()] + [717 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\saved_game_wrapper.cpp-->98]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\Luabind.dll], AddrPC.Offset: [000000018000A907], Fun: [luabind::detail::class_rep::constructor_dispatcher()] + [259 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\luabind\src\class_rep.cpp-->491] + [30 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\LuaJIT.dll], AddrPC.Offset: [00007FF8B9315490], Fun: [lj_BC_FUNCC()] + [66 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\LuaJIT.dll], AddrPC.Offset: [00007FF8B931F0BB], Fun: [lua_pcall()] + [171 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\luajit\src\lj_api.c-->1144]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\Luabind.dll], AddrPC.Offset: [000000018000EB84], Fun: [luabind::detail::pcall()] + [100 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\luabind\src\pcall.cpp-->40] + [16 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B657D812], Fun: [luabind::detail::proxy_functor_void_caller<luabind::object const *>::~proxy_functor_void_caller<luabind::object const *>()] + [74 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\luabind\luabind\functor.hpp-->292] + [16 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B657D749], Fun: [CScriptCallbackEx<void>::operator()<>()] + [105 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\script_callback_ex.h-->181] + [35 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B69D7E1C], Fun: [CUIDialogWndEx::SendMessageA()] + [184 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\ui\uiscriptwnd.cpp-->53]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B69F8F78], Fun: [CUIListWnd::SendMessageA()] + [416 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\ui\uilistwnd.cpp-->352] + [16 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B69DF5DF], Fun: [CUIButton::OnClick()] + [39 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\ui\uibutton.cpp-->141]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B69DF4DB], Fun: [CUIButton::OnMouse()] + [151 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\ui\uibutton.cpp-->137]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B69C1CA4], Fun: [CUIWindow::OnMouse()] + [744 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\ui\uiwindow.cpp-->370] + [91 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B69F8D52], Fun: [CUIListWnd::OnMouse()] + [134 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\ui\uilistwnd.cpp-->501] + [18 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B69C1CA4], Fun: [CUIWindow::OnMouse()] + [744 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\ui\uiwindow.cpp-->370] + [91 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B69C1CA4], Fun: [CUIWindow::OnMouse()] + [744 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\ui\uiwindow.cpp-->370] + [91 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B69BFC10], Fun: [CUIDialogWnd::IR_OnKeyboardPress()] + [160 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\ui\uidialogwnd.cpp-->79] + [28 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B6970A24], Fun: [CMainMenu::IR_OnKeyboardPress()] + [132 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\mainmenu.cpp-->254]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrGame.dll], AddrPC.Offset: [00007FF8B6970896], Fun: [CMainMenu::IR_OnMousePress()] + [50 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xrgame\mainmenu.cpp-->207]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF664FA766F], Fun: [CInput::MouseUpdate()] + [351 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xr_3da\xr_input.cpp-->261] + [26 byte(s)]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF664FA8434], Fun: [CInput::OnFrame()] + [84 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xr_3da\xr_input.cpp-->428]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF664FDCD48], Fun: [CRegistrator<pureFrame>::Process()] + [84 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xr_3da\pure.h-->86]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF664FDBE28], Fun: [CRenderDevice::FrameMove()] + [292 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xr_3da\device.cpp-->443]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF664FDC197], Fun: [CRenderDevice::on_idle()] + [223 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xr_3da\device.cpp-->214]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF664FDC97E], Fun: [CRenderDevice::message_loop()] + [98 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xr_3da\device.cpp-->316]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF664FDBFFB], Fun: [CRenderDevice::Run()] + [411 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xr_3da\device.cpp-->389]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF664F9EDA8], Fun: [Startup()] + [296 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xr_3da\x_ray.cpp-->218]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF664F9F11E], Fun: [WinMain_impl()] + [478 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xr_3da\x_ray.cpp-->418]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF664F9C7F8], Fun: [WinMain()] + [72 byte(s)], File-->Line: [d:\a\ogsr-engine\ogsr-engine\ogsr_engine\xr_3da\x_ray.cpp-->439]
! Module: [F:\S.T.A.L.K.E.R. - Shadow of Chernobyl\bin_x64\xrEngine.exe], AddrPC.Offset: [00007FF664FFE12A], Fun: [__scrt_common_main_seh()] + [262 byte(s)], File-->Line: [d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl-->288] + [33 byte(s)]
! Module: [C:\Windows\System32\KERNEL32.DLL], AddrPC.Offset: [00007FF9092C7034], Fun: [BaseThreadInitThunk()] + [20 byte(s)]
! Module: [C:\Windows\SYSTEM32\ntdll.dll], AddrPC.Offset: [00007FF90A462651], Fun: [RtlUserThreadStart()] + [33 byte(s)]

ketxxx avatar Nov 02 '21 19:11 ketxxx

EDIT: After more digging based on the information I have this CTD seems to be being caused by the save state system in the engine being totally borked and/or because of the beta LuaJit the engine is now using.

Try to use LuaJIT.dll from engine version 2.1.242, then this problem does not appear?

xrSimpodin avatar Nov 03 '21 19:11 xrSimpodin

I'm just in the process of restoring an older build and applying the most recent changes to that for testing in case theres some file corruption (no idea how that would have happened), but that older lua dll on the problem build didn't help. I did get some different CTDs though so I'll attach the log. I'll let you know how things go after finishing the file restoration on my end.

logs.zip

ketxxx avatar Nov 03 '21 19:11 ketxxx

I have traced the exact cause of the problem. I gave Nimble and Snitch new basic fetch tasks for the player to do, here is where the very strange behaviour comes in; the tasks work perfectly, the player can complete as many of them as they wish the issue is specifically to do with these NPCs which leads me to look at their AI. Is there anything you can identify in OGSR that would cause this behaviour as both NPCs already have a task in the vanilla game the player can do and that doesn't cause these save CTDs.

While I'm thinking about it I also found the below bugs in other OGSR builds so you might be aware and/or fixed them already but can't remember if I ever reported them;

Commenting out or removing annoying audio lines, such as the "get out of here stalker!" results in a CTD with OGSR, you either have to put the audio file back or create a dummy file. With vanilla X-Ray you could just comment out these annoying one liner audio files in sound_theme.script I think it is.

The following mutants cause a CTD in SoC; Burer (CoP), Chimera (CoP), Snork (CoP), animation name CTD Crow (CS, CoP), AI CTD Giant (CoP), bone CTD

ketxxx avatar Nov 03 '21 23:11 ketxxx

Any news on this issue? I've recently had time to look into it again but I'm still not finding any common cause for it - it simply shouldn't be happening. Making things even more unusual is that if Wolf survives late into the game he will give you the same jobs he had at the start of the game and you can go and do those without this catastrophic save CTD so it doesn't look to be linked to unique NPC class or their community either.

ketxxx avatar Jun 08 '22 15:06 ketxxx