MantisBT - Zandronum
View Issue Details
0002904Zandronum[All Projects] Bugpublic2016-10-19 17:152018-09-30 21:56
unknownna 
Torr Samaho 
urgentcrashalways
closedfixed 
3.0-beta 
3.03.0 
0002904: Crash with hpbar-v15.pk3 + h_phobia.wad on MAP11 if a bot is present before the changemap map change
Quote from unknownna
I tested some Complex Doom/LCA with that build and found one odd server crash with hpbar-v15.pk3 + h_phobia.wad on MAP11 if a bot is present before the changemap map change.
1. zandronum -host -iwad doom2.wad -file h_phobia.wad hpbar-v15.pk3
2. "addbot" in the server console.
3. "changemap map11" in the server console.
4. zandronum -iwad doom2.wad -file h_phobia.wad hpbar-v15.pk3 -connect localhost
It works in 161017-0733, but is broken in 161017-2033.
No tags attached.
child of 0002885closed Torr Samaho deathmatch CVar doesn't take effect when used via command-line 
Issue History
2016-10-19 17:15unknownnaNew Issue
2016-10-19 17:15unknownnaStatusnew => confirmed
2016-10-19 17:17Edward-sanNote Added: 0016064
2016-10-19 17:26Edward-sanNote Edited: 0016064bug_revision_view_page.php?bugnote_id=16064#r9798
2016-10-19 17:26Edward-sanRelationship addedchild of 0002885
2016-10-20 00:11DuskNote Added: 0016072
2016-10-20 00:14DuskNote Edited: 0016072bug_revision_view_page.php?bugnote_id=16072#r9804
2016-10-20 00:16DuskAssigned To => Torr Samaho
2016-10-20 00:16DuskStatusconfirmed => assigned
2016-10-20 00:17DuskNote Edited: 0016072bug_revision_view_page.php?bugnote_id=16072#r9805
2016-10-20 08:34Edward-sanNote Added: 0016073
2016-10-23 17:42Torr SamahoNote Added: 0016086
2016-10-23 17:42Torr SamahoStatusassigned => needs testing
2016-10-23 18:36Edward-sanNote Added: 0016087
2016-12-08 03:27Ru5tK1ngStatusneeds testing => resolved
2016-12-08 03:27Ru5tK1ngResolutionopen => fixed
2016-12-08 03:27Ru5tK1ngFixed in Version => 3.0
2016-12-08 03:27Ru5tK1ngTarget Version => 3.0
2018-09-30 21:56Blzut3Statusresolved => closed

Notes
(0016064)
Edward-san   
2016-10-19 17:17   
(edited on: 2016-10-19 17:26)
The fix for ticket 0002885 ('https://bitbucket.org/zandronum/zandronum-sandbox/commits/c5fde6d1b368547a2f7156cdd8df6a88639b297b [^]' ) started the crash.

(0016072)
Dusk   
2016-10-20 00:11   
(edited on: 2016-10-20 00:17)
Looks like it's trying to access a dummy player's userinfo:

Thread 1 "zandronum" received signal SIGSEGV, Segmentation fault.
0x000000000066e743 in userinfo_t::GetAimDist (this=0x1b63508 <DummyPlayer+144>) at /home/teemu/dev/zandronum/src/./d_player.h:328
328 float aim = *static_cast<FFloatCVar *>(*CheckKey(NAME_Autoaim));
(gdb) bt
#0 0x000000000066e743 in userinfo_t::GetAimDist (this=0x1b63508 <DummyPlayer+144>) at /home/teemu/dev/zandronum/src/./d_player.h:328
#1 0x00000000007f6ec6 in P_AimLineAttack (t1=0x3b50eb0, angle=4096, distance=67108864, pLineTarget=0x7fffffff4928, vrange=0, flags=0, target=0x0, friender=0x0)
    at /home/teemu/dev/zandronum/src/p_map.cpp:4022
0000002 0x0000000000823f6c in P_BulletSlope (mo=0x3b50eb0, pLineTarget=0x7fffffff5988) at /home/teemu/dev/zandronum/src/p_pspr.cpp:1075
0000003 0x0000000000798dad in DLevelScript::CallFunction (this=0x2883350, argCount=1, funcIndex=13, args=0x7fffffff7e50, stack=0x7fffffff7e50, stackdepth=1)
    at /home/teemu/dev/zandronum/src/p_acs.cpp:5353
0000004 0x0000000000781283 in DLevelScript::RunScript (this=0x2883350) at /home/teemu/dev/zandronum/src/p_acs.cpp:6936
0000005 0x0000000000793708 in DACSThinker::Tick (this=0x2968ac0) at /home/teemu/dev/zandronum/src/p_acs.cpp:3228
0000006 0x00000000006d0256 in DThinker::TickThinkers (list=0x1bcddc8 <DThinker::Thinkers+824>, dest=0x0) at /home/teemu/dev/zandronum/src/dthinker.cpp:472
0000007 0x00000000006d0058 in DThinker::RunThinkers () at /home/teemu/dev/zandronum/src/dthinker.cpp:419
0000008 0x0000000000854159 in P_Ticker () at /home/teemu/dev/zandronum/src/p_tick.cpp:373
0000009 0x00000000006dd586 in G_Ticker () at /home/teemu/dev/zandronum/src/g_game.cpp:1723
0000010 0x0000000000906e75 in SERVER_Tick () at /home/teemu/dev/zandronum/src/sv_main.cpp:621
0000011 0x00000000006ac6fc in D_DoomLoop () at /home/teemu/dev/zandronum/src/d_main.cpp:1333
0000012 0x00000000006aff91 in D_DoomMain () at /home/teemu/dev/zandronum/src/d_main.cpp:3250
0000013 0x000000000061b15e in main (argc=5, argv=0x7fffffffdce8) at /home/teemu/dev/zandronum/src/sdl/i_main.cpp:371


EDIT: Namely that of a voodoo doll. DummyPlayer is defined in cooperative.cpp:70.

(0016073)
Edward-san   
2016-10-20 08:34   
In the version before the fix, the DummyPlayer userinfo is still accessed but no crash happens.
(0016086)
Torr Samaho   
2016-10-23 17:42   
Should be fixed now.
(0016087)
Edward-san   
2016-10-23 18:36   
Can confirm the fix.