2019-10-14 13:18 EDT


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002329FSSCPsoundpublic2010-11-06 01:02
ReporterFUBAR-BDHR 
Assigned ToThe_E 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.12 
Target VersionFixed 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: http://www.hard-light.net/forums/index.php?topic=71789.msg1426381#msg1426381

Sound file is from the B5SFP.vp and can also be found here: http://fubar5.fubar.org/tbp/presidentEMW.ogg Mission the error occurs in is the single mission Battle of the Line. You can grab that here as well: http://fubar5.fubar.org/tbp/Babylon%205%20T%20B%20O%20T%20L.fs2
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0012439

The_E (administrator)

Last edited: 2010-11-06 01: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: http://www.rarewares.org/ogg-oggenc.php

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: http://blueplanet.fsmods.net/E/presidentEMW.ogg

+Notes

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