Author Topic: Malloc Failed?  (Read 22230 times)

0 Members and 1 Guest are viewing this topic.

Offline Crybertrance

  • 29
  • Conventional warheads only, no funny business
Okay, now this is strange; I started playing Tenebra earlier today, finished the dreamscape and quit halfway through the first combat mission (gameplay was going well, good fps, perfect). But now, whenever I stat FSOpen and select my "Blue Planet 2"(This is a new pilot I created just before playing Tenebra) pilot, I get this:

Code: [Select]
Malloc Failed!

ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_17_SSE2_BP.exe! <no symbol>
fs2_open_3_6_17_SSE2_BP.exe! <no symbol>
fs2_open_3_6_17_SSE2_BP.exe! <no symbol>
fs2_open_3_6_17_SSE2_BP.exe! <no symbol>
fs2_open_3_6_17_SSE2_BP.exe! <no symbol>
fs2_open_3_6_17_SSE2_BP.exe! <no symbol>
fs2_open_3_6_17_SSE2_BP.exe! <no symbol>
fs2_open_3_6_17_SSE2_BP.exe! <no symbol>

Note that I also got this error one or twice before at random times while playing Tenebra.
Creating a new pilot gets my to the Mainhall, but selecting the WiH 2 campaign from the Campaign Room get me the error too.

Log: http://pastebin.com/yXaSve3d
<21:08:30>   Hartzaden fires a slammer at Cybertrance
<21:09:13>   Crybertrance pops flares, but wonders how Hartzaden acquired aspect lock on a stealth fighter... :\
<21:11:58>   *** The_E joined #bp [email protected]
21:11:58   +++ ChanServ has given op to The_E
<21:12:58>   Hartzaden continues to paint crybertrance and feeding the info to a wing of gunships
<21:14:07>   Crybertrance sends emergency "IM GETING MY ASS KICKED HERE!!!!eleventy NEED HELPZZZZ" to 3rd fleet command
<21:14:50>   Hartzaden jamms the transmission.
<21:14:51>   The_E explodes the sun

 

Offline niffiwan

  • 211
  • Eluder Class
I think you've hit this bug.  Unless you like interpreting the source code & messing with hex editors, it's new pilot time :(

Would you be able to zip up your pilot files (.plr & .csg) and attach them to the mantis issue?  Or otherwise post them in this thread?  That may help us track down what's causing these issues.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Crybertrance

  • 29
  • Conventional warheads only, no funny business
Hmm...renaming the "players" folder and creating a new pilot (couldnt even delete all pilots through the pilot selector; they just kept re-appearing the next time I ran FSO) got me able to start WiH 2 again.

Btw, do you want all my pilot files? or just the "Blue Planet" and "Blue Planet 2" ones (which are the Ant8 code generated ones)?

Edit: I also might mention this; since it might relate to the new pilot code. When I created the new pilot for BP2 earlier, I noticed that through the tech room all the missions in WiH 2 were unlocked. But after my current renaming of the players folder, and then creating a new pilot...everything is locked as it should be.
« Last Edit: January 09, 2013, 05:52:30 am by Crybertrance »
<21:08:30>   Hartzaden fires a slammer at Cybertrance
<21:09:13>   Crybertrance pops flares, but wonders how Hartzaden acquired aspect lock on a stealth fighter... :\
<21:11:58>   *** The_E joined #bp [email protected]
21:11:58   +++ ChanServ has given op to The_E
<21:12:58>   Hartzaden continues to paint crybertrance and feeding the info to a wing of gunships
<21:14:07>   Crybertrance sends emergency "IM GETING MY ASS KICKED HERE!!!!eleventy NEED HELPZZZZ" to 3rd fleet command
<21:14:50>   Hartzaden jamms the transmission.
<21:14:51>   The_E explodes the sun

 

Offline Solatar

  • 211
I caused this bug on my system by switching builds and mods back and forth between 3.6.17 BP and the 3.6.16 RC 1.  I switched from the new BP stuff, had performance issues, tried running the Port (less intensive) under the same BP build to determine if it was the build or BP data, and that ruined the pilot, just like the install post said it would :p.  When I went back to BP, I got in-game warnings (several in a row) about not being able to find the campaign file, campaign progress file, etc. Malloc error happened sometime after (I think after game restart).

Deleting the pilots in-game wasn't enough to make a clean pilot, I also had to delete the campaign progress files in players/single/inferno/.  If I didn't, then a new player with the same name as an old one would inherit all the problems (and campaign progress).

I'm not 100% sure what's caused it (I no can code), but I've avoided seeing the error again so far by keeping a single pilot only used for this BP campaign, and not evening switching campaigns in the campaign room.

 

Offline niffiwan

  • 211
  • Eluder Class
Hmm...renaming the "players" folder and creating a new pilot (couldnt even delete all pilots through the pilot selector; they just kept re-appearing the next time I ran FSO) got me able to start WiH 2 again.

Btw, do you want all my pilot files? or just the "Blue Planet" and "Blue Planet 2" ones (which are the Ant8 code generated ones)?

Deleting the pilots in-game wasn't enough to make a clean pilot, I also had to delete the campaign progress files in players/single/inferno/.  If I didn't, then a new player with the same name as an old one would inherit all the problems (and campaign progress).

Regarding the pilots reappearing after being deleted in FSO, that's because ant8 converts any inferno pilots it finds, except where an ant8 pilot of the same name exists.  When you delete the ant8 pilot, it gets converted again next time you start FSO.  To stop this happening, you need to rename/delete your inferno pilot files  (We also need to handle this better in the code...)

As for the pilots I'm interested in, just the "Blue Planet" and "Blue Planet 2" ones (i.e. ant8).  Thanks
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 
Odd. I just hit this bug upon trying to load up a pilot file that had finished the campaign. I didn't have any problems before this. I can attach my pilot file if it'll help.

I think you've hit this bug.  Unless you like interpreting the source code & messing with hex editors, it's new pilot time :(

Just out of curiosity, what do you do if you DO have hex editors and code knowledge?
"You need to believe in things that aren't true. How else can they become?" -DEATH, Discworld

"You can fight like a krogan, run like a leopard, but you'll never be better than Commander Shepard!"

  

Offline niffiwan

  • 211
  • Eluder Class
Firstly, attaching the pilot file should help, as I'm still trying to work out how to reproduce the issue.  I think one of the complexities is that the problem occurs at time X, but it doesn't manifest until time Y which can be a while after time X, thus making it hard to figure out what you were doing when the problem actually occurred. 

Secondly, on repairing pilot files...

1) You need to find the red-alert section in the relevant .csg file.  This is easy with a busted file, since it'll be 99%+ comprised of the red-alert section :lol:  If you open the .csg in a hex editor you'll see shipnames repeated over and over, perhaps millions of times.  This is data from the last red alert mission that you played.

2) You remove all the data from the red-alert section EXCEPT for one "set" of red alert data.  i.e. each ship & its data should only be listed once.  Since I'm on Linux the tools I used for this were "head -c / tail -c / cat" to remove the bad data and patch the file back together, with a hex editor (ghex2) to provide me with the relevant byte offsets in the file. 

