RFC: PR1050 - Stream objects not garbage collected?

Omair Majid omajid at redhat.com
Thu Jun 28 09:49:12 PDT 2012


On 06/27/2012 07:26 PM, Andrew Hughes wrote:
> 
> 
> ----- Original Message -----
>> Hi,
>>
>> The attached patch is a fix for PR105. It was caused by the JVM
>> hanging
>> on to global references to Stream objects. A test case is included
>> (causes an OutOfMemoryError without the fix). I did notice a few
>> other
>> structs not being free()d and removed them (or added calls to free()
>> them).
>>
>> Okay to commit?
>>
>> ChangeLog:
>> 2012-05-27  Omair Majid  <omajid at redhat.com>
>>
>> * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java:
>> Add new member variable contextPointer.
>> * pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c
>> (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1new):
>> Save j_context as contextPointer.
>> (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1unref):
>> Delete the global ref and dellocate the java context
>> (cork_callback): Don't check userdata. It is NULL.
>> (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1cork):
>> Dont allocate and pass a java_context to pa_stream_cork. It is not
>> needed.
>> *
>> pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java
>> (testOpenCloseLotsOfTimes): New method.
>>
>> Thanks,
>> Omair
>>
> 
> Please do to 6, 7, 8.

I am going to hold off on 8 for the moment. It needs a repeat of
forward-port of the pulse-java fixes that I did from 6 to 7 (this time 6
to 8) first. Instead, I am going to try and see if this can be included
in upstream jdk8 itself.

>  Did you have any branches in mind too?

Not at the moment. I know the bug was filed against 1.9, but that is
missing other pulse-java fixes too. Let me ask the reporter about this.

Thanks,
Omair



More information about the distro-pkg-dev mailing list