View Issue Details

IDProjectCategoryView StatusLast Update
0002329FSSCPsoundpublic2010-11-06 05:02
ReporterFUBAR-BDHR Assigned ToThe_E  
Status resolvedResolutionfixed 
Product Version3.6.12 
Fixed in Version3.6.13 
Summary0002329: ERROR: Malloc Failed! on .ogg sound file that used to work
DescriptionFrom the log file:

Paging in mission messages
SOUND ==> converting sound from OGG to PCM
Malloc failed!!!!!!!!!!!!!!!!!!!
ERROR: Malloc Failed!

File: windebug.cpp
Line: 1696

This crashes release 3.6.12 final. Current 3.6.13 trunk logs the error but continues but does not play the sound. This file used to work and plays fine outside of FS2.
Additional InformationError reported here:

Sound file is from the B5SFP.vp and can also be found here: Mission the error occurs in is the single mission Battle of the Line. You can grab that here as well:
TagsNo tags attached.



2010-11-06 04:46

administrator   ~0012439

Last edited: 2010-11-06 05:02

Issue seems to stem from ds.cpp line 302. For some reason, the function ov_pcm_total() decides to return a value of -64 here, which is not even defined as a valid return value for that function (Valid ones would be the desired number of pcm samples, or OV_EINVAL on failure, which is defined as -131 in vorbis/codec.h).

This causes the following calculation to return a truly gigantic number as the size (due to a cast to uint), which in turn cannot be malloc'ed correctly.

I've added a failure path to the function to deal with this correctly, and committed it in revision 6713.

If this error happens, you need to reencode the sound file. I recommend using oggenc2 for this, as other encoders (like VLC's, or Audacity's) are prone to failure. Get it here:

In addition, make sure that the format selected for the audio stream is 16-bit. The offending file posted here uses the 32 bit-float format, this is (apparently, anyway) not supported by our version of theora.
Fixed file can be found here:

Issue History

Date Modified Username Field Change
2010-10-21 07:31 FUBAR-BDHR New Issue
2010-11-06 04:46 The_E Note Added: 0012439
2010-11-06 04:56 The_E Note Edited: 0012439
2010-11-06 04:56 The_E Note Edited: 0012439
2010-11-06 05:02 The_E Note Edited: 0012439
2010-11-06 05:02 The_E Status new => resolved
2010-11-06 05:02 The_E Fixed in Version => 3.6.13
2010-11-06 05:02 The_E Resolution open => fixed
2010-11-06 05:02 The_E Assigned To => The_E