MantisBT - Zandronum
View Issue Details
0001985Zandronum[All Projects] Bugpublic2014-11-03 00:442016-12-17 02:29
WaTaKiD 
 
normalcrashalways
closednot fixable 
MicrosoftWindowsXP/Vista/7
2.0-beta 
 
0001985: actor hits floor thing teleport crash
falling onto a sector with an 'actor hits floor' thing that teleports you will crash instead, and the crash does not bring up the 'save crash report' box
with the example wad provided:
walk forward, u should teleport just fine
once u teleport, jump, and u should crash
this example wad does crash with: zandro 2.0, zdoom 2.7.1, gzdoom 1.8.7

does not crash with: zandro 1.3, zdoom 2.3.1 and 2.5.0, gzdoom r323 and 1.5.0
No tags attached.
has duplicate 0002281closed  Actor Hits Floor teleporters crash the game 
has duplicate 0002803confirmed Torr Samaho Actor Hits Floor CTD 
has duplicate 0002962closed  Game crashes when bots uses a teleport that is done via an "Actor hits floor" thing 
? test-teleport2.wad (1,922) 2014-11-03 00:44
/tracker/file_download.php?file_id=1321&type=bug
Issue History
2014-11-03 00:44WaTaKiDNew Issue
2014-11-03 00:44WaTaKiDFile Added: test-teleport2.wad
2014-11-03 00:56DuskNote Added: 0010805
2014-11-03 00:59DuskNote Edited: 0010805bug_revision_view_page.php?bugnote_id=10805#r5924
2014-11-03 00:59DuskNote Edited: 0010805bug_revision_view_page.php?bugnote_id=10805#r5925
2014-11-03 01:25DuskNote Added: 0010806
2014-11-03 01:26DuskNote Edited: 0010806bug_revision_view_page.php?bugnote_id=10806#r5927
2014-11-03 03:17WaTaKiDNote Added: 0010808
2014-11-03 12:12Edward-sanNote Added: 0010810
2014-11-03 12:13Edward-sanNote Edited: 0010810bug_revision_view_page.php?bugnote_id=10810#r5931
2014-11-03 22:38DuskStatusnew => closed
2014-11-03 22:39DuskResolutionopen => not fixable
2015-06-02 22:57WaTaKiDRelationship addedhas duplicate 0002281
2016-08-13 16:21WaTaKiDRelationship addedhas duplicate 0002803
2016-12-17 02:29WaTaKiDRelationship addedhas duplicate 0002962

Notes
(0010805)
Dusk   
2014-11-03 00:56   
(edited on: 2014-11-03 00:59)
It's a case of infinite recursion. It looks like when the player lands after jumping, the sector action's teleport is called, which triggers the sector action after the teleport, which teleports you again, triggering the sector action, teleporting you again, repeat ad infinitum. Since this happens in latest zdoom, this should get reported there.


Thread 1 (Thread 0x7f9816dc9a00 (LWP 12890)):
#0 0x00007f9815ba2839 in __libc_waitpid (pid=pid@entry=12896, stat_loc=stat_loc@entry=0xcacfcc <altstack+7180>, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
        resultvar = 12896
        oldtype = 0
#1 0x0000000000538a9e in crash_catcher (signum=11, siginfo=<optimized out>, context=<optimized out>) at /home/crimson/dev/zandronum-sandbox/src/sdl/crashcatcher.c:266
        status = 0
        ucontext = <optimized out>
        dbg_pid = 12896
        fd = {19, 20}
0000002 <signal handler called>
No locals.
0000003 P_TeleportMove (thing=thing@entry=0x3b0f580, x=x@entry=0, y=y@entry=0, z=0, telefrag=telefrag@entry=false) at /home/crimson/dev/zandronum-sandbox/src/p_map.cpp:332
        tmf = {thing = 0x3b0f580, x = 0, y = 0, z = 0, sector = 0x0, floorz = 0, ceilingz = 0, dropoffz = 0, floorpic = {texnum = 0}, floorsector = 0x0, ceilingpic = {texnum = 0}, ceilingsector = 0x0, touchmidtex = false, floatok = false, FromPMove = false, ceilingline = 0x0, stepthing = 0x0, DoRipping = false, LastRipped = 0x0, PushTime = 0}
        oldsec = <optimized out>
        box = <error reading variable box (Cannot access memory at address 0x7fff72430fe0)>
        ld = <optimized out>
        it2 = {minx = 0, maxx = 0, miny = 0, maxy = 0, curx = 0, cury = 0, block = 0x0, Buckets = {0 <repeats 32 times>}, FixedHash = {{Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}}, NumFixedHash = 0, DynHash = {Array = 0x0, Most = 0, Count = 0}}
        th = <optimized out>
        StompAlwaysFrags = <optimized out>
        it = {minx = 0, maxx = 0, miny = 0, maxy = 0, curx = 0, cury = 0, polyLink = 0x0, polyIndex = 0, list = 0x0}
0000004 0x0000000000693d05 in P_Teleport (thing=thing@entry=0x3b0f580, x=0, y=0, z=<optimized out>, angle=2147483648, useFog=useFog@entry=true, sourceFog=true, keepOrientation=false, bHaltVelocity=true) at /home/crimson/dev/zandronum-sandbox/src/p_teleport.cpp:161
        oldx = -6291456
        aboveFloor = <optimized out>
        player = 0x168b440 <players>
        an = <optimized out>
        oldy = 0
        destsect = <optimized out>
        oldz = 0