3) You need to find the integer value in the .csg which records the number of red alert entries and modify it so that it matches with the number of ships stored in the red alert section.  Remember that integers on little-endian x86 CPUs are stored LSB (least significant byte) first, so you need to reverse the order of the 4 bytes that make up the integer when you insert your new value (e.g hex 01 00 00 00 for "1" instead of hex 00 00 00 01).  This is the bit that you really need to read the code for, to work out what order FSO expects all the .csg data to be in and therefore be able to find the correct 4 byte section of the file to modify.

Honestly, it's fiddly and very prone to error.  It's probably easier to create a new pilot file & replay your current campaign :)
(unless you're a masochist like me who wanted to learn how the pilot file worked :nervous:)

edit: what the hey, here's the part of the code you need to start reading: function pilotfile::save_savefile() in code/pilotfile/csg.cpp.

edit2: if you don't want to hex-edit your pilot, you've got some other options
1) start a new pilot and use CTRL-SHIFT-S in the techroom to unlock all the campaign missions, then play them one by one from here (note: you won't get medals, and campaign persistent variables may not work)
2) start a new pilot, and create a custom .fc2 (i.e. campaign file) that starts from the mission where you encountered the problem
3) start a new pilot, and play the entire campaign again

In all cases, you should also get a more recent FSO executable, as this bug is now fixed in the recent BP builds, and the recent 3.6.19 nightlies
« Last Edit: March 17, 2013, 05:34:41 pm by niffiwan »
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Crybertrance

  • 29
  • Conventional warheads only, no funny business
Ah, the stuff you coders go through!  :(

I think I'll give the stuff you mentioned above a try though, most probably won't fix anything, just for the lulz (I am learning to code anyways)

Anyways, here are the files you mentioned niffiwan...

http://www.mediafire.com/?7im9muhj1pa189b (since HLP wont let me attach)
<21:08:30>   Hartzaden fires a slammer at Cybertrance
<21:09:13>   Crybertrance pops flares, but wonders how Hartzaden acquired aspect lock on a stealth fighter... :\
<21:11:58>   *** The_E joined #bp [email protected]
21:11:58   +++ ChanServ has given op to The_E
<21:12:58>   Hartzaden continues to paint crybertrance and feeding the info to a wing of gunships
<21:14:07>   Crybertrance sends emergency "IM GETING MY ASS KICKED HERE!!!!eleventy NEED HELPZZZZ" to 3rd fleet command
<21:14:50>   Hartzaden jamms the transmission.
<21:14:51>   The_E explodes the sun

 
@Niffiwan: Wow man, thanks! Saved me from a replay in the middle of  finals :)
The integer was right in front of that crazy red alert stuff, so that wasn't a problem.

