Possible memory leak in NATIVE model

11 views
Skip to first unread message

Stas Oskin

unread,
Dec 13, 2009, 4:14:07 PM12/13/09
to xuggler-users
Hi.

I'm trying again to hunt a quite elusive memory leak, and I think I managed to reproduce it in Xuggler NATIVE BUFFERS model.

Here is a short code sample, which:
1) Opens 500 files at once
2) Writes to them
3) Closing them
4) Goes to step 1 again

http://pastebin.com/m7b576320


With this test, the memory seem to steadily grow, without dropping down to the original levels.

Any chance there is a leak in files / codecs closing, when using the NATIVE model?

Thanks in advance.

Art Clarke

unread,
Dec 13, 2009, 4:45:33 PM12/13/09
to xuggle...@googlegroups.com
Possible, yes, but that specific test (with one file) is tested in the Valgrind memory leak test suite with every checkin.

It's more likely that somewhere there is a Java object that you didn't call .delete() on.  Have you checked your debug memory logs?

- Art

--

You received this message because you are subscribed to the Google Groups "xuggler-users" group.
To post to this group, send email to xuggle...@googlegroups.com.
To unsubscribe from this group, send email to xuggler-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xuggler-users?hl=en.



--
http://www.xuggle.com/
xu‧ggle (zŭ' gl) v. To freely encode, decode, and experience audio and video.

Use Xuggle to get the power of FFmpeg in Java.

Stas Oskin

unread,
Dec 14, 2009, 7:05:54 AM12/14/09
to xuggle...@googlegroups.com
Hi.

Thanks for the advice. I actually quite supposed you check for such trivial matter, just wasn't sure if this exact case is being checked.

Can you remind me about the debug memory logs, and how to use them? Also, do they exist in 3.2, or they were only added in 3.3?

Thanks.

Art Clarke

unread,
Dec 14, 2009, 10:25:11 AM12/14/09
to xuggle...@googlegroups.com
I think they exist in 3.2, and see the com.xuggle.ferry.JNIMemoryManager object.

- Art

Stas Oskin

unread,
Dec 14, 2009, 11:10:04 AM12/14/09
to xuggle...@googlegroups.com
Hi.

Thanks, will give them a look.

Regards.

Stas Oskin

unread,
Dec 15, 2009, 11:51:48 AM12/15/09
to xuggle...@googlegroups.com
Hi Art.

Can you remind me, how to turn on the advanced memory logging?

The one that would output not only the native objects, but give their type as well.

Also, do you remember if this was enabled in 3.2, or exist only in 3.3?

Thanks.

Art Clarke

unread,
Dec 15, 2009, 1:08:17 PM12/15/09
to xuggle...@googlegroups.com
Asked and answered Stas... check the javadoc for the object I mentioned -- there's only 8 methods :)

- Art

Stas Oskin

unread,
Dec 15, 2009, 3:37:13 PM12/15/09
to xuggle...@googlegroups.com
Blush :).
Reply all
Reply to author
Forward
0 new messages