Page 1 of 1
[r931] Awakening crashes on load
Posted: Fri Sep 03, 2010 13:30
by Nuxius
http://www.doomworld.com/idgames/index.php?id=16043
Crashes on attempting to load the map.
Does not happen ZDoom [r2666].
Re: [r931] Awakening crashes on load
Posted: Fri Sep 03, 2010 15:13
by Gez
There were several crashes that suddenly appeared with the update to that ZDoom revision. I've applied some "band-aid fixes" but more investigation are needed to find the root cause of the problem, rather than simply dodging it.
But that one crash seems older than this revision because I also have it in my experimental "GZDoom64" branch which is based on r929.
I just don't get it. There is this "for" loop:
Code: Select all
for (i = 0; i < numsides; ++i)
{
... lotsa stuff...
sides[i].RightSide = right;
sides[right].LeftSide = i;
}
And when I debug, the crash happens somewhere inside the loop. And MSVC tells me that numside's value is 0xc689 (50825), but that i is a huge value like 0x256db8 (2 452 920). How does this even make sense?
Re: [r931] Awakening crashes on load
Posted: Fri Sep 03, 2010 16:16
by Graf Zahl
Do you by any chance debug a release build?
Re: [r931] Awakening crashes on load
Posted: Fri Sep 03, 2010 16:45
by Gez
Yeah, but it usually works. Whereas debug builds tend not to reproduce the crashes in the first place...
Couldn't get it to crash in the debug build until I fell in deep nukage and it called P_FreeLevelData() during the attempt to restart the level.
Re: [r931] Awakening crashes on load
Posted: Sat Sep 04, 2010 9:29
by Gez
It still doen't crash on load in a debug build, but something fishy is happening in the heap when the level restarts.
And it still crashes on load in a release build. The two issues are probably related, but maybe not.
Re: [r931] Awakening crashes on load
Posted: Tue Sep 07, 2010 23:45
by NeoHippo
I just tried Awakening with various versions and for me the crash happens starting with r906.
If that is any help.
Re: [r931] Awakening crashes on load
Posted: Wed Sep 08, 2010 7:15
by Graf Zahl
Are you sure that r905 still works? r906 only makes a minor change to the actor initialization code concerning Strife dialogues that's only relevant for UDMF maps.
Re: [r931] Awakening crashes on load
Posted: Wed Sep 08, 2010 8:51
by Graf Zahl
Getting closer. It's just dumb luck that the debug build does not crash. I added an assert for the crash condition and it also gets triggered in Debug. No crash though. It just trashes some random memory.
Re: [r931] Awakening crashes on load
Posted: Wed Sep 08, 2010 9:54
by Graf Zahl
fixed