Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001841Zandronum[All Projects] Bugpublic2014-06-16 17:092018-09-30 23:08
ReporterZalewa 
Assigned ToTorr Samaho 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version2.0-beta 
Target Version2.0Fixed in Version2.0 
Summary0001841: Zandronum 2.0 r140112-1124: Memory leak and crash in offline Survival on MAPINFO/monsters
DescriptionThis 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 Reproduce1. 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 InformationThis 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.
Attached Files? file icon memory_leak_crash_survival_zan_2.0.wad [^] (6,161 bytes) 2014-06-16 17:09
? file icon ResetFreezeFix [^] (897 bytes) 2014-11-30 20:49 [Show Content]

- Relationships
has duplicate 0001979closed Russian Overkill causes a crash 

-  Notes
User avatar (0009523)
Dusk (developer)
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 <_>
User avatar (0009525)
Dusk (developer)
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


User avatar (0009526)
Edward-san (developer)
2014-06-16 18:45

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.
User avatar (0010942)
Torr Samaho (administrator)
2014-11-23 14:33

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.
User avatar (0010952)
Arco (updater)
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.


User avatar (0010955)
Dusk (developer)
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
User avatar (0010958)
Torr Samaho (administrator)
2014-11-24 19:21

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.
User avatar (0011014)
Torr Samaho (administrator)
2014-11-30 20:50

I attached the diff of the patch so that this can be tested under Linux.
User avatar (0011147)
Torr Samaho (administrator)
2014-12-31 11:15

Since apparently nobody is going to test the diff I posted a month ago, I pushed the fix without further testing.
User avatar (0011154)
Edward-san (developer)
2014-12-31 14:27

Whoops, sorry for the missing feedback... it works with that patch in linux, too.
User avatar (0011367)
Dusk (developer)
2015-01-12 06:39

Works fine for me too.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: WaTaKiD
Opponents: No one explicitly opposes this issue yet.

- 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 View Revisions
2014-06-16 17:16 Zalewa Description Updated View Revisions
2014-06-16 17:16 Zalewa Additional Information Updated View Revisions
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 View Revisions
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 View Revisions
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






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker