|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001647||OpenClonk||Engine||public||2016-01-22 09:07||2016-01-29 04:53|
|Platform||OS||Windows||OS Version||7 - 34 bits|
|Target Version||Fixed in Version|
|Summary||0001647: Increasing saving time|
This issue already happened to me on Deep Sea Mining.
The more time passes by > the more time it takes to save my game. At the end, its nearly impossible to save...
Game can even crash while attempting to save.
Thank you for your patience and your beautiful game :)
|Steps To Reproduce||Play 5mn > save game....|
Play 10mn > save game...
..and so on..
|Additional Information||I noticed also big lags when i hear rockfalls (described in game scenario).|
Is it due to my hardware ? Configuration ?
|Tags||No tags attached.|
|The saving is not due to your hardware. Lags always are, but this rockfall (Clonkomotive) is known to be laggy. I will have a look at that again. maybe too many particles are being created.|
Last edited: 2016-01-22 12:28
I've tried another scenario, small map and no animals > Gold Rush
Same issue, Increasing Saving Time > Could save in the 5 first minutes. After 1 hour of game, impossible to save, game frozen, had to Ctrl+Alt+Del to close it by force.
Nota: do you want me to attach my .ocp files ?
|If it crashes after a time, I guess it's a leak that creates some structure like e.g. many nested prop lists and then it crashes due to deep recursion. I think we should just look at a save file created after a long time and see what's in it.|
Last edited: 2016-01-27 03:46
The saving time is spent within the animation stack. I guess it's creating tons of stacked animations somehow.
The object for which I get this problem at the moment is the butterfly. See attached stack.
Last edited: 2016-01-27 04:27
So I've fixed the butterfly to call StopAnimation. But I wonder: How are animations normally removed? Do we have an animation leak whenever StartAnimation is called multiple times without corresponding StopAnimation?
For example in the chest?
Edit: Just tested. The chest does leak animations.
I think there should be some mechanism that prevents this. For example, animations could be removed if they no longer have weight. Or at least there should be a flag to PlayAnimation which clears any other animations found in the slot.
|Oh, wow. Yes I guess that will bite us quite a few more times if we don't have anything in place that at least warns us about the dangling animations.|
Reminder sent to: Clonk-Karl
ck, you know the animation stack best. Suggestions?
Last edited: 2016-01-27 15:13
Anim_Linear does have a flag to remove the animation at the end. When this is used for the weight of an animation, the animation with less weight is removed. This can be used to e.g. transition smoothly from one animation to another within a given number of frames, e.g. using Anim_Linear(0, 0, 1000, 10, ANIM_Remove) as animation weight would fade the new animation in over the next 10 frames and delete the one that previously existed in the same slot afterwards (which coincides with the weight of being reduced to 0).
Other than that, I'm not against implementing some additional mechanism. I wouldn't want to remove animations that have 0 weight, since that might lead to bugs like a script storing an animation number, then the corresponding animation being removed when its weight drops to 0, and when the engine then re-uses that number for another animation, the number still stored in the script would modify a completely different and unexpected animation.
Adding a flag to PlayAnimation to clear the slot before adding the new animation sounds good to me, though.
Last edited: 2016-01-28 04:55
I saw that not supplying animation weight was not allowed. So I've changed it to automatically replace the existing animation if the given weight is nil. I think this should solve the problem of people creating infinite animation stacks because the "easiest" way to use the function (i.e. if you don't care about animation merging) does not cause problems any more.
I also fixed several uses of PlayAnimation; just needs some testing.
|Should be fixed for the next release.|
|2016-01-22 09:07||lebrun||New Issue|
|2016-01-22 09:12||Maikel||Note Added: 0004848|
|2016-01-22 10:25||lebrun||Note Added: 0004849|
|2016-01-22 11:00||Maikel||Target Version||=> 7.1 (Bugfix update)|
|2016-01-22 12:28||lebrun||Note Edited: 0004849||View Revisions|
|2016-01-22 13:51||Sven2||Note Added: 0004850|
|2016-01-27 03:39||Sven2||Note Added: 0004889|
|2016-01-27 03:45||Sven2||Note Edited: 0004889||View Revisions|
|2016-01-27 03:46||Sven2||Note Edited: 0004889||View Revisions|
|2016-01-27 03:46||Sven2||File Added: butterfly_save_stack.txt|
|2016-01-27 04:22||Sven2||Note Added: 0004890|
|2016-01-27 04:27||Sven2||Note Edited: 0004890||View Revisions|
|2016-01-27 08:56||Zapper||Note Added: 0004891|
|2016-01-27 08:57||Zapper||Note Added: 0004892|
|2016-01-27 15:12||Clonk-Karl||Note Added: 0004897|
|2016-01-27 15:13||Clonk-Karl||Note Edited: 0004897||View Revisions|
|2016-01-28 04:47||Sven2||Assigned To||=> Sven2|
|2016-01-28 04:47||Sven2||Status||new => assigned|
|2016-01-28 04:55||Sven2||Note Added: 0004901|
|2016-01-28 04:55||Sven2||Note Edited: 0004901||View Revisions|
|2016-01-29 04:52||Sven2||Note Added: 0004905|
|2016-01-29 04:52||Sven2||Status||assigned => resolved|
|2016-01-29 04:52||Sven2||Fixed in Version||=> 7.1 (Bugfix update)|
|2016-01-29 04:52||Sven2||Resolution||open => fixed|
|2016-01-29 04:53||Sven2||Severity||minor => major|