/hg/icedtea7: 2 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Thu Jun 28 16:20:52 PDT 2012


changeset 13433cc671d4 in /hg/icedtea7
details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=13433cc671d4
author: Andrew John Hughes <gnu_andrew at member.fsf.org>
date: Thu Jun 28 23:59:37 2012 +0100

	Bump to jdk7u6 b14.

	2012-06-28  Andrew John Hughes  <gnu_andrew at member.fsf.org>

		* Makefile.am:
		(OPENJDK_VERSION): Bump to b14.
		(CORBA_CHANGESET): Update to IcedTea7 forest head.
		(HOTSPOT_CHANGESET): Likewise.
		(JAXP_CHANGESET): Likewise.
		(JAXWS_CHANGESET): Likewise.
		(JDK_CHANGESET): Likewise.
		(LANGTOOLS_CHANGESET): Likewise.
		(OPENJDK_CHANGESET): Likewise.
		(CORBA_SHA256SUM): Likewise.
		(HOTSPOT_SHA256SUM): Likewise.
		(JAXP_SHA256SUM): Likewise.
		(JAXWS_SHA256SUM): Likewise.
		(JDK_SHA256SUM): Likewise.
		(LANGTOOLS_SHA256SUM): Likewise.
		(OPENJDK_SHA256SUM): Likewise.


changeset 3b4d1d6a3b63 in /hg/icedtea7
details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=3b4d1d6a3b63
author: Andrew John Hughes <gnu_andrew at member.fsf.org>
date: Fri Jun 29 00:02:21 2012 +0100

	Merge


diffstat:

 ChangeLog                                                                     |  35 ++++++++++
 Makefile.am                                                                   |  30 ++++----
 NEWS                                                                          |   1 +
 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java              |   3 +
 pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c               |  21 +++--
 pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java |  13 +++
 6 files changed, 79 insertions(+), 24 deletions(-)

diffs (196 lines):

diff -r 99a066e161af -r 3b4d1d6a3b63 ChangeLog
--- a/ChangeLog	Wed Jun 27 15:54:44 2012 -0400
+++ b/ChangeLog	Fri Jun 29 00:02:21 2012 +0100
@@ -1,3 +1,38 @@
+2012-06-28  Andrew John Hughes  <gnu_andrew at member.fsf.org>
+
+	* Makefile.am:
+	(OPENJDK_VERSION): Bump to b14.
+	(CORBA_CHANGESET): Update to IcedTea7 forest head.
+	(HOTSPOT_CHANGESET): Likewise.
+	(JAXP_CHANGESET): Likewise.
+	(JAXWS_CHANGESET): Likewise.
+	(JDK_CHANGESET): Likewise.
+	(LANGTOOLS_CHANGESET): Likewise.
+	(OPENJDK_CHANGESET): Likewise.
+	(CORBA_SHA256SUM): Likewise.
+	(HOTSPOT_SHA256SUM): Likewise.
+	(JAXP_SHA256SUM): Likewise.
+	(JAXWS_SHA256SUM): Likewise.
+	(JDK_SHA256SUM): Likewise.
+	(LANGTOOLS_SHA256SUM): Likewise.
+	(OPENJDK_SHA256SUM): Likewise.
+
+2012-06-28  Omair Majid  <omajid at redhat.com>
+
+	* NEWS: Update with fix.
+	* 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.
+
 2012-06-26  Omair Majid  <omajid at redhat.com>
 
 	* test/tapset/jstaptest.pl (get_arch_dir): Fix dir for x86.
diff -r 99a066e161af -r 3b4d1d6a3b63 Makefile.am
--- a/Makefile.am	Wed Jun 27 15:54:44 2012 -0400
+++ b/Makefile.am	Fri Jun 29 00:02:21 2012 +0100
@@ -1,24 +1,24 @@
 # Dependencies
 