0000005 0x0000000000694248 in EV_Teleport (tid=<optimized out>, tag=<optimized out>, line=<optimized out>, side=<optimized out>, thing=0x3b0f580, fog=fog@entry=true, sourceFog=true, keepOrientation=false, haltVelocity=true) at /home/crimson/dev/zandronum-sandbox/src/p_teleport.cpp:393
        angle = 0
        vely = 0
        OldAngle = 2147483648
        z = <optimized out>
        velx = 0
        haltVelocity = true
        keepOrientation = false
        sourceFog = true
        line = <optimized out>
        tid = <optimized out>
        side = <optimized out>
        fog = true
        thing = 0x3b0f580
        tag = <optimized out>
0000006 0x00000000006505b0 in LS_Teleport (ln=<optimized out>, it=<optimized out>, backSide=<optimized out>, arg0=<optimized out>, arg1=<optimized out>, arg2=<optimized out>, arg3=0, arg4=0) at /home/crimson/dev/zandronum-sandbox/src/p_lnspec.cpp:851
No locals.
0000007 0x000000000078cc7c in ASectorAction::CheckTrigger (this=0x3b11460, triggerer=0x3b0f580) at /home/crimson/dev/zandronum-sandbox/src/g_shared/a_sectoraction.cpp:122
        res = <optimized out>
        triggerer = 0x3b0f580
        this = 0x3b11460
0000008 0x000000000078cd8e in ASecActHitFloor::TriggerAction (this=0x3b11460, triggerer=0x3b0f580, activationType=5) at /home/crimson/dev/zandronum-sandbox/src/g_shared/a_sectoraction.cpp:181
        didit = <optimized out>
0000009 0x0000000000666032 in AActor::CheckSectorTransition (this=0x7fff72431030, this@entry=0x3b0f580, oldsec=0x1, oldsec@entry=0x3b04330) at /home/crimson/dev/zandronum-sandbox/src/p_mobj.cpp:4424
        act = 0
0000010 0x0000000000656517 in P_TeleportMove (thing=thing@entry=0x3b0f580, x=x@entry=-6291456, y=y@entry=0, z=0, telefrag=telefrag@entry=false) at /home/crimson/dev/zandronum-sandbox/src/p_map.cpp:435
        tmf = {thing = 0x3b0f580, x = -6291456, y = 0, z = 0, sector = 0x0, floorz = 0, ceilingz = 8388608, dropoffz = 0, floorpic = {texnum = 2514}, floorsector = 0x3b03e70, ceilingpic = {texnum = 2594}, ceilingsector = 0x3b03e70, touchmidtex = false, floatok = false, FromPMove = false, ceilingline = 0x0, stepthing = 0x0, DoRipping = false, LastRipped = 0x0, PushTime = 0}
        oldsec = 0x3b04330
        box = {m_Box = {1048576, -1048576, -7340032, -5242880}}
        ld = <optimized out>
        it2 = {minx = 0, maxx = 0, miny = 0, maxy = 0, curx = 0, cury = 1, block = 0x0, Buckets = {-1 <repeats 16 times>, 0, -1 <repeats 15 times>}, FixedHash = {{Actor = 0x3b0f580, Next = -1}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}, {Actor = 0x0, Next = 0}}, NumFixedHash = 1, DynHash = {Array = 0x3b8cf00, Most = 0, Count = 0}}
        th = 0x0
        StompAlwaysFrags = true
        it = {minx = 0, maxx = 0, miny = 0, maxy = 0, curx = 0, cury = 1, polyLink = 0x0, polyIndex = 0, list = 0x3ade118}
0000011 0x0000000000693d05 in P_Teleport (thing=thing@entry=0x3b0f580, x=-6291456, y=0, z=<optimized out>, angle=2147483648, useFog=useFog@entry=true, sourceFog=true, keepOrientation=false, bHaltVelocity=true) at /home/crimson/dev/zandronum-sandbox/src/p_teleport.cpp:161
        oldx = 0
        aboveFloor = <optimized out>
        player = 0x168b440 <players>
        an = <optimized out>
        oldy = 0
        destsect = <optimized out>
        oldz = 0
0000012 0x0000000000694248 in EV_Teleport (tid=<optimized out>, tag=<optimized out>, line=<optimized out>, side=<optimized out>, thing=0x3b0f580, fog=fog@entry=true, sourceFog=true, keepOrientation=false, haltVelocity=true) at /home/crimson/dev/zandronum-sandbox/src/p_teleport.cpp:393
        angle = 0
        vely = 0
        OldAngle = 2147483648
        z = <optimized out>
        velx = 0
        haltVelocity = true
        keepOrientation = false
        sourceFog = true
        line = <optimized out>
        tid = <optimized out>
        side = <optimized out>
        fog = true
        thing = 0x3b0f580
        tag = <optimized out>
[...]


(0010806)
Dusk   
2014-11-03 01:25   
(edited on: 2014-11-03 01:26)
The code in AActor::CheckSectorTransition which triggers sector action specials was introduced in this commit:

changeset: 4127:b5139bc0df8d
[...]
description:
out of sequence fix backport from ZDoom revision 3455:
- Fixed: Teleports that were not initiated by walking would not trigger sector actions.


The infinite-recursion teleport is definitely a ZDoom problem.

(0010808)
WaTaKiD   
2014-11-03 03:17   
reported to zdoom:'http://forum.zdoom.org/viewtopic.php?f=2&t=47010 [^]'
(0010810)
Edward-san   
2014-11-03 12:12   
(edited on: 2014-11-03 12:13)
... and it got a [Can't fix], sadly.

Quote from Graf Zahl
I think the rules for 'actor hits floor' are stupid and too general, this really shouldn't trigger if a sector is entered by teleporting. This was just one of those stupid things that got reported as a bug and Randi dilligently changed it without thinking about the consequences. In any case, recursive teleports, like what happens in this setup are a surefire way to crash the engine, there's not much that can be done about it other than delaying the teleport with a script.