Savegame breaks in Blade of Agony

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: Savegame breaks in Blade of Agony

Re: Savegame breaks in Blade of Agony

by _mental_ » Sat Aug 29, 2020 2:41 am

It's not that simple. There is no such information available at the place of added checks.

Re: Savegame breaks in Blade of Agony

by Nash » Sat Aug 29, 2020 2:28 am

While I was lucky in that I knew where the problem came from (I knew which actor to look for from the start); I think one improvement that can be added to the help text is print some more detailed information, like which actor class is trying to serialize the dangling pointer? What do you think, _mental_?

(This is relevant only for actors obviously, for the other sources of dangling pointers, I have no new ideas, plus I've never encountered them yet so far...)

Re: Savegame breaks in Blade of Agony

by SanyaWaffles » Sat Aug 29, 2020 1:30 am

I just encountered this in my own project. The same blockingline. I've never encountered this before.

My main thing is I have genuinely no idea how to fix this now.

Re: Savegame breaks in Blade of Agony

by _mental_ » Thu Aug 27, 2020 2:35 am

There is a chance that some pointer serialization issues are still present in the engine itself. So, the corresponding errors may occur even with valid scripts.
Unfortunately, it's impossible to find them without very extensive testing. This, in turn, is impossible without committing my changes to master.

Re: Savegame breaks in Blade of Agony

by Nash » Thu Aug 27, 2020 2:27 am

Hi _mental_, I'd just like to say THANK YOU for this commit which finally brought me directly to the source of my problem with dangling pointers and apply a solution for it. This has been plaguing our project for almost a year, maybe even more. :D

Re: Savegame breaks in Blade of Agony

by Talon1024 » Wed Feb 26, 2020 10:03 am

Here's the WolfenDoom commit, and the savegame, which requires Freedoom: Phase 2 to be used as the IWAD in order for it to show up on the savegame list. However, I can't seem to reproduce the non-breakage after starting a new game and loading that saved game.

Re: Savegame breaks in Blade of Agony

by _mental_ » Wed Feb 26, 2020 7:46 am

Please post this saved game along with the actual BoA commit hash.

Re: Savegame breaks in Blade of Agony

by Talon1024 » Wed Feb 26, 2020 5:53 am

I built my own build of GZDoom from the code in mental's fork, and I noticed something interesting.

I have a savegame on INTERMAP before C1M2, and if I load that save from the main menu, the game will fail to save once I enter C1M2 due to an out-of-bounds array value, which is apparently "blockingline" (I modified the code to print the name of the variable being serialized).

However, if I start a new game from chapter 1, skip to INTERMAP, and THEN load the aforementioned saved game, the out-of-bounds array value issue will not occur.

Re: Savegame breaks in Blade of Agony

by drfrag » Thu Feb 20, 2020 5:04 am

Nash wrote:if your changes get merged, I can easily test (with my project) save/load and level-travel.
Actually why don't you test the PR now with an inhouse build?

Re: Savegame breaks in Blade of Agony

by drfrag » Thu Feb 20, 2020 4:26 am

Thanks as i understand those errors are random and rare until now that the problem has been exposed, may be merging them before the next release could make things even worse.

Re: Savegame breaks in Blade of Agony

by Nash » Thu Feb 20, 2020 4:05 am

Ok I'll try to recreate it and provide more detail, in a new thread. I'd actually already made a thread about it before but I A) can't find it right now B) it got closed as a "don't do that", so I didn't pursue it any farther.

Re: Savegame breaks in Blade of Agony

by Graf Zahl » Thu Feb 20, 2020 3:50 am

Waterlevel is just a member of Actor, it also gets serialized. See p_mobj.cpp, line 268. If you cannot give specifics about the crash it's hard to investigate.

Re: Savegame breaks in Blade of Agony

by Nash » Thu Feb 20, 2020 3:33 am

_mental_ wrote: It's all about pointers. Other types like integers cannot be the primary reason of such issues.
Could it be that it had trouble accessing the "waterlevel" variable? I mean not the integer value of it. I mean, it can't even find the variable.

I'm sorry if this is unhelpful, I'm not much of a programmer. :) At any rate, if your changes get merged, I can easily test (with my project) save/load and level-travel. Hopefully the crashes will be gone.

Re: Savegame breaks in Blade of Agony

by _mental_ » Thu Feb 20, 2020 2:54 am

Nash wrote:_mental_: a long time ago, I've had similar crash-on-load - and also traveling back and forth between hub maps - triggered by having a certain inventory item on the player, and debugger showed it was related to actor waterlevel. Perhaps you can add that to your list of serialization fixes?
It's all about pointers. Other types like integers cannot be the primary reason of such issues.
drfrag wrote:I wonder if LZDoom is affected as i didn't merge the level refactor.
Cherry pick this commit. If it begins to error out during saving or loading, it's affected.
It may require several tries to reproduce one of these bugs. Maps with portals have higher chances.
I won't be surprised if you will encounter a serialization error even with all three commits merged.

Re: Savegame breaks in Blade of Agony

by drfrag » Wed Feb 19, 2020 4:28 pm

I wonder if LZDoom is affected as i didn't merge the level refactor.

Top