It looks like a bug in IcedTea PulseAudio provider implementation.
You can file a bug report at http://icedtea.classpath.org/

regards
Alex

On 15.06.2012 18:14, HAAS Christian wrote:
Hello there!
We have been using IcedTea/PulseAudio for some load tests for playing
audio and came across a memory leak which we are now searching.
Test setup: Create a Clip object of some arbitrary sound file, play it
once, then close it – rinse and repeat, many times.
After a few hours we came across an out of memory exception. Analysing
the memory dump we found that all Clip objects were still active, with
the garbage collector root being "JNI Global" for the stream objects
that each Clip is creating. See attached image showing a selected Clip
object. The clip itself was kept alive through callback interfaces to
Stream, but isOpen=false proves that close() was called.
I then proceeded to go through the code of icedtea6-1.9.13 and came
across the Stream.java / org_classpath_icedtea_pulseaudio_Stream.c pair.
The native function for native_pa_stream_new() does the call to
NewGlobalRef() to keep the Stream object alive – presumably for the
callbacks. But I didn't find the complementary call to DeleteGlobalRef().
I'd assume this should be done in native_pa_stream_unref(), as this one
is the last to be called from PulseAudioDataLine.close() -> Stream.free() .
How is the stream expected to be released properly? Are we missing
something or is this leak genuine?
For now we will modify our code to keep and reuse the Clip objects, but
it would be good to know the root cause.
Thanks and kind regards,
ch
____________________________________________________
*Christian Haas
*Software Engineer
FREQUENTIS AG

Innovationsstraße 1, 1100 Vienna, Austria
Phone +43-1-811 50 – 8353
Mobile +43-664-60 850 – 8353
Fax +43-1-811 50 – 77 8353
Web_www.frequentis.com_
E-Mail _christian.haas@frequentis.com_
<mailto:christian.h...@frequentis.com>
Handelsgericht Wien (Vienna Commercial Court): FN 72115 b
DVR 0364797, ATU 14715600
____________________________________________________
Diese E-Mail könnte vertrauliche und/oder rechtlich geschützte
Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder
diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser E-Mail sind nicht gestattet.
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

Reply via email to