Actor Hits Floor teleport causes severe crash

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
Test

Actor Hits Floor teleport causes severe crash

Post by Test »

https://zandronum.com/tracker/view.php?id=4297

I was investigating a server crash issue in map D2IG24 from igpack11.wad on Zandronum. After stripping down the map, I came to the conclusion that it's a ZDoom issue that has never been fixed.

If you drop down onto an "actor hits floor" teleporter from a certain distance and height, ZDoom will crash completely. On Zandronum, this was the server crashing.

Using these steps, it'll crash every time:
Use this example wad: https://zandronum.com/tracker/file_down ... 8&type=bug

1. zdoom -iwad doom2.wad -file actorhitfloor_telecrash_01.wad +map map01
2. Run into the teleporter from any of the red floors and it'll crash.

I tested the latest GZDoom release, 4.12.2, and it still crashes there, though it actually generates an error report now (stack overflow).
Test

Re: Actor Hits Floor teleport causes severe crash

Post by Test »

I just found out from reading another bug report on the Zandronum tracker that ZDoom now has a compatflag named compat_teleport that makes this work again without crashing.
In that case you could either close this report, or maybe flip the behaviors and make the compatflag use the current behavior, or fix it from the ground up if possible. Thanks.
User avatar
Player701
 
 
Posts: 1651
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support

Re: Actor Hits Floor teleport causes severe crash

Post by Player701 »

There is also an easier way to reproduce the crash: enable the fly cheat, position yourself above the teleporter, then disable the cheat. As soon as you hit the floor, boom.

The problem here is that under certain conditions, which includes being teleported by a script or a sector action, the teleporting actor also triggers sector actions in the target sector. Which in this case happens to initiate another teleport back to the first room, which also satisfies the conditions mentioned before, and thus an infinite recursion happens.

A work-around for now is to enable the compat_teleport flag via the console, which disables the behavior described above.
User avatar
Rachael
Posts: 13726
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Actor Hits Floor teleport causes severe crash

Post by Rachael »

Indeed this is an infinite recursion bug and likely a case of "don't do that!"

I am not really sure the best approach to fix it. One option would be to only allow the player to teleport once per tic, but this could potentially break some maps or mods later on.

Return to “Bugs [GZDoom]”