Freeze on saving

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Freeze on saving

Re: Freeze on saving

by Major Cooke » Sun Oct 16, 2016 2:07 pm

...PRICELESS! I've always desired some way of detecting reloads!

Re: Freeze on saving

by Gez » Sun Oct 16, 2016 1:26 pm

That'd allow to make a reload detector... Even let you detect how many times the game has been saved. Pseudocode:

Code: Select all

if (count(transient_item) == 0)
{
    spawn(transient_item);
    reloaded = true;
    savecount++;
}

Re: Freeze on saving

by Major Cooke » Sun Oct 16, 2016 12:42 pm

wildweasel wrote:Will this flag be exposed to Decorate? I suspect it'll be in modders' best interests to attach the flag to things like gore, bullet puffs, and debris.
This would be nice indeed. While I suspect this will break some save games if misused... Guess it's the modder's fault in that case.

Re: Freeze on saving

by DoomKrakken » Sun Oct 16, 2016 12:40 pm

Oh... they'll be recreated?

Re: Freeze on saving

by Graf Zahl » Sun Oct 16, 2016 12:50 am

Yes, precisely. In the case of dynamic lights that would be fine because they will be recreated afterward anyway.

Re: Freeze on saving

by DoomKrakken » Sun Oct 16, 2016 12:27 am

Does this mean that objects not written out to save games will be removed entirely if the save is reloaded?

Re: Freeze on saving

by wildweasel » Sat Oct 15, 2016 7:30 pm

randi wrote:Sounds like I need to add an OF_Transient flag you can use to mark objects that should not be written out to save games, then.
Will this flag be exposed to Decorate? I suspect it'll be in modders' best interests to attach the flag to things like gore, bullet puffs, and debris.

(And shopkeepers, for those wanting to mimic the old Daggerfall save glitch. =P)

Re: Freeze on saving

by randi » Sat Oct 15, 2016 7:14 pm

Graf Zahl wrote:GZDoom, in order to reduce save file size, destroys all attached lights before saving out the data and restores them right afterward.
Sounds like I need to add an OF_Transient flag you can use to mark objects that should not be written out to save games, then.

Re: Freeze on saving

by Accensus » Sat Oct 15, 2016 1:45 pm

http://imgur.com/a/zwRWv

Info in the image descriptions. Will provide even more info if needed.

Re: Freeze on saving

by Graf Zahl » Sat Oct 15, 2016 4:15 am

You can do one thing, which will work in both ZDoom and GZDoom:

enter 'stat gc' in the console, and once the freeze occurs, tell us what it says in the bottom left corner.

Re: Freeze on saving

by Accensus » Sat Oct 15, 2016 3:58 am

Any tests I can do? Can replay the hangar map with ZDoom instead of GZDoom and log the activity, but I'm not sure if it'll work.

Re: Freeze on saving

by Graf Zahl » Sat Oct 15, 2016 1:32 am

I have no idea. The savegame code seems an unlikely cause here, but there's one important difference between ZDoom and GZDoom here that may be important: GZDoom, in order to reduce save file size, destroys all attached lights before saving out the data and restores them right afterward. So it is doing a high number of allocations that could end in a memory-constrained situation and trigger the GC. But I have no clue how it could lock up. It never happened to me, even under the most stressed situations.

Re: Freeze on saving

by randi » Fri Oct 14, 2016 6:49 pm

Graf Zahl wrote:That sounds like a problem with the garbage collector, not the save system.
Except I'm pretty sure it doesn't get triggered during saving. It does a full collection at map change, and the only other time it should trigger (excepting via console command) is as part of the world think when memory usage warrants it, and then it's only incremental collection until it finishes.

Re: Freeze on saving

by Graf Zahl » Thu Oct 13, 2016 10:20 am

I believe the save freezes are the same thing. This is not the savegame system but the garbage collector that's screwing up. The save system does not have any potentially infinite loops that might occur, when I rewrote it I made damn sure that there's nothing recursive or potentially endlessly looping at all in there.

Re: Freeze on saving

by DoomKrakken » Thu Oct 13, 2016 9:17 am

Ok... but more specifically, I meant an active thread... because this thread is about save freezes. I don't want to create a new thread if there's one already bringing attention to the problem...

Top