[Closed] Actor Hits Floor CTD

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Actor Hits Floor CTD

Postby Remmirath » Sat Aug 13, 2016 11:19 am

I've ran into this bug while making a map.

I've setup 2 teleporters with Actor Hits Floor trigger. However if you drop on the teleporter from a height greater than your jump height, ZDoom will crash to desktop.

To reproduce this:

1) Use fly cheat to hover over one of the teleporters, or alternatively, position yourself on the 3D floor placed in the map with said cheat
2) Deactivate cheat and land on one of the teleporters
3) The landing should make ZDoom crash to desktop

I've attached a test map with the bug to this post.

Tested in latest revision.
Attachments
actor_hits_floor_bug.wad
(7.98 KiB) Downloaded 34 times
User avatar
Remmirath
Laziest mapper on Earth
 
Joined: 23 Dec 2007
Location: Here
Discord: Remmirath#0424
Twitch ID: TheRemmirath
Operating System: Windows Vista/7 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Actor Hits Floor CTD

Postby Graf Zahl » Sat Aug 13, 2016 12:14 pm

Known problem. The sector actions cause the teleports to recursively call each other, eventually causing a stack overflow.
The thing is, it's either this or broken sector actions, fortunately there is a workaround which I added recently to fix an older map using a similar setup.
You have to set compat_teleport in your MAPINFO to restore the behavior of older ZDoom versions, then it will work as you intend.

In general, teleports are dangerous, if there's any chance that a teleport can trigger another teleport. Since they are performed deep inside the movement checking code, this will inevitably lead to a crash.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Actor Hits Floor CTD

Postby Remmirath » Sat Aug 13, 2016 1:12 pm

Thanks for the info, Graf. :)

Since I'm working on a map for Zandronum, I guess the compatibility flag hasn't been ported yet, so I've found a workaround to this using a script with a small delay. This stops the engine from flooding the stack with recursive teleport calls.
User avatar
Remmirath
Laziest mapper on Earth
 
Joined: 23 Dec 2007
Location: Here
Discord: Remmirath#0424
Twitch ID: TheRemmirath
Operating System: Windows Vista/7 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Actor Hits Floor CTD

Postby NeuralStunner » Sun Aug 14, 2016 8:52 pm

The method I used: Have the script teleport immediately, followed by a 1-tic delay. Then using ACS_Execute (rather than ExecuteAlways) prevents the script from reactivating during the same tic.
User avatar
NeuralStunner
Cuddly but Packin'
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293
Operating System: Windows Vista/7 64-bit


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 2 guests