#9458: Memory leak in BMediaFile -> BMediaTrack
--------------------------+------------------------------------------------
Reporter: Robert S. | Owner: leavengood
Type: bug | Status: assigned
Priority: normal | Milestone: R1
Component: Kits/Media | Version: R1/Development
Kit |
Resolution: | Keywords: BMediaFile BMediaTrack memory leak
Blocked By: | Blocking:
Platform: All |
--------------------------+------------------------------------------------
Comment (by pulkomandy):
So, for reference here is the leak analyzer output:
{{{
allocation: base: 0xd62dc80; size: 892; thread: 1685; alignment: 64
<libroot.so> panic(char const *,...) + 0x4206 (nearest)
<libroot.so> panic(char const *,...) + 0x46d9 (nearest)
<libroot.so> panic(char const *,...) + 0x5bab (nearest)
<libroot.so> memalign + 0x29
<libroot.so> posix_memalign + 0x5e
0x172636e (lookup failed: Invalid Argument)
0x1b259d4 (lookup failed: Invalid Argument)
<libmedia.so>
BPrivate::media::MediaWriter::CreateEncoder(BPrivate::media::Encoder **,
media_codec_info const *, media_format *, unsigned long) + 0x9d
<libmedia.so>
BMediaTrack::BMediaTrack(BPrivate::media::MediaWriter *, long,
media_format *, media_codec_info const *) + 0xbd
<libmedia.so> BMediaFile::CreateTrack(media_format *,
media_codec_info const *, unsigned long) + 0xb5
<main> DebugClass::TestMethod(void) + 0x102
<main> main + 0x6c
<main> _start + 0x5b
0x21037f0 (lookup failed: Invalid Argument)
0x655e8258 (lookup failed: Invalid Argument)
}}}
Unfortunately, the interesting part of it is missing, because by the time
the leak analysis is done, the ffmpeg plugin is already unloaded. And so
we get the two "lookup failed" entries in the middle of the backtrace...
The posix_memalign is probably called from inside av_malloc. But I didn't
spot any obvious place where we forgot to free something.
--
Ticket URL: <https://dev.haiku-os.org/ticket/9458#comment:13>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.