MantisBT - Zandronum
View Issue Details
0002825Zandronum[All Projects] Bugpublic2016-09-01 12:232016-09-01 17:33
Filystea 
 
lowminoralways
closedno change required 
3.0-beta 
 
0002825: State jumping on death works in one way but refuses to work in other.
in death state conditional jumps to other states cause problem.

One code doing *same thing* works other not.


WORKING EXAMPLE:

    XBodyMoving:
     PLAY W 1 A_JumpIf( abs(velx) != 0, 1 )
     Goto XBodyMoving

EXAMPLE THAT CAUSES A CRASH:

    XBodyMoving:
     PLAY W 1 A_JumpIf( abs(velx) != 0, "XBodyMoving" )



ZandroDev3.0-160519-2047linux-x86_64

Linux deb 4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux


Crash report.

*** Fatal Error ***
Address not mapped to object (signal 11)
Address: 0x7ffc42eccfb8

System: Linux deb 4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux

GNU gdb (Debian 7.11.1-2) 7.11.1

Zandronum version 3.0-alpha (b7cc4d70fad7)
Compiler version: 4.6.3

Command line: ./zandronum -iwad /home/piotr/.doomseeker/DOOM2.WAD -file /home/piotr/.doomseeker/thundr.wad /home/piotr/.doomseeker/hmodPlayerSkins.pk3 /home/piotr/.doomseeker/hmodFlames0_855.pk3 /home/piotr/.doomseeker/hmodProjectiles0_855.pk3 /home/piotr/.doomseeker/hmodMonsters0_855.pk3 /home/piotr/.doomseeker/hmodMonstersZombies0_857.pk3 /home/piotr/.doomseeker/hmodMonstersImps0_855.pk3 /home/piotr/.doomseeker/hmodMonstersDemons0_855.pk3 /home/piotr/.doomseeker/hmodWeps0_857.pk3 /home/piotr/.doomseeker/hmodSpecial0_857.pk3 /home/piotr/.doomseeker/hmod0_857.pk3

Wad 0: zandronum.pk3
Wad 1: DOOM2.WAD
Wad 2: thundr.wad
Wad 3: hmodPlayerSkins.pk3
Wad 4: hmodFlames0_855.pk3
Wad 5: hmodFlames0_855.pk3:flamef1.wad
Wad 6: hmodProjectiles0_855.pk3
Wad 7: hmodProjectiles0_855.pk3:fireballp4.wad
Wad 8: hmodProjectiles0_855.pk3:fireshotp6.wad
Wad 9: hmodProjectiles0_855.pk3:groundflamep5.wad
Wad 10: hmodProjectiles0_855.pk3:impballp1.wad
Wad 11: hm
Executing: gdb --quiet --batch --command=gdb-respfile-p5LCAR


Yo!
No tags attached.
Issue History
2016-09-01 12:23FilysteaNew Issue
2016-09-01 13:15DuskNote Added: 0015552
2016-09-01 13:15DuskStatusnew => feedback
2016-09-01 17:30FilysteaNote Added: 0015555
2016-09-01 17:30FilysteaStatusfeedback => new
2016-09-01 17:33DuskStatusnew => closed
2016-09-01 17:33DuskResolutionopen => no change required

Notes
(0015552)
Dusk   
2016-09-01 13:15   
The A_JumpIf codepointer is called immediately upon entering a state. So your second example is causing an infinite loop of state jumps within the same tic. Of course it's going to crash.
(0015555)
Filystea   
2016-09-01 17:30   
fixed with...

    XBodyMoving:
     PLAY W 1
     PLAY W 0 A_JumpIf( abs(velx) != 0, "XBodyMoving" )


so it's not a bug. My mistake.