MantisBT - Zandronum |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0001841 | Zandronum | [All Projects] Bug | public | 2014-06-16 17:09 | 2018-09-30 23:08 |
|
Reporter | Zalewa | |
Assigned To | Torr Samaho | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | Microsoft | OS | Windows | OS Version | XP/Vista/7 |
Product Version | 2.0-beta | |
Target Version | 2.0 | Fixed in Version | 2.0 | |
|
Summary | 0001841: Zandronum 2.0 r140112-1124: Memory leak and crash in offline Survival on MAPINFO/monsters |
Description | This is a memory leak in a something that looks like an infinite loop and it eventually leads to a crash. The provided WAD has two key elements: MAPINFO and 2 monsters. Although I didn't pinpoint the exact reason for the crash, I know of two alternative ways that this WAD can be fixed so that it won't cause the crash anymore:
a) Remove one of the monsters from the map so that only one remains.
b) Remove MAPINFO lump from the WAD. |
Steps To Reproduce | 1. Load attached WAD in Zandronum 2.0 r140112-1124 (offline mode).
2. Type "survival 1" in console.
3. Type "map map03" in console.
4. Wait until countdown finishes, don't do anything.
5. Game should freeze now. |
Additional Information | This was originally discovered in a WAD called "ph_jstc.wad" by James "Phobus" Cresswell. I'm unable to find the original WAD on the web at the moment, although I managed to strip my version to the minimum.
Crash also happens when hosted on a server in which case it kicks the client and then kills the server. |
Tags | No tags attached. |
Relationships | has duplicate | 0001979 | closed | | Russian Overkill causes a crash |
|
Attached Files | memory_leak_crash_survival_zan_2.0.wad (6,161) 2014-06-16 17:09 /tracker/file_download.php?file_id=1230&type=bug
ResetFreezeFix (897) 2014-11-30 20:49 /tracker/file_download.php?file_id=1336&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2014-06-16 17:09 | Zalewa | New Issue | |
2014-06-16 17:09 | Zalewa | File Added: memory_leak_crash_survival_zan_2.0.wad | |
2014-06-16 17:10 | Zalewa | Additional Information Updated | bug_revision_view_page.php?rev_id=5015#r5015 |
2014-06-16 17:16 | Zalewa | Description Updated | bug_revision_view_page.php?rev_id=5017#r5017 |
2014-06-16 17:16 | Zalewa | Additional Information Updated | bug_revision_view_page.php?rev_id=5018#r5018 |
2014-06-16 17:41 | Dusk | Note Added: 0009523 | |
2014-06-16 17:41 | Dusk | Status | new => confirmed |
2014-06-16 17:54 | Dusk | Note Added: 0009525 | |
2014-06-16 17:59 | Dusk | Note Edited: 0009525 | bug_revision_view_page.php?bugnote_id=9525#r5020 |
2014-06-16 18:45 | Edward-san | Note Added: 0009526 | |
2014-11-03 21:27 | Dusk | Product Version | 2.0 => 2.0-beta |
2014-11-03 21:30 | Dusk | Relationship added | has duplicate 0001979 |
2014-11-23 14:33 | Torr Samaho | Note Added: 0010942 | |
2014-11-23 14:33 | Torr Samaho | Assigned To | => Torr Samaho |
2014-11-23 14:33 | Torr Samaho | Status | confirmed => needs testing |
2014-11-24 14:12 | Arco | Note Added: 0010952 | |
2014-11-24 14:12 | Arco | Status | needs testing => resolved |
2014-11-24 14:12 | Arco | Resolution | open => fixed |
2014-11-24 14:12 | Arco | Fixed in Version | => 2.0 |
2014-11-24 14:12 | Arco | Target Version | => 2.0 |
2014-11-24 19:16 | Dusk | Note Added: 0010955 | |
2014-11-24 19:16 | Dusk | Status | resolved => feedback |
2014-11-24 19:16 | Dusk | Resolution | fixed => reopened |
2014-11-24 19:18 | Arco | Note Edited: 0010952 | bug_revision_view_page.php?bugnote_id=10952#r6017 |
2014-11-24 19:21 | Torr Samaho | Note Added: 0010958 | |
2014-11-24 22:46 | Dusk | Status | feedback => assigned |
2014-11-24 22:46 | Dusk | Fixed in Version | 2.0 => |
2014-11-30 20:49 | Torr Samaho | File Added: ResetFreezeFix | |
2014-11-30 20:50 | Torr Samaho | Note Added: 0011014 | |
2014-12-31 11:15 | Torr Samaho | Note Added: 0011147 | |
2014-12-31 11:16 | Torr Samaho | Status | assigned => needs testing |
2014-12-31 14:27 | Edward-san | Note Added: 0011154 | |
2015-01-12 06:39 | Dusk | Note Added: 0011367 | |
2015-01-12 06:39 | Dusk | Status | needs testing => resolved |
2015-01-12 06:39 | Dusk | Fixed in Version | => 2.0 |
2015-01-12 06:39 | Dusk | Resolution | reopened => fixed |
2018-09-30 23:08 | Blzut3 | Status | resolved => closed |
Notes |
|
(0009523)
|
Dusk
|
2014-06-16 17:41
|
|
Quote
[2014-16-06 20:40:24] <WaTaKiD> anyways i can confirm that ticket
[2014-16-06 20:40:26] <WaTaKiD> Execution could not continue.
[2014-16-06 20:40:27] <WaTaKiD> Could not malloc 712 bytes
[2014-16-06 20:40:56] <WaTaKiD> tried taking a screenshot of the error which seems different for online
[2014-16-06 20:41:03] <WaTaKiD> and it decided to crash again <_>
|
|
|
(0009525)
|
Dusk
|
2014-06-16 17:54
(edited on: 2014-06-16 17:59) |
|
The crash happens during the map reset while trying to spawn one of the pinkies.
Program received signal SIGINT, Interrupt.
0x000000000070511e in ACTOR_GetNewNetID ()
at /home/crimson/src/zandronum/src/p_mobj.cpp:4498
4498 } while ( g_NetIDList[g_ulFirstFreeNetID].bFree == false );
(gdb)
(gdb) bt
#0 0x000000000070511e in ACTOR_GetNewNetID ()
at /home/crimson/src/zandronum/src/p_mobj.cpp:4498
#1 0x00000000007059a7 in AActor::StaticSpawn (type=0x1e97a90, ix=22806528,
iy=-13828096, iz=-2147483648, allowreplacement=NO_REPLACE,
SpawningMapThing=false) at /home/crimson/src/zandronum/src/p_mobj.cpp:4714
0000002 0x0000000000596c02 in Spawn (type=0x1e97a90, x=22806528, y=-13828096,
z=-2147483648, allowreplacement=NO_REPLACE)
at /home/crimson/src/zandronum/src/actor.h:1206
0000003 0x0000000000625b1a in GAME_ResetMap (bRunEnterScripts=false)
at /home/crimson/src/zandronum/src/g_game.cpp:3829
0000004 0x00000000007c622a in SURVIVAL_DoFight ()
at /home/crimson/src/zandronum/src/survival.cpp:253
0000005 0x00000000007c5f26 in SURVIVAL_Tick ()
at /home/crimson/src/zandronum/src/survival.cpp:137
0000006 0x000000000061f405 in G_Ticker ()
at /home/crimson/src/zandronum/src/g_game.cpp:1655
0000007 0x00000000005fbfca in TryRunTics ()
at /home/crimson/src/zandronum/src/d_net.cpp:1864
0000008 0x00000000005f3aea in D_DoomLoop ()
at /home/crimson/src/zandronum/src/d_main.cpp:1246
0000009 0x00000000005f6fc5 in D_DoomMain ()
at /home/crimson/src/zandronum/src/d_main.cpp:2831
0000010 0x0000000000585857 in main (argc=3, argv=0x7fffffffe498)
at /home/crimson/src/zandronum/src/sdl/i_main.cpp:288
|
|
|
|
Yeah, the game is stuck inside the actor reloading loop inside GAME_ResetMap, as if there is an infinitely number of actors to iterate via ActorIterator. |
|
|
|
Interesting. In 2.0, TThinkerIterator<AActor> doesn't seem to like if we create new actors while iterating over all actors in the example wad. This should fix the issue. |
|
|
(0010952)
|
Arco
|
2014-11-24 14:12
(edited on: 2014-11-24 19:18) |
|
Issue fixed in r141117-2018.
EDIT:
[10:01] <Arco> I just used the latest beta a while ago and it was working.
[10:02] <Arco> I'll post the changeset.
[10:03] <Arco> Changeset: EF3A40828F3F
[10:05] <edward-san> I can still reproduce the problem
[10:05] <Arco> Huh.
[10:06] <edward-san> eh, the changeset matches
[10:06] <edward-san> which os?
[10:06] <Arco> I see.
[10:06] <Arco> It's a porblem with the os it seems.
[10:07] <Arco> Windows.
[10:07] <Arco> It looks like it's fixed on my end but not yours apparently.
|
|
|
(0010955)
|
Dusk
|
2014-11-24 19:16
|
|
It seems this crash is back.
Program received signal SIGINT, Interrupt.
0x0000000000664681 in AActor::StaticSpawn (type=<optimized out>, ix=14680064, iy=-16777216, iz=-2147483648, allowreplacement=<optimized out>,
SpawningMapThing=<optimized out>) at /home/crimson/dev/zandronum-sandbox/src/p_mobj.cpp:4823
4823 if (level.flags & LEVEL_NOALLIES && !actor->player)
(gdb) bt
#0 0x0000000000664681 in AActor::StaticSpawn (type=<optimized out>, ix=14680064, iy=-16777216, iz=-2147483648, allowreplacement=<optimized out>,
SpawningMapThing=<optimized out>) at /home/crimson/dev/zandronum-sandbox/src/p_mobj.cpp:4823
#1 0x00000000005b1c8d in Spawn (allowreplacement=<optimized out>, z=<optimized out>, y=<optimized out>, x=<optimized out>, type=<optimized out>)
at /home/crimson/dev/zandronum-sandbox/src/./actor.h:1230
0000002 GAME_ResetMap (bRunEnterScripts=160, bRunEnterScripts@entry=false) at /home/crimson/dev/zandronum-sandbox/src/g_game.cpp:3883
0000003 0x00000000006f733c in SURVIVAL_DoFight () at /home/crimson/dev/zandronum-sandbox/src/survival.cpp:253
0000004 0x00000000005b4fe7 in G_Ticker () at /home/crimson/dev/zandronum-sandbox/src/g_game.cpp:1675
0000005 0x00000000005952b1 in TryRunTics () at /home/crimson/dev/zandronum-sandbox/src/d_net.cpp:1865
0000006 0x000000000059075d in D_DoomLoop () at /home/crimson/dev/zandronum-sandbox/src/d_main.cpp:1261
0000007 0x0000000000592a5f in D_DoomMain () at /home/crimson/dev/zandronum-sandbox/src/d_main.cpp:2994
0000008 0x000000000051d0b1 in main (argc=3, argv=0x7fffffffdbf8) at /home/crimson/dev/zandronum-sandbox/src/sdl/i_main.cpp:336
|
|
|
|
I didn't commit the fix anywhere since it's still experimental. The only binary that contains the fix is the Windows binary I posted above, so it's not surprising if a build that you compiled yourself crashes. |
|
|
|
I attached the diff of the patch so that this can be tested under Linux. |
|
|
|
Since apparently nobody is going to test the diff I posted a month ago, I pushed the fix without further testing. |
|
|
|
Whoops, sorry for the missing feedback... it works with that patch in linux, too. |
|
|
(0011367)
|
Dusk
|
2015-01-12 06:39
|
|
|