Serp
King
- Joined
- Apr 1, 2015
- Messages
- 661
Hello,
I already wrote here https://forums.civfanatics.com/threads/efficient-use-of-saveutilis.668750/#post-16061910 and here https://github.com/LoneGazebo/Community-Patch-DLL/issues/7510#issuecomment-808877363 , trying to find someone who is experienced in DLL modding.
I guess the Community Patch devs are very experienced and maybe even already solved the underlying problem.
Short summary:
Like Pazyryk already discovered in 2011, calling"gDLL->GetScriptSystem()" in the DLL to send an Event to lua, can freeze/hang the game: https://forums.civfanatics.com/thre...lua-table-data-through-game-save-load.442249/
I wonder if this problem was ever solved, because unlike Pazyryk wrote, this is not only true for the first autosave, it also happens randomly for other autosaves with his code.
At CP github are quite a lot open/closed issues with "freeze", while many of them are "not reproducable", so maybe never solved.
So it also might be in interest of Community Patch, to discuss this topic here, even if I use "my own" DLL.
edit:
I added more logs and it is "bool bResult = pkScriptSystem->CallHook(szName, args, value);" within CvLuaSupport.cpp instead, that is causing the random freeze when autosaving. Guess it has to do with the GameLock?
I already wrote here https://forums.civfanatics.com/threads/efficient-use-of-saveutilis.668750/#post-16061910 and here https://github.com/LoneGazebo/Community-Patch-DLL/issues/7510#issuecomment-808877363 , trying to find someone who is experienced in DLL modding.
I guess the Community Patch devs are very experienced and maybe even already solved the underlying problem.
Short summary:
Like Pazyryk already discovered in 2011, calling
I wonder if this problem was ever solved, because unlike Pazyryk wrote, this is not only true for the first autosave, it also happens randomly for other autosaves with his code.
At CP github are quite a lot open/closed issues with "freeze", while many of them are "not reproducable", so maybe never solved.
So it also might be in interest of Community Patch, to discuss this topic here, even if I use "my own" DLL.
edit:
I added more logs and it is "bool bResult = pkScriptSystem->CallHook(szName, args, value);" within CvLuaSupport.cpp instead, that is causing the random freeze when autosaving. Guess it has to do with the GameLock?
Last edited: