Save Game BP event loads very slow in packaged game (when trying to load a save slot)
I have a relatively large game project that I have been working on for 3 years. I started with 4.11 and had stayed with it until I needed some functionality in new versions. I recently updated to 4.19 (4.20+ was giving me issues with the compilation manager so I stayed with 4.19 because I can still toggle it off when necessary)
The update to 4.19 went relatively smooth. I migrated the project one version at a time while working out the bugs that cropped up with each and I have a stable version running in 4.19. It works flawlessly in the Editor.
The problem is when I package the game. It packages nice and fast. No errors and only a handful of warnings like this: LogPhysics: Warning: Attempt to build physics data for /Game/Levels/FirstPersonExampleMap4.FirstPersonExampleMap4:PersistentLevel.ModelComponent_4273.BodySetup_23702 when we are unable to. LogPhysics: Warning: UBodySetup::GetCookInfo: Triangle data from '/Game/Levels/FirstPersonExampleMap4.FirstPersonExampleMap4:PersistentLevel.ModelComponent_4275' invalid (1622 verts, 0 indices).
Those warnings did not occur in 4.11 but a small amount of those warnings is all I get now in the output log and I think they are trivial. I can't figure out how to fix them but I don't think that is the issue here and pretty sure those warnings are irrelevant.
Anyway, the game works perfectly in the editor and even when I package it EXCEPT when I try to load from a save slot.
The game starts up fine to the main menu and a new game starts fast. It also saves very fast. But when I attempt to load a saved slot the game stalls drastically and the game in the windows task manager becomes unresponsive.
Eventually the save slot will load but it takes 5-10 minutes in the packaged game when it only takes 5-10 seconds in the Editor.
In a development build with print strings the save game bp itself loads fine but when it comes time to load a save slot while playing the game and the custom event fires to initiate all the loading nodes it fires a print string and then just hangs at the first node which is a 2 second delay node.
I've tried fixing up redirectors, deleting the saved and intermediate folders, migrating all the files to a clean project and even tried to downgrade all the way to 4.16 (the last version without the compilation manager) and the issue still persists. I've tried changing default setting in the Editor preferences for packaging to no avail. I've also tried changing many things in the blueprints that pertain to loading a saved game. No matter how I arrange it so it still works in the editor, it still hangs immediately after the save game bp event fires and only shows the first node which is a print string.
I have a feeling something is bugged out with the save game bp but I am not sure how to go about fixing it when it works fine in the editor and gives no warnings or errors. Possibly creating the Save Game BP from scratch may work but I thought I would ask here for help before that endeavor because the save game bp is very large and to remake it node for node by scratch will be an endeavor that will take days.(I wouldn't want to copy paste anything for fear of transferring any bugged nodes.)
Perhaps it's a hidden issue with the game mode or an interface? I can't imagine why the BP itself would load fast and other functions on the same save game bp work fine, but when the load function is fired it all goes to pot, but only in a packaged game. I have to reiterate that it works perfectly in the Editor.
Thank you for any and all suggestions on how I can go about trouble shooting this more.
Update Edit: I am not completely sure, but I think it has to do with Delay nodes bugging out because of fps drops when everything is loading. I've rearranged nodes in the Editor so everything still functions correctly, but now in the packaged game loading a save slot stalls at a delay node on the First person character BP long before the Save Game Interface even fires.... I am trying a work around by getting rid of as many delay nodes as I can and figuring out a way to script the load logic without them.
Update Edit #2: I've narrowed it down to bugged out delay nodes. They don't bug out when the world initially loads, but for some reason wherever I place a delay node in the save game logic it stalls. I've gotten rid of all the delays and managed to get the save slot loading to work with interface calls instead. Once again it works perfectly in the editor, but in the packaged game now the game instance that carries a boolean from the main menu to the game world level does not work... A delay would allow this to work (giving time for the boolean to be readable by the new level, even though a delay is not necessary in the editor), but the delays are bugged in the packaged game and a .02 second delay causes a 10 minute stall in the packaged game. I fear this is an issue that has arisen from migrating a project that was originally created in 4.11 to 4.19 even though there are no errors when playing through the editor and everything loads fine until I package the game...
Update Edit #3 Although the delay nodes are bugging out, it only happens when a game instance bool is changed from default when loading the game level. So it's as if the game level loads fine when all the game instance bools are left at default, but something causes delay nodes to bug out when the game instance is checked on loading a level and a bool has been changed. The delay occurs before the game instance bools are even checked by a branch in the newly opened level, but simply by changing a game instance bool to true from false on the main menu and then opening the new level causes the stall immediately on the new level. I might be forced to make my main menu part of the game world level so I never have to transfer bools using a game instance, But that just seems ridiculous or does it?
Follow this question
Once you sign in you will be able to subscribe for any updates here