-OPENJDK_VERSION = b13
+OPENJDK_VERSION = b14
 JDK_UPDATE_VERSION = 06
 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION)
 
-CORBA_CHANGESET = 7563af238aaf
-HOTSPOT_CHANGESET = 8d01d54c01ce
-JAXP_CHANGESET = 590d8b5ba966
-JAXWS_CHANGESET = 9527a5961398
-JDK_CHANGESET = 9022ed117d90
-LANGTOOLS_CHANGESET = ce88d36be582
-OPENJDK_CHANGESET = 4ad80e78b55b
+CORBA_CHANGESET = a4f33c9cfe7a
+HOTSPOT_CHANGESET = 0ca5b2700768
+JAXP_CHANGESET = 0dd012bd32dd
+JAXWS_CHANGESET = 403d2af913f8
+JDK_CHANGESET = 5ed9d9f10873
+LANGTOOLS_CHANGESET = e899fe9f5be5
+OPENJDK_CHANGESET = d85c6b19aed5
 
-CORBA_SHA256SUM = 06d7cfca4dc14a65329fc3e5314599aa2b6a2609fd83745321870ba19faae857
-HOTSPOT_SHA256SUM = 62d71622b9f052b769e521449f95e080801a982fcfd8383e8529485cbbc30d4d
-JAXP_SHA256SUM = 0fad006fded04011fb71a1bd4405d60e0c4731d8662576f5dde825342a383701
-JAXWS_SHA256SUM = d1ceb2f1182766d199a9118603669a35d1b1f62cb42f92af4cf14c554840b006
-JDK_SHA256SUM = 94e455e2409a0717bc1dbd86488bce9fcf4e4fff84143bd136c2b28e77be80e5
-LANGTOOLS_SHA256SUM = ba6f16e69d18686935f25aefaee36f0a39bda4f6f8f7260513f5c53e777340a6
-OPENJDK_SHA256SUM = 65e54962cf9b77b6967a814515a58d7660624be0464af599229e6ad55647eb7e
+CORBA_SHA256SUM = f01d45a1a783c0c571064c0b3cdfa73f498bdfb645a9b9cdbdc398b6cc5e28ad
+HOTSPOT_SHA256SUM = e3b3141be8ddae0d10bfb9f169910aeffc4dc4ce5ad8941454004290f7cd09b2
+JAXP_SHA256SUM = 89ada256ef3befda5909be87b5e5e04074dc25c7f7278394dcc9e92cf9959d0f
+JAXWS_SHA256SUM = 7ef28892b1d91ef3b5aef5d8505dcec17744469401a7329aad39d51432ab4f1e
+JDK_SHA256SUM = 6f249b2ebc21ca0247b767a25d59ef310e99a2783957dbd62a3101040e0bf537
+LANGTOOLS_SHA256SUM = a0b6b362397dbae173ee9c3dbd040170891591044829ca03a72a307186764dc7
+OPENJDK_SHA256SUM = 07bc36f9ab45609e053904ad7d66ca2ae7c79748c3173149bf03886bf949058f
 
 CACAO_VERSION = a567bcb7f589
 CACAO_SHA256SUM = d49f79debc131a5694cae6ab3ba2864e7f3249ee8d9dc09aae8afdd4dc6b09f9
diff -r 99a066e161af -r 3b4d1d6a3b63 NEWS
--- a/NEWS	Wed Jun 27 15:54:44 2012 -0400
+++ b/NEWS	Fri Jun 29 00:02:21 2012 +0100
@@ -14,6 +14,7 @@
 
 * Bug fixes
   - PR986: IcedTea7 fails to build with IcedTea6 CACAO due to low max heap size
+  - PR1050: Stream objects not garbage collected
 
 New in release 2.2.1 (2012-06-12):
 
diff -r 99a066e161af -r 3b4d1d6a3b63 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java
--- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java	Wed Jun 27 15:54:44 2012 -0400
+++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java	Fri Jun 29 00:02:21 2012 +0100
@@ -160,7 +160,10 @@
 
     public static final String DEFAULT_DEVICE = null;
 
+    // stores a pointer to pa_stream
     private byte[] streamPointer;
+    // stores a pointer to the java_context/this object for callbacks
+    private byte[] contextPointer;
 
     static {
         SecurityWrapper.loadNativeLibrary();
diff -r 99a066e161af -r 3b4d1d6a3b63 pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c
--- a/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c	Wed Jun 27 15:54:44 2012 -0400
+++ b/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c	Fri Jun 29 00:02:21 2012 +0100
@@ -313,6 +313,8 @@
     j_context->env = env;
     j_context->obj = (*env)->NewGlobalRef(env, obj);
 
+    setJavaPointer(env, obj, CONTEXT_POINTER, j_context);
+
     pa_context* context = convertJavaPointerToNative(env, contextPointer);
     assert(context);
 
@@ -352,7 +354,7 @@
         (*env)->ReleaseStringUTFChars(env, nameString,name);
     }
 
-    setJavaPointer(env, obj, "streamPointer", stream);
+    setJavaPointer(env, obj, STREAM_POINTER, stream);
 
     /*
      *
@@ -380,10 +382,17 @@
  */
 JNIEXPORT void JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1unref
 (JNIEnv* env, jobject obj) {
+
+    java_context* j_context = getJavaPointer(env, obj, CONTEXT_POINTER);
+    assert(j_context);
+    (*env)->DeleteGlobalRef(env, j_context->obj);
+    free(j_context);
+    setJavaPointer(env, obj, CONTEXT_POINTER, NULL);
+
     pa_stream* stream = getJavaPointer(env, obj, STREAM_POINTER);
     assert(stream);
     pa_stream_unref(stream);
-    setJavaPointer(env, obj, "streamPointer", NULL);
+    setJavaPointer(env, obj, STREAM_POINTER, NULL);
 }
 
 /*
@@ -696,9 +705,7 @@
 
 static void cork_callback(pa_stream* stream, int success, void* userdata) {
 
-    java_context* context = userdata;
     assert(stream);
-    assert(context);
     JNIEnv* env = pulse_thread_env;
     assert(env);
     notifyWaitingOperations(env);
@@ -718,11 +725,7 @@
 (JNIEnv* env, jobject obj, jint yes) {
     pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, STREAM_POINTER);
     assert(stream);
-    java_context* j_context = malloc(sizeof(java_context));
-    assert(j_context);
-    j_context->env = env;
-    j_context->obj = (*env)->NewGlobalRef(env, obj);
-    pa_operation* operation = pa_stream_cork(stream, yes, cork_callback, j_context);
+    pa_operation* operation = pa_stream_cork(stream, yes, cork_callback, NULL);
     assert(operation);
     return convertNativePointerToJava(env, operation);
 }
diff -r 99a066e161af -r 3b4d1d6a3b63 pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java
--- a/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java	Wed Jun 27 15:54:44 2012 -0400
+++ b/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java	Fri Jun 29 00:02:21 2012 +0100
@@ -115,6 +115,19 @@
 		clip.close();
 	}
 
+    @Test
+    public void testOpenCloseLotsOfTimes() throws LineUnavailableException,
+            UnsupportedAudioFileException, IOException {
+        File soundFile = new File("testsounds/startup.wav");
+        AudioInputStream audioInputStream = AudioSystem
+                .getAudioInputStream(soundFile);
+        for (int i = 0; i < 1000; i++) {
+            Clip clip = (Clip) mixer.getLine(new Line.Info(Clip.class));
+            clip.open(audioInputStream);
+            clip.close();
+        }
+    }
+
 	@Test
 	public void testLoop4Times() throws LineUnavailableException, IOException,
 			UnsupportedAudioFileException {



More information about the distro-pkg-dev mailing list