[ scummvm-Bugs-1022265 ] Memory leak in vorbis.cpp?

SourceForge.net noreply at sourceforge.net
Sat Sep 4 11:16:33 CEST 2004


Bugs item #1022265, was opened at 2004-09-04 11:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1022265&group_id=37116

Category: SFX/Talkie
Group: All Games
Status: Open
Resolution: None
Priority: 5
Submitted By: Torbjörn Andersson (eriktorbjorn)
Assigned to: Nobody/Anonymous (nobody)
Summary: Memory leak in vorbis.cpp?

Initial Comment:
It looks like vorbis.cpp is leaking memory. I got this
warning when exiting a game that used an Ogg
Vorbis-encoded MONSTER.SOU, using a September 3 CVS
ScummVM snapshot:

==27583== 2112 bytes in 3 blocks are definitely lost in
loss record 121 of 140
==27583==    at 0x3414A753: operator new(unsigned)
(vg_replace_malloc.c:133)
==27583==    by 0x81C1233: makeVorbisStream(File*,
unsigned) (vorbis.cpp:328)
==27583==    by 0x80681EA:
Scumm::Sound::startSfxSound(File*, int,
PlayingSoundHandle*, int) (sound.cpp:981)
==27583==    by 0x8067A2A:
Scumm::Sound::startTalkSound(unsigned, unsigned, int,
PlayingSoundHandle*) (sound.cpp:709)

It's not unique to MONSTER.SOU, though - I got the same
message when I tested my not-yet-committed support for
compressed music in Broken Sword II. It looks like it's
leaking one block of memory for each Vorbis stream
that's created. I think it's the OggVorbis_File object
that makeVorbisStream() allocates, but I don't know if
it's enough to simply "delete _ov_file" in the
VorbisInputStream destructor, or if that'll break
something else. Valgrind debugging is too depressingly
slow on my computer to do any extensive testing of
unfamiliar code.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1022265&group_id=37116




More information about the Scummvm-tracker mailing list