[Fixed] Something in map20 of Community Chest 4 is causing a crash.

Bugs that have been investigated and resolved somehow.

Moderator: Developers

Re: Something in map20 of Community Chest 4 is causing a cra

Postby Graf Zahl » Fri Nov 09, 2018 5:14 am

I cannot remember why I moved it but there must have been some reason for it. At the very least, P_FreeLevelData needs to clear spechit as well because whatever is in there at that point will inevitably become invalid.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Something in map20 of Community Chest 4 is causing a cra

Postby _mental_ » Fri Nov 09, 2018 5:27 am

Graf Zahl wrote:P_FreeLevelData needs to clear spechit as well because whatever is in there at that point will inevitably become invalid.

I was thinking about the same. I fear that it may hide an issue when spechit should be cleared in other cases, not on the first tick.
Anyway, clearing temporary data between maps seems reasonable.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Something in map20 of Community Chest 4 is causing a cra

Postby Graf Zahl » Fri Nov 09, 2018 5:29 am

I'll have a closer look this evening. Right now I cannot say anything more.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Something in map20 of Community Chest 4 is causing a cra

Postby Graf Zahl » Fri Nov 09, 2018 1:06 pm

Looking through the code I think I remember what was the problem: PIT_CheckThing is doing a lot of stuff it shouldn't, if it had been cleanly implemented. Unfortunately it is so full of side effects and bad behavior that it can easily result in a recursive call of P_CheckPosition and leave a filled spechit array behind. And this can turn nasty if there is a portal in the set.
Moving the two array clears below the BlockThingsIterator loop was supposed to clear this residual garbage. Unfortunately this does not account for the exit conditions above and still leaves some garbage behind in other cases.

I wish this could be solved the clean way, i.e. by making the spechit array local to the current function call. Sadly with all the side effects that need to be considered here this is not possible. For example, when something along the way results in a teleport this needs to clear spechit of the current P_CheckPosition call.
This entire code is a mess beyond hope that cannot be fixed because it's one cornerstone of how Doom works.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Something in map20 of Community Chest 4 is causing a cra

Postby Major Cooke » Fri Nov 09, 2018 2:12 pm

Meaning that in order to fix it, one would have to carve out at least half of the entire source code potentially?
User avatar
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Something in map20 of Community Chest 4 is causing a cra

Postby Graf Zahl » Fri Nov 09, 2018 2:21 pm

To fix the movement code you'd have to write a new engine. The original Doom code was so poorly conceived that most attempts at sanitizing it are doomed to fail because they'd break the very essence of it.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Previous

Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 2 guests