(Just for the record, 1 327 104 mentions of GTC Duke. And the problem didn't stop, just started anew, but unless I screwed something up this should work fine until I finish the campaign.)
The lyf so short, the craft so long to lerne.

 

Offline niffiwan

  • 211
  • Eluder Class
I'm glad it helped out :)
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline crizza

  • 210
Since I have the bug...I don't get what to do and am not that amused to replay the whole campaign again...

 

Offline Crybertrance

  • 29
  • Conventional warheads only, no funny business
Since I have the bug...I don't get what to do and am not that amused to replay the whole campaign again...

You'd have to rename your player folder in "FS root/data" and create a new player. Needless to say, you have to replay the campaign.

If you know coding, or are feeling adventurous, you can try the steps Niffiwan stated 4 posts above.
<21:08:30>   Hartzaden fires a slammer at Cybertrance
<21:09:13>   Crybertrance pops flares, but wonders how Hartzaden acquired aspect lock on a stealth fighter... :\
<21:11:58>   *** The_E joined #bp [email protected]
21:11:58   +++ ChanServ has given op to The_E
<21:12:58>   Hartzaden continues to paint crybertrance and feeding the info to a wing of gunships
<21:14:07>   Crybertrance sends emergency "IM GETING MY ASS KICKED HERE!!!!eleventy NEED HELPZZZZ" to 3rd fleet command
<21:14:50>   Hartzaden jamms the transmission.
<21:14:51>   The_E explodes the sun

 

Offline crizza

  • 210
Wtf?!
How can this happen in the first place? Is that a mistake I made while installing or is it a code related issue?
And I just finished the campaign, great -.-

 

Offline Crybertrance

  • 29
  • Conventional warheads only, no funny business
Wtf?!
How can this happen in the first place? Is that a mistake I made while installing or is it a code related issue?
And I just finished the campaign, great -.-

Its a code related issues. Antipodes 8 has a bug when dealing with Red Alert campaigns (or something?). Some weird code bug, happened to me even though I created a new pilot for Act 3 specially! That too, just in the second mission (lucky me).
<21:08:30>   Hartzaden fires a slammer at Cybertrance
<21:09:13>   Crybertrance pops flares, but wonders how Hartzaden acquired aspect lock on a stealth fighter... :\
<21:11:58>   *** The_E joined #bp [email protected]
21:11:58   +++ ChanServ has given op to The_E
<21:12:58>   Hartzaden continues to paint crybertrance and feeding the info to a wing of gunships
<21:14:07>   Crybertrance sends emergency "IM GETING MY ASS KICKED HERE!!!!eleventy NEED HELPZZZZ" to 3rd fleet command
<21:14:50>   Hartzaden jamms the transmission.
<21:14:51>   The_E explodes the sun

 

Offline crizza

  • 210
I reinstalled everything for the rerelease of AoA and created a Pilot, then I installed the Tenebra stuff...*sigh*

 

Offline Killer Whale

  • 29
  • Oh no, not again.
Yay! I get to replay all of act 1 again, mere days after finishing it!

[attachment deleted by a basterd]

 

Offline niffiwan

  • 211
  • Eluder Class
You might want to hold off replaying act1 for now as the problem is triggered by any red alert mission.  I've got a fix ready, but you'll need a new executable (and SVN is down at the moment, so it might slow things down).
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Crybertrance

  • 29
  • Conventional warheads only, no funny business
You might want to hold off replaying act1 for now as the problem is triggered by any red alert mission.  I've got a fix ready, but you'll need a new executable (and SVN is down at the moment, so it might slow things down).

But, iirc Act 1&2 don't contain Red Alert missions. The only Red-Alert mission was in AoA.
<21:08:30>   Hartzaden fires a slammer at Cybertrance
<21:09:13>   Crybertrance pops flares, but wonders how Hartzaden acquired aspect lock on a stealth fighter... :\
<21:11:58>   *** The_E joined #bp [email protected]
21:11:58   +++ ChanServ has given op to The_E
<21:12:58>   Hartzaden continues to paint crybertrance and feeding the info to a wing of gunships
<21:14:07>   Crybertrance sends emergency "IM GETING MY ASS KICKED HERE!!!!eleventy NEED HELPZZZZ" to 3rd fleet command
<21:14:50>   Hartzaden jamms the transmission.
<21:14:51>   The_E explodes the sun

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Indeed. The lesson learned with AoA was that Red Alert, especially chained into 3+ mission sequences, does not work reliably. Thus it should be absent from WiH.

 

Offline niffiwan

  • 211
  • Eluder Class
You might want to hold off replaying act1 for now as the problem is triggered by any red alert mission.  I've got a fix ready, but you'll need a new executable (and SVN is down at the moment, so it might slow things down).

But, iirc Act 1&2 don't contain Red Alert missions. The only Red-Alert mission was in AoA.

derp - yes, you are quite right, I was thinking of AoA...  :nervous:

edit: and I've just committed the fix to SVN...
« Last Edit: January 20, 2013, 04:04:29 am by niffiwan »
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...