MantisBT - Zandronum
View Issue Details
0001314Zandronum[All Projects] Bugpublic2013-04-03 17:132013-04-05 09:27
lollipop 
Blzut3 
normalcrashalways
closedno change required 
MicrosoftWindows7
1.0 
 
0001314: "Failed to malloc 716 bytes" error, DECORATE failure of some sort
I made up some code, based on the aow2 Orca (aow2 beta13), wich causes this problem. The code is on this pastebin:
'http://pastebin.com/xDr12BfR [^]'
Its caused by the line: MHUD A 0 A_GiveInventory("FFA",1)
If I remove that line the error dont occur.
1. Download my attatched file and load it together with aow2 beta13.
2. type in console: give firebatswitch
3. crash
the line of code wich makes this thing happen, does a bit obviously give 1 of the ammotype used by the primary fire, I dont know if this have any effect.
crash, decorate
? Firebat Mech.wad (7,371) 2013-04-03 17:13
/tracker/file_download.php?file_id=957&type=bug
Issue History
2013-04-03 17:13lollipopNew Issue
2013-04-03 17:13lollipopFile Added: Firebat Mech.wad
2013-04-04 11:55WatermelonNote Added: 0006207
2013-04-04 13:12Blzut3Note Added: 0006208
2013-04-04 13:12Blzut3Statusnew => closed
2013-04-04 13:12Blzut3Assigned To => Blzut3
2013-04-04 13:12Blzut3Resolutionopen => no change required
2013-04-04 16:57lollipopNote Added: 0006211
2013-04-04 16:57lollipopStatusclosed => feedback
2013-04-04 16:57lollipopResolutionno change required => reopened
2013-04-04 16:57lollipopNote Edited: 0006211bug_revision_view_page.php?bugnote_id=6211#r3420
2013-04-04 18:21Blzut3Note Added: 0006214
2013-04-04 18:40Blzut3Note Edited: 0006214bug_revision_view_page.php?bugnote_id=6214#r3429
2013-04-05 09:07lollipopNote Added: 0006226
2013-04-05 09:07lollipopStatusfeedback => assigned
2013-04-05 09:27DuskStatusassigned => closed
2013-04-05 09:27DuskResolutionreopened => no change required

Notes
(0006207)
Watermelon   
2013-04-04 11:55   
Does this happen on zdoom?
(0006208)
Blzut3   
2013-04-04 13:12   
User error: Infinite 0-tic loop at that line.
(0006211)
lollipop   
2013-04-04 16:57   
Blzut3, you obviously didn't read the pastebin, that one line might be 0 tick, but the Whole ready state sequence isn't an infinite loop. Also, if the error occured because of an infinite loop, the error would have been different.
Hexadoken told me that the code I have there should not cause that error.
Nothing have been solved.

NOTE: I have not tested on zdoom, I don't have it and I never thought I would need it.

(0006214)
Blzut3   
2013-04-04 18:21   
(edited on: 2013-04-04 18:40)
If you were looping the whole Ready state it wouldn't be, but you're not:
Ready:
                MHUD A 35 A_WeaponReady
                MHUD A 0 A_GiveInventory("FFA",1)
                wait // <-- Infinite loop right here


Edit: To go a little more technical. The reason for the out of memory error is because while looping A_GiveInventory the FFA actor is spawned, given and then flagged as ready to be destroyed. The problem is the game never ticks so the garbage collector never runs to actually deallocate the object. Depending on how much memory your system has it will either crash as it did for you, or it will run out of stack space like would normally happen in an infinite loop. Whichever comes first.

(0006226)
lollipop   
2013-04-05 09:07   
DUH, and hexadoken told me to report it as a bug >.<