From gbenson at redhat.com Wed Oct 1 02:52:07 2008 From: gbenson at redhat.com (Gary Benson) Date: Wed, 01 Oct 2008 09:52:07 +0000 Subject: changeset in /hg/icedtea6: 2008-10-01 Gary Benson changeset f4981f8a1720 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=f4981f8a1720 description: 2008-10-01 Gary Benson * ports/hotspot/src/share/vm/shark/sharkState.cpp: Remove a section of old code that had been #ifdef'd out. diffstat: 2 files changed, 5 insertions(+), 261 deletions(-) ChangeLog | 5 ports/hotspot/src/share/vm/shark/sharkState.cpp | 261 ----------------------- diffs (283 lines): diff -r d03dd528c2ed -r f4981f8a1720 ChangeLog --- a/ChangeLog Tue Sep 30 13:22:52 2008 -0400 +++ b/ChangeLog Wed Oct 01 05:52:01 2008 -0400 @@ -1,3 +1,8 @@ 2008-09-30 Lillian Angel + + * ports/hotspot/src/share/vm/shark/sharkState.cpp: Remove a + section of old code that had been #ifdef'd out. + 2008-09-30 Lillian Angel * Makefile.am diff -r d03dd528c2ed -r f4981f8a1720 ports/hotspot/src/share/vm/shark/sharkState.cpp --- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Tue Sep 30 13:22:52 2008 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Wed Oct 01 05:52:01 2008 -0400 @@ -205,267 +205,6 @@ void SharkPHIState::add_incoming(SharkSt } } -#if 0 -void SharkTrackingState::decache_for(CDReason reason, ciMethod *callee) -{ - // Start recording the debug information - OopMap *oopmap = new OopMap( - oopmap_slot_munge(function()->oopmap_frame_size()), - oopmap_slot_munge(function()->arg_size())); - int offset = function()->code_offset(); - debug_info()->add_safepoint(offset, oopmap); - - // Decache expression stack slots as necessary - GrowableArray *exparray = - new GrowableArray(stack_depth()); - - for (int i = stack_depth() - 1; i >= 0; i--) { - SharkValue *value = stack(i); - - Location::Type type = Location::normal; - if (value && value->is_jobject()) - type = Location::oop; - - int dst = i + max_stack() - stack_depth(); - int oiwfusp = function()->stack_slots_offset() + dst; - VMReg dst_as_vmreg = slot2reg(oiwfusp); - LocationValue* dst_as_lv = slot2lv(oiwfusp, type); - - bool write = false; - bool record = false; - - if (reason == TRAP) { - write = value != NULL; - record = true; - } - else if (value) { - if (reason == JAVA_CALL && i < callee->arg_size()) { - write = true; - record = false; - } - else { - write = value->is_jobject(); - record = true; - } - } - - if (write) { - if (value->is_two_word()) { - assert(i > 0, "should be"); - assert(stack(i - 1) == NULL, "should be"); - dst--; - } - - builder()->CreateStore( - value->generic_value(), - builder()->CreateBitCast( - builder()->CreateStructGEP(function()->stack_slots(), dst), - PointerType::getUnqual(SharkType::to_stackType( - value->basic_type())))); - - if (record) - oopmap->set_oop(dst_as_vmreg); - } - - if (record) - exparray->append(dst_as_lv); - } - - // If we're decaching for a call then pop the arguments - int trim_slots = max_stack() - stack_depth(); - if (reason == JAVA_CALL) - pop(callee->arg_size()); - - // Record any monitors - GrowableArray *monarray = - new GrowableArray(function()->monitor_count()); - - for (int i = 0; i < function()->monitor_count(); i++) { - int box_oiwfusp = - function()->monitors_slots_offset() + - i * frame::interpreter_frame_monitor_size(); - - int obj_oiwfusp = - box_oiwfusp + - (BasicObjectLock::obj_offset_in_bytes() >> LogBytesPerWord); - - oopmap->set_oop(slot2reg(obj_oiwfusp)); - - monarray->append(new MonitorValue( - slot2lv (obj_oiwfusp, Location::oop), - slot2loc(box_oiwfusp, Location::normal))); - } - - // Record the exception slot - oopmap->set_oop(slot2reg(function()->exception_slot_offset())); - - // Decache the method pointer - builder()->CreateStore(method(), function()->method_slot()); - oopmap->set_oop(slot2reg(function()->method_slot_offset())); - - // Decache the PC - builder()->CreateStore( - builder()->CreateAdd( - function()->base_pc(), LLVMValue::intptr_constant(offset)), - function()->pc_slot()); - - // Decache local variables as necesary - GrowableArray *locarray = - new GrowableArray(max_locals()); - - for (int i = 0; i < max_locals(); i++) { - SharkValue *value = local(i); - - Location::Type type = Location::invalid; - if (value) { - if (value->is_jobject()) - type = Location::oop; - else - type = Location::normal; - } - else if (i > 0) { - SharkValue *prev = local(i - 1); - if (prev && prev->is_two_word()) - type = Location::normal; - } - - int dst = max_locals() - 1 - i; - int oiwfusp = function()->locals_slots_offset() + dst; - VMReg dst_as_vmreg = slot2reg(oiwfusp); - LocationValue* dst_as_lv = slot2lv(oiwfusp, type); - - if (value) { - if (value->is_two_word()) { - assert(i + 1 < max_locals(), "should be"); - assert(local(i + 1) == NULL, "should be"); - dst--; - } - - if (reason == TRAP || value->is_jobject()) { - builder()->CreateStore( - value->generic_value(), - builder()->CreateBitCast( - builder()->CreateStructGEP(function()->locals_slots(), dst), - PointerType::getUnqual( - SharkType::to_stackType(value->basic_type())))); - } - - if (value->is_jobject()) - oopmap->set_oop(dst_as_vmreg); - } - locarray->append(dst_as_lv); - } - - // Trim back the stack if necessary - if (trim_slots) { - function()->CreateStoreZeroStackPointer( - builder()->CreatePtrToInt( - builder()->CreateStructGEP( - function()->stack_slots(), trim_slots), - SharkType::intptr_type())); - } - - // Record the scope and end the block of debug information - DebugToken *locvals = debug_info()->create_scope_values(locarray); - DebugToken *expvals = debug_info()->create_scope_values(exparray); - DebugToken *monvals = debug_info()->create_monitor_values(monarray); - debug_info()->describe_scope( - offset, block()->target(), block()->bci(), locvals, expvals, monvals); - debug_info()->end_safepoint(offset); -} - -void SharkTrackingState::cache_after(CDReason reason, ciMethod *callee) -{ - assert(reason != TRAP, "shouldn't be"); - - // If we're caching after a call then push a dummy result to set up the stack - int result_size = reason == JAVA_CALL ? callee->return_type()->size() : 0; - if (result_size) { - ciType *result_type; - switch (callee->return_type()->basic_type()) { - case T_BOOLEAN: - case T_BYTE: - case T_CHAR: - case T_SHORT: - result_type = ciType::make(T_INT); - break; - - default: - result_type = callee->return_type(); - } - - push(SharkValue::create_generic(result_type, NULL)); - if (result_size == 2) - push(NULL); - } - - // Cache expression stack slots as necessary - for (int i = 0; i < stack_depth(); i++) { - SharkValue *value = stack(i); - if (value == NULL) { - set_stack(i, NULL); - continue; - } - - bool read; - - if (i < result_size) { - read = true; - } - else { - read = value->is_jobject(); - } - - if (read) { - int src = i + max_stack() - stack_depth(); - if (value->is_two_word()) { - assert(i > 0, "should be"); - assert(stack(i - 1) == NULL, "should be"); - src--; - } - - set_stack( - i, - SharkValue::create_generic( - value->type(), - builder()->CreateLoad( - builder()->CreateBitCast( - builder()->CreateStructGEP(function()->stack_slots(), src), - PointerType::getUnqual( - SharkType::to_stackType(value->basic_type())))))); - } - } - - // Cache the method pointer - set_method(builder()->CreateLoad(function()->method_slot())); - - // Cache local variables as necesary - for (int i = max_locals() - 1; i >= 0; i--) { - SharkValue *value = local(i); - if (value && value->is_jobject()) { - int src = max_locals() - 1 - i; - set_local( - i, - SharkValue::create_generic( - value->type(), - builder()->CreateLoad( - builder()->CreateBitCast( - builder()->CreateStructGEP(function()->locals_slots(), src), - PointerType::getUnqual( - SharkType::to_stackType(value->type())))))); - } - } - - // Restore the stack pointer if necessary - if (stack_depth() != max_stack()) { - function()->CreateStoreZeroStackPointer( - builder()->CreatePtrToInt( - builder()->CreateStructGEP(function()->stack_slots(), 0), - SharkType::intptr_type())); - } -} -#endif // 0 - void SharkTrackingState::merge(SharkState* other, BasicBlock* other_block, BasicBlock* this_block) From mark at klomp.org Thu Oct 2 02:46:51 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 02 Oct 2008 11:46:51 +0200 Subject: Public open specs In-Reply-To: <48DB92FC.3060100@sun.com> References: <20080917084136.GA10250@bamboo.destinee.acro.gen.nz> <48D0C79F.1080909@redhat.com> <20080917235155.GA10355@rivendell.middle-earth.co.uk> <20080918010821.GD10250@bamboo.destinee.acro.gen.nz> <17c6771e0809180328s3aeacca4m8a3969ba2abf4c84@mail.gmail.com> <1221735243.3256.14.camel@dijkstra.wildebeest.org> <48D25FA3.1010101@sun.com> <1221748023.3256.55.camel@dijkstra.wildebeest.org> <48D3779C.4090503@sun.com> <1221819427.3288.2.camel@dijkstra.wildebeest.org> <48D38203.8040609@sun.com> <1221821605.3288.10.camel@dijkstra.wildebeest.org> <48D38A0B.8070305@sun.com> <1222347445.3266.72.camel@dijkstra.wildebeest.org> <48DB92FC.3060100@sun.com> Message-ID: <1222940811.3265.12.camel@dijkstra.wildebeest.org> Hi Dalibor, On Thu, 2008-09-25 at 15:32 +0200, Dalibor Topic wrote: > Mark Wielaard wrote: > > Any progress on getting this specification open and public? > > > Unfortunately, there is no visible progress yet. Any invisible progress then now? Thanks, Mark From mjw at redhat.com Thu Oct 2 02:49:30 2008 From: mjw at redhat.com (Mark Wielaard) Date: Thu, 02 Oct 2008 11:49:30 +0200 Subject: Cleaning up crypto support In-Reply-To: <1222369008.3266.91.camel@dijkstra.wildebeest.org> References: <1219931049.4019.32.camel@dijkstra.wildebeest.org> <1222369008.3266.91.camel@dijkstra.wildebeest.org> Message-ID: <1222940970.3265.16.camel@dijkstra.wildebeest.org> Hi, On Thu, 2008-09-25 at 20:56 +0200, Mark Wielaard wrote: > I believe this version is pretty clean. And it should be simple to > verify that it works correctly now since all unnecessary code is just > thrown out. Of course I threw all the crypto and security tests at it > that I could find and all happily passed. I did alter the TestUtil class > so that it always checks all algorithms and full keys. > > It would be nice to push this in OpenJDK proper so there is less > divergence and so the GPLed version always has full crypto support > enabled. > > If you still want to support a ClosedJDK with restricted crypto support > then all you have to do it provide your own Cipher and JceSecurity > class, plus any of the now removed auxiliary classes JarVerfifier and > JceSecurityManager. Everything else can be the same between the free > openjdk and proprietary closedjdk. > > Please let me know if you would need any help integrating this. > I did already push it into icedtea6. I didn't see any replies to this yet. Please do let me know if I can help in any way to get this pushed forward faster. Thanks, Mark From bugzilla-daemon at icedtea.classpath.org Thu Oct 2 07:41:40 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 02 Oct 2008 14:41:40 +0000 Subject: [Bug 199] New: Crash during a build of xerces-j2 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=199 Summary: Crash during a build of xerces-j2 Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: mvyskocil at suse.cz The openjdk (b09) often crashs during a build of xerces-j2 (from jpackage 5.0). The build was done in a chrooted environment with empty /proc. $ ant -Dbuild.compiler=modern clean jars /usr/bin/build-classpath: error: Could not find jaxp_parser_impl Java extension for this JVM /usr/bin/build-classpath: error: Some specified jars were not found OpenJDK 64-Bit Server VM warning: Can't detect initial thread stack location - find_vma failed [snip] prepare-src: [copy] Copying 1 file to /usr/src/packages/BUILD/xerces-2_7_1/build/classes/META-INF/services Exception in thread "Reference Handler" java.lang.IllegalMonitorStateException at java.lang.Object.notifyAll(Native Method) at java.lang.ref.ReferenceQueue.enqueue(ReferenceQueue.java:68) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:146) [copy] Copying 682 files to /usr/src/packages/BUILD/xerces-2_7_1/build/src # # An unexpected error has been detected by Java Runtime Environment: # # Internal Error (nmethod.cpp:1740), pid=25811, tid=1105303888 # Error: guarantee(nm->_lock_count >= 0,"unmatched nmethod lock/unlock") # # Java VM: OpenJDK 64-Bit Server VM (1.6.0-b09 mixed mode linux-amd64) # An error report file with more information is saved as: # /usr/src/packages/BUILD/xerces-2_7_1/hs_err_pid25811.log # # If you would like to submit a bug report, please visit: # http://icedtea.classpath.org/bugzilla # Ne?sp??n? ukon?en (SIGABRT) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Oct 2 07:42:57 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 02 Oct 2008 14:42:57 +0000 Subject: [Bug 199] Crash during a build of xerces-j2 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=199 ------- Comment #1 from mvyskocil at suse.cz 2008-10-02 14:42 ------- Created an attachment (id=103) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=103&action=view) A crashlog from compiler -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From langel at redhat.com Thu Oct 2 07:56:21 2008 From: langel at redhat.com (Lillian Angel) Date: Thu, 02 Oct 2008 14:56:21 +0000 Subject: changeset in /hg/icedtea6: 2008-10-02 Lillian Angel changeset 09dcedbe63a8 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=09dcedbe63a8 description: 2008-10-02 Lillian Angel * HACKING: Updated with new visualvm patch. * INSTALL: Updated to include netbeans in requirements. * Makefile.am: Updated to build and install visualvm with system-installed NetBeans 6.1 (currently in Fedora rawhide). Added new visualvm patch to the list and removed need for NetBeans platform sources. * README: Updated visualvm notes. * acinclude.m4: Updated to find netbeans and removed WITH_NETBEANS_PLATFORM_SRC_ZIP check. * configure.ac: Updated to check for netbeans and added --with-netbeans-home option. * patches/icedtea-visualvm.patch: Visualvm patch. diffstat: 8 files changed, 178 insertions(+), 68 deletions(-) ChangeLog | 15 ++++ HACKING | 1 INSTALL | 1 Makefile.am | 127 +++++++++++++++++++++++++--------------- README | 11 +-- acinclude.m4 | 42 +++++++------ configure.ac | 23 ++++++- patches/icedtea-visualvm.patch | 26 ++++++++ diffs (495 lines): diff -r f4981f8a1720 -r 09dcedbe63a8 ChangeLog --- a/ChangeLog Wed Oct 01 05:52:01 2008 -0400 +++ b/ChangeLog Thu Oct 02 10:55:55 2008 -0400 @@ -1,3 +1,18 @@ 2008-10-01 Gary Benson + + * HACKING: Updated with new visualvm patch. + * INSTALL: Updated to include netbeans in requirements. + * Makefile.am: Updated to build and install visualvm with + system-installed NetBeans 6.1 (currently in Fedora rawhide). Added new + visualvm patch to the list and removed need for NetBeans platform + sources. + * README: Updated visualvm notes. + * acinclude.m4: Updated to find netbeans and removed + WITH_NETBEANS_PLATFORM_SRC_ZIP check. + * configure.ac: Updated to check for netbeans and added + --with-netbeans-home option. + * patches/icedtea-visualvm.patch: Visualvm patch. + 2008-10-01 Gary Benson * ports/hotspot/src/share/vm/shark/sharkState.cpp: Remove a diff -r f4981f8a1720 -r 09dcedbe63a8 HACKING --- a/HACKING Wed Oct 01 05:52:01 2008 -0400 +++ b/HACKING Thu Oct 02 10:55:55 2008 -0400 @@ -53,6 +53,7 @@ The following patches are currently appl * icedtea-tools.patch: Remove DebugHelperHelper and add sources in make/java/awt/Makefile to fix build of jvmti. * icedtea-use-system-tzdata.patch: Use timezone data from the system (PR70/S6593486). * icedtea-version.patch: Replace name and bug URL with IcedTea versions. +* icedtea-visualvm.patch: Patches sources to build with platform8 and profiler3 instead of platform7 and profiler2. * icedtea-webservices.patch: Add applet support. * icedtea-zero-build.patch: Add support for the zero assembler build. * icedtea-shark-build.patch: Add support for building the Shark JIT. diff -r f4981f8a1720 -r 09dcedbe63a8 INSTALL --- a/INSTALL Wed Oct 01 05:52:01 2008 -0400 +++ b/INSTALL Thu Oct 02 10:55:55 2008 -0400 @@ -30,6 +30,7 @@ libjpeg-devel = 6b libjpeg-devel = 6b zlib-devel rhino +netbeans (harness, platform8, apisupport1, java2, ide9) - for visualvm For building the zero-assembler port (see below), you will need libffi. diff -r f4981f8a1720 -r 09dcedbe63a8 Makefile.am --- a/Makefile.am Wed Oct 01 05:52:01 2008 -0400 +++ b/Makefile.am Thu Oct 02 10:55:55 2008 -0400 @@ -5,7 +5,7 @@ CACAO_VERSION = 0.99.3 CACAO_VERSION = 0.99.3 CACAO_MD5SUM = 80de3ad344c1a20c086ec5f1390bd1b8 -NETBEANS_PLATFORM_MD5SUM = 77c79b3a7d3dbe6a8858639f8d564a38 +NETBEANS_BASIC_CLUSTER = a7ea855f475fa3a982f094a45c155ab4 NETBEANS_PROFILER_MD5SUM = ff8e8abc42df6c6749e6b02bcf7bb0a5 VISUALVM_MD5SUM = 4b55bc623418818793392bb233da2927 @@ -19,8 +19,8 @@ ICEDTEAPLUGIN_CLEAN = ICEDTEAPLUGIN_CLEAN = ICEDTEAPLUGIN_TARGET = ICEDTEAPLUGIN_JAR = +LIVECONNECT = PLUGIN_PATCH = patches/icedtea-plugin.patch -LIVECONNECT = if ENABLE_PLUGIN GCJWEBPLUGIN_CLEAN = clean-gcjwebplugin GCJWEBPLUGIN_TARGET = gcjwebplugin.so @@ -28,6 +28,12 @@ GCJWEBPLUGIN_CLEAN = GCJWEBPLUGIN_CLEAN = GCJWEBPLUGIN_TARGET = endif +endif + +if WITH_VISUALVM +VISUALVM_PATCH = patches/icedtea-visualvm.patch +else +VISUALVM_PATCH = endif # Top-Level Targets @@ -48,19 +54,15 @@ distclean-local: clean-copy clean-jtreg rm -rf hotspot-tools if ENABLE_LIVECONNECT rm -f IcedTeaPlugin.so - rm -rf IcedTeaPlugin.jar + rm -f IcedTeaPlugin.jar else if ENABLE_PLUGIN rm -f gcjwebplugin.so endif endif -if WITH_VISUALVM + rm -rf cacao rm -rf visualvm rm -rf netbeans -endif -if WITH_CACAO - rm -rf cacao -endif install: @@ -83,7 +85,7 @@ EXTRA_DIST = rt generated $(ICEDTEA_PATC overlays extra jconsole.desktop policytool.desktop \ test/jtreg patches/icedtea-plugin.patch \ patches/icedtea-liveconnect.patch IcedTeaPlugin.cc \ - HACKING + HACKING patches/icedtea-visualvm.patch # The Binary plugs directory is called jdk1.7.0 for historical reasons. The # name is completely irrelevant; only contains the plugs to build IcedTea. @@ -280,13 +282,8 @@ else CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz endif -NETBEANS_PLATFORM_URL = http://download.netbeans.org/netbeans/6.0/final/zip/ - -if USE_ALT_NETBEANS_PLATFORM_SRC_ZIP - NETBEANS_PLATFORM_SRC_ZIP = $(ALT_NETBEANS_PLATFORM_SRC_ZIP) -else - NETBEANS_PLATFORM_SRC_ZIP = netbeans-6.0.1-200801291616-platform-src.zip -endif +NETBEANS_BASIC_CLUSTER_URL = http://nbi.netbeans.org/files/documents/210/2056/ +NETBEANS_BASIC_CLUSTER_SRC_ZIP = netbeans-6.1-200805300101-basic_cluster-src.zip NETBEANS_PROFILER_URL = http://icedtea.classpath.org/visualvm/ @@ -334,19 +331,17 @@ endif endif endif if WITH_VISUALVM -if USE_ALT_NETBEANS_PLATFORM_SRC_ZIP -else - if ! echo "$(NETBEANS_PLATFORM_MD5SUM) $(NETBEANS_PLATFORM_SRC_ZIP)" \ + if ! echo "$(NETBEANS_BASIC_CLUSTER_MD5SUM) $(NETBEANS_BASIC_CLUSTER_SRC_ZIP)" \ | $(MD5SUM) --check ; \ then \ - if [ $(NETBEANS_PLATFORM_SRC_ZIP) ] ; \ + if [ $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) ] ; \ then \ - mv $(NETBEANS_PLATFORM_SRC_ZIP) $(NETBEANS_PLATFORM_SRC_ZIP).old ; \ + mv $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) $(NETBEANS_BASIC_CLUSTER_SRC_ZIP).old ; \ fi ; \ - $(WGET) $(NETBEANS_PLATFORM_URL)$(NETBEANS_PLATFORM_SRC_ZIP) \ - -O $(NETBEANS_PLATFORM_SRC_ZIP) ; \ - fi -endif + $(WGET) $(NETBEANS_BASIC_CLUSTER_URL)$(NETBEANS_BASIC_CLUSTER_SRC_ZIP) \ + -O $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) ; \ + fi + if USE_ALT_NETBEANS_PROFILER_SRC_ZIP else if ! echo "$(NETBEANS_PROFILER_MD5SUM) $(NETBEANS_PROFILER_SRC_ZIP)" \ @@ -384,8 +379,8 @@ endif endif if WITH_VISUALVM rm -f $(VISUALVM_SRC_ZIP) - rm -f $(NETBEANS_PLATFORM_SRC_ZIP) rm -f $(NETBEANS_PROFILER_SRC_ZIP) + rm -rf $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) endif # Link ports sources into tree @@ -510,7 +505,8 @@ ICEDTEA_PATCHES = \ $(GCC_PATCH) \ patches/icedtea-arch.patch \ patches/icedtea-lc_ctype.patch \ - patches/icedtea-messageutils.patch + patches/icedtea-messageutils.patch \ + $(VISUALVM_PATCH) if WITH_RHINO ICEDTEA_PATCHES += \ @@ -550,8 +546,17 @@ if WITH_VISUALVM if ! test -d netbeans ; \ then \ mkdir netbeans ; \ - $(UNZIP) -q $(NETBEANS_PLATFORM_SRC_ZIP) -d netbeans ; \ $(TAR) xf $(NETBEANS_PROFILER_SRC_ZIP) -C netbeans ; \ + $(UNZIP) -q $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) nbbuild/* -d netbeans/ ; \ + mv netbeans/profiler/ netbeans/profiler.cvs/ ; \ + $(UNZIP) -q $(NETBEANS_BASIC_CLUSTER_SRC_ZIP) \ + api.java/* api.progress/* apisupport.harness/* editor.mimelookup/* \ + o.jdesktop.layout/* openide.actions/* openide.awt/* \ + openide.dialogs/* openide.execution/* openide.explorer/* \ + openide.filesystems/* openide.io/* openide.loaders/* \ + openide.modules/* openide.nodes/* openide.text/* openide.util/* \ + openide.windows/* options.api/* projectapi/* queries/* java.platform/* \ + -d netbeans/ ; \ fi endif if [ ! -e $(abs_top_builddir)/generated ]; then \ @@ -595,6 +600,7 @@ stamps/patch.stamp: stamps/patch-fsg.sta echo WARNING make clean-patch before retrying a fix ; \ false; \ fi + if ENABLE_LIVECONNECT cp -a plugin/icedtea/sun/applet/*java openjdk/jdk/src/share/classes/sun/applet/ endif @@ -936,6 +942,7 @@ endif endif if WITH_VISUALVM mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \ + mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \ sed "s/APPNAME=\`basename.*\`/APPNAME=visualvm/" \ visualvm/visualvm/launcher/visualvm >> \ $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/jvisualvm ; \ @@ -944,18 +951,18 @@ if WITH_VISUALVM $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \ echo visualvm >> \ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \ - echo profiler2 >> \ + echo profiler3 >> \ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \ - cp -r visualvm/visualvm/build/cluster \ + cp -r visualvm/visualvm/build/cluster/* \ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \ - cp -r netbeans/nbbuild/netbeans/platform7 \ + cp -r netbeans/nbbuild/netbeans/platform8 \ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm ; \ - cp -r netbeans/nbbuild/netbeans/profiler2 \ + cp -r netbeans/nbbuild/netbeans/profiler3 \ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm endif cp $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources/about.jnlp \ extra-lib/about.jar \ - $(BUILD_OUTPUT_DIR)/j2re-image/lib + $(BUILD_OUTPUT_DIR)/j2re-image/lib ; \ cp $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources/about.jnlp \ extra-lib/about.jar \ $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib @@ -989,9 +996,29 @@ if ENABLE_PLUGIN $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib/$(INSTALL_ARCH_DIR) endif endif +if WITH_VISUALVM + mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \ + mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \ + sed "s/APPNAME=\`basename.*\`/APPNAME=visualvm/" \ + visualvm/visualvm/launcher/visualvm >> \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/jvisualvm ; \ + chmod a+x $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/jvisualvm ; \ + cp visualvm/visualvm/launcher/visualvm.conf \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \ + echo visualvm >> \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \ + echo profiler3 >> \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \ + cp -r visualvm/visualvm/build/cluster/* \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \ + cp -r netbeans/nbbuild/netbeans/platform8 \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm ; \ + cp -r netbeans/nbbuild/netbeans/profiler3 \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm +endif cp $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources/default.jnlp \ extra-lib/about.jar \ - $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib + $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib ; \ cp $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources/default.jnlp \ extra-lib/about.jar \ $(BUILD_OUTPUT_DIR)-debug/j2sdk-image/jre/lib @@ -1247,10 +1274,10 @@ bootstrap/jdk1.7.0/jre/lib/rt-closed.jar if ! test -d $(ICEDTEA_BOOT_DIR) ; \ then \ $(JAR) cf $@ -C lib/rt com -C lib/rt java \ - -C lib/rt javax -C lib/rt net -C lib/rt sun ; \ + -C lib/rt javax -C lib/rt net -C lib/rt sun ; \ else \ $(ICEDTEA_BOOT_DIR)/bin/jar cf $@ -C lib/rt com -C lib/rt java \ - -C lib/rt javax -C lib/rt net -C lib/rt sun ; \ + -C lib/rt javax -C lib/rt net -C lib/rt sun ; \ fi if test -d bootstrap/ecj/jre/lib ; \ then \ @@ -1326,7 +1353,6 @@ IcedTeaPlugin.o: IcedTeaPlugin.cc $(GTK_CFLAGS) \ $(XULRUNNER_CFLAGS) \ -fPIC -c -o $@ $< - IcedTeaPlugin.so: IcedTeaPlugin.o $(CXX) $(CXXFLAGS) \ $< \ @@ -1427,7 +1453,8 @@ stamps/visualvm.stamp: $(BOOTSTRAP_DIREC stamps/extract.stamp stamps/nbplatform.stamp if WITH_VISUALVM cd visualvm/visualvm ; \ - ln -s $(abs_top_srcdir)/netbeans/nbbuild/netbeans netbeans ; \ + ln -s $(abs_top_srcdir)/netbeans/nbbuild/netbeans . ; \ + rm netbeans/profiler3 && mv netbeans/extra netbeans/profiler3 ; \ JAVA_HOME=$(ICEDTEA_HOME) $(ANT) build endif mkdir -p stamps @@ -1442,10 +1469,18 @@ stamps/nbplatform.stamp: $(BOOTSTRAP_DIR stamps/nbplatform.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) stamps/extract.stamp \ stamps/download.stamp if WITH_VISUALVM - cd netbeans/nbbuild && JAVA_HOME=$(ICEDTEA_HOME) $(ANT) \ - -Dpermit.jdk6.builds=true build-platform ; \ - cd ../profiler && find . -iname '*.so' | xargs rm ; \ - cd libs/jfluid/native/build ; \ + cd netbeans ; \ + ln -s $(abs_top_srcdir)/netbeans/profiler.cvs/libs/jfluid/ lib.profiler ; \ + ln -s $(abs_top_srcdir)/netbeans/profiler.cvs/libs/common/ lib.profiler.common ; \ + ln -s $(abs_top_srcdir)/netbeans/profiler.cvs/libs/jfluid-ui/ lib.profiler.ui ; \ + ln -s $(abs_top_srcdir)/netbeans/profiler.cvs/modules/nbmodule/ profiler.nbmodule ; \ + mkdir -p ./nbbuild/netbeans/ ; \ + ln -s $(SYSTEM_NETBEANS_DIR)/platform8/ ./nbbuild/netbeans/platform8 ; \ + ln -s $(SYSTEM_NETBEANS_DIR)/apisupport1/ ./nbbuild/netbeans/apisupport1 ; \ + ln -s $(SYSTEM_NETBEANS_DIR)/harness/ ./nbbuild/netbeans/harness ; \ + ln -s $(SYSTEM_NETBEANS_DIR)/java2/ ./nbbuild/netbeans/java2 ; \ + ln -s $(SYSTEM_NETBEANS_DIR)/ide9/ ./nbbuild/netbeans/ide9 ; \ + cd profiler.cvs/libs/jfluid/native/build ; \ if ! (uname -a | grep x86_64) ; then \ buildscript=./buildnative-linux-15.sh ; \ else \ @@ -1453,13 +1488,15 @@ if WITH_VISUALVM fi ; \ JAVA_HOME_15=$(ICEDTEA_HOME) JAVA_HOME_16=$(ICEDTEA_HOME) \ $$buildscript ; \ - cd ../../../.. ; \ + cd ../../../../.. ; \ + ln -s $(abs_top_srcdir)/netbeans/nbbuild/netbeans/extra nbbuild/netbeans/profiler3 ; \ + ln -s $(abs_top_srcdir)/netbeans/profiler.cvs/modules/main/ profiler ; \ for dir in jfluid jfluid-ui common ; do \ JAVA_HOME=$(ICEDTEA_HOME) $(ANT) -Dpermit.jdk6.builds=true \ - -f libs/$$dir/build.xml ; \ + -f profiler.cvs/libs/$$dir/build.xml ; \ done ; \ JAVA_HOME=$(ICEDTEA_HOME) $(ANT) -Dpermit.jdk6.builds=true \ - -f modules/main/build.xml ; + -f profiler.cvs/modules/main/build.xml ; endif mkdir -p stamps touch $@ diff -r f4981f8a1720 -r 09dcedbe63a8 README --- a/README Wed Oct 01 05:52:01 2008 -0400 +++ b/README Thu Oct 02 10:55:55 2008 -0400 @@ -151,10 +151,11 @@ VisualVM ======== Passing --enable-visualvm to configure will build the VisualVM profiling -and troubleshooting tool. NetBeans platform7 and a modified version of -NetBeans profiler2 (visualvm_preview2) are built from source before building -VisualVM. A binary launcher jvisualvm is placed in the +and troubleshooting tool. NetBeans profiler3 (visualvm_preview2) is +built from source before building VisualVM. NetBeans 6.1 must be installed +on the system. A binary launcher jvisualvm is placed in the openjdk/control/build/arch/j2sdk-image/bin directory after the jdk is built. Other useful VisualVM configure options include --with-visualvm-src-zip, ---with-netbeans-platform-src-zip, and --with-netbeans-profiler-src-zip which -can be used to prevent re-downloading of the source zips. +and --with-netbeans-profiler-src-zip which can be used to prevent +re-downloading of the source zips. --with-netbeans-home can be used to specify +where the Netbeans tools are installed (default /usr/share/netbeans). diff -r f4981f8a1720 -r 09dcedbe63a8 acinclude.m4 --- a/acinclude.m4 Wed Oct 01 05:52:01 2008 -0400 +++ b/acinclude.m4 Thu Oct 02 10:55:55 2008 -0400 @@ -456,23 +456,6 @@ AC_DEFUN([WITH_VISUALVM_SRC_ZIP], AC_SUBST(ALT_VISUALVM_SRC_ZIP) ]) -AC_DEFUN([WITH_NETBEANS_PLATFORM_SRC_ZIP], -[ - AC_MSG_CHECKING(netbeans platform source zip) - AC_ARG_WITH([netbeans-platform-src-zip], - [AS_HELP_STRING(--with-netbeans-platform-src-zip, specify the location of the netbeans platform source zip)], - [ - ALT_NETBEANS_PLATFORM_SRC_ZIP=${withval} - AM_CONDITIONAL(USE_ALT_NETBEANS_PLATFORM_SRC_ZIP, test x = x) - ], - [ - ALT_NETBEANS_PLATFORM_SRC_ZIP="not specified" - AM_CONDITIONAL(USE_ALT_NETBEANS_PLATFORM_SRC_ZIP, test x != x) - ]) - AC_MSG_RESULT(${ALT_NETBEANS_PLATFORM_SRC_ZIP}) - AC_SUBST(ALT_NETBEANS_PLATFORM_SRC_ZIP) -]) - AC_DEFUN([WITH_NETBEANS_PROFILER_SRC_ZIP], [ AC_MSG_CHECKING(netbeans profiler source zip) @@ -613,6 +596,31 @@ AC_DEFUN([FIND_XERCES2_JAR], AC_MSG_ERROR("A xerces2 jar was not found.") fi AC_SUBST(XERCES2_JAR) +]) + +AC_DEFUN([FIND_NETBEANS], +[ + AC_ARG_WITH([netbeans], + [AS_HELP_STRING(--with-netbeans,specify location of netbeans)], + [ + if test -f "${withval}"; then + AC_MSG_CHECKING(netbeans) + NETBEANS="${withval}" + AC_MSG_RESULT(${withval}) + else + AC_PATH_PROG(NETBEANS, "${withval}") + fi + ], + [ + NETBEANS= + ]) + if test -z "${NETBEANS}"; then + AC_PATH_PROG(NETBEANS, "netbeans") + fi + if test -z "${NETBEANS}"; then + AC_MSG_ERROR("NetBeans was not found.") + fi + AC_SUBST(NETBEANS) ]) AC_DEFUN([FIND_RHINO_JAR], diff -r f4981f8a1720 -r 09dcedbe63a8 configure.ac --- a/configure.ac Wed Oct 01 05:52:01 2008 -0400 +++ b/configure.ac Thu Oct 02 10:55:55 2008 -0400 @@ -82,6 +82,22 @@ AC_ARG_WITH([icedtea-home], ]) AC_SUBST(SYSTEM_ICEDTEA_DIR) +AC_ARG_WITH([netbeans-home], + [AS_HELP_STRING([--with-netbeans-home], + [NetBeans home directory (default is /usr/share/netbeans)])], + [ + if test "x${withval}" = x + then + SYSTEM_NETBEANS_DIR=/usr/share/netbeans + else + SYSTEM_NETBEANS_DIR=${withval} + fi + ], + [ + SYSTEM_NETBEANS_DIR=/usr/share/netbeans + ]) +AC_SUBST(SYSTEM_NETBEANS_DIR) + AC_ARG_WITH([ant-home], [AS_HELP_STRING([--with-ant-home], [Ant home directory (default is /usr/share/ant)])], @@ -121,6 +137,11 @@ AC_ARG_ENABLE([visualvm], [Enable compilation of visualvm.])], [enable_visualvm="yes"], [enable_visualvm="no"]) AM_CONDITIONAL(WITH_VISUALVM, test "x${enable_visualvm}" = "xyes") + +if test "x${enable_visualvm}" = "xyes" +then + FIND_NETBEANS +fi AC_ARG_WITH([icedtea], [AS_HELP_STRING([--with-icedtea], @@ -214,10 +235,10 @@ fi fi fi FIND_RHINO_JAR +FIND_NETBEANS WITH_OPENJDK_SRC_ZIP WITH_OPENJDK_SRC_DIR WITH_VISUALVM_SRC_ZIP -WITH_NETBEANS_PLATFORM_SRC_ZIP WITH_NETBEANS_PROFILER_SRC_ZIP WITH_ALT_JAR_BINARY AC_CHECK_WITH_CACAO diff -r f4981f8a1720 -r 09dcedbe63a8 patches/icedtea-visualvm.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-visualvm.patch Thu Oct 02 10:55:55 2008 -0400 @@ -0,0 +1,26 @@ +--- oldplatform.properties 2008-09-29 13:52:36.000000000 -0400 ++++ visualvm/visualvm/jvm/nbproject/platform.properties 2008-09-29 13:53:33.000000000 -0400 +@@ -16,8 +16,8 @@ + org.openide.compat,\ + org.openide.util.enumerations + enabled.clusters=\ +- platform7,\ +- profiler2 ++ platform8,\ ++ profiler3 + nbjdk.active=Java_HotSpot_TM__Client_VM_1.6.0-b88-17-release + nbplatform.active=NetBeans_Platform_Dev_(Build_200711261600) + suite.dir=${basedir} +--- oldplatform.properties1 2008-09-29 13:52:46.000000000 -0400 ++++ visualvm/visualvm/nbproject/platform.properties 2008-09-29 13:53:41.000000000 -0400 +@@ -15,8 +15,8 @@ + org.openide.compat,\ + org.openide.util.enumerations + enabled.clusters=\ +- platform7,\ +- profiler2 ++ platform8,\ ++ profiler3 + nbjdk.active=default + nbplatform.active=NetBeans_Platform_6.0.1_(Build_200801291616) + suite.dir=${basedir} From langel at redhat.com Thu Oct 2 07:56:35 2008 From: langel at redhat.com (Lillian Angel) Date: Thu, 02 Oct 2008 10:56:35 -0400 Subject: VisualVM in IcedTea Message-ID: <48E4E123.90403@redhat.com> Hi, Since NetBeans has been pushed into Fedora rawhide, I have updated visualvm in IcedTea to use NetBeans 6.1 to build. Instead of downloading NetBeans and building it during compile time, the IcedTea build now only downloads the profiler tool and the basic NetBeans build cluster to build visualvm. On Fedora: yum --enablerepo=rawhide install netbeans-* VisualVM still is not built by default. To build it, pass --enable-visualvm to configure. You can also use --with-netbeans-home=/path/to/netbeans to specify where NetBeans 6.1 is installed. By default, it is set to /usr/share/netbeans. I have updated all the docs (README, INSTALL, HACKING) to reflect this change. Pending no there are no problems, visualvm will be available in Fedora 10 after the upcoming release. Cheers, Lillian From bugzilla-daemon at icedtea.classpath.org Thu Oct 2 08:57:23 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 02 Oct 2008 15:57:23 +0000 Subject: [Bug 199] Crash during a build of xerces-j2 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=199 ------- Comment #2 from mark at klomp.org 2008-10-02 15:57 ------- This is a pretty old version of icedtea. Could you try upgrading to a never version to see if it still occurs. Also note the following in your crash log: WARNING!! /proc file system not found. Java may be unstable running multithreaded in a chroot environment on Linux when /proc filesystem is not mounted. Could you mount /proc to see if that is the issue? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From langel at redhat.com Thu Oct 2 13:14:14 2008 From: langel at redhat.com (Lillian Angel) Date: Thu, 02 Oct 2008 20:14:14 +0000 Subject: changeset in /hg/icedtea6: Fixed Netbeans check Message-ID: changeset fc63d0674a46 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=fc63d0674a46 description: Fixed Netbeans check diffstat: 1 file changed, 1 deletion(-) configure.ac | 1 - diffs (11 lines): diff -r 09dcedbe63a8 -r fc63d0674a46 configure.ac --- a/configure.ac Thu Oct 02 10:55:55 2008 -0400 +++ b/configure.ac Thu Oct 02 16:14:10 2008 -0400 @@ -235,7 +235,6 @@ fi fi fi FIND_RHINO_JAR -FIND_NETBEANS WITH_OPENJDK_SRC_ZIP WITH_OPENJDK_SRC_DIR WITH_VISUALVM_SRC_ZIP From dbhole at redhat.com Thu Oct 2 13:49:35 2008 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 02 Oct 2008 20:49:35 +0000 Subject: changeset in /hg/icedtea6: Merging local with remote Message-ID: changeset 880c7189324c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=880c7189324c description: Merging local with remote diffstat: 29 files changed, 2445 insertions(+), 2280 deletions(-) .hgignore | 1 IcedTeaPlugin.cc | 214 +- Makefile.am | 43 plugin/icedtea/org/classpath/icedtea/plugin/GetMemberPluginCallRequest.java | 78 plugin/icedtea/org/classpath/icedtea/plugin/GetWindowPluginCallRequest.java | 76 plugin/icedtea/org/classpath/icedtea/plugin/PluginAppletSecurityContext.java | 855 -------- plugin/icedtea/org/classpath/icedtea/plugin/PluginCallRequestFactoryImpl.java | 22 plugin/icedtea/org/classpath/icedtea/plugin/PluginMain.java | 193 - plugin/icedtea/org/classpath/icedtea/plugin/PluginMessageConsumer.java | 76 plugin/icedtea/org/classpath/icedtea/plugin/PluginMessageHandlerWorker.java | 79 plugin/icedtea/org/classpath/icedtea/plugin/PluginObjectStore.java | 119 - plugin/icedtea/org/classpath/icedtea/plugin/PluginStreamHandlerImpl.java | 362 --- plugin/icedtea/org/classpath/icedtea/plugin/RequestQueue.java | 40 plugin/icedtea/org/classpath/icedtea/plugin/TestEnv.java | 172 - plugin/icedtea/org/classpath/icedtea/plugin/VoidPluginCallRequest.java | 69 plugin/icedtea/sun/applet/AppletSecurityContext.java | 25 plugin/icedtea/sun/applet/AppletSecurityContextManager.java | 6 plugin/icedtea/sun/applet/GetMemberPluginCallRequest.java | 76 plugin/icedtea/sun/applet/GetWindowPluginCallRequest.java | 75 plugin/icedtea/sun/applet/PluginAppletSecurityContext.java | 1021 ++++++++++ plugin/icedtea/sun/applet/PluginCallRequestFactory.java | 19 plugin/icedtea/sun/applet/PluginMain.java | 188 + plugin/icedtea/sun/applet/PluginMessageConsumer.java | 67 plugin/icedtea/sun/applet/PluginMessageHandlerWorker.java | 78 plugin/icedtea/sun/applet/PluginObjectStore.java | 121 + plugin/icedtea/sun/applet/PluginStreamHandler.java | 371 +++ plugin/icedtea/sun/applet/RequestQueue.java | 39 plugin/icedtea/sun/applet/TestEnv.java | 172 + plugin/icedtea/sun/applet/VoidPluginCallRequest.java | 68 diffs (truncated from 5129 to 500 lines): diff -r 868547baa028 -r 880c7189324c .hgignore --- a/.hgignore Thu Oct 02 15:34:39 2008 -0400 +++ b/.hgignore Thu Oct 02 15:45:31 2008 -0400 @@ -25,7 +25,6 @@ gcjwebplugin.so gcjwebplugin.so IcedTeaPlugin.o IcedTeaPlugin.so -IcedTeaPlugin.jar extra-source-files.txt rt-source-files.txt hotspot-tools-source-files.txt diff -r 868547baa028 -r 880c7189324c IcedTeaPlugin.cc --- a/IcedTeaPlugin.cc Thu Oct 02 15:34:39 2008 -0400 +++ b/IcedTeaPlugin.cc Thu Oct 02 15:45:31 2008 -0400 @@ -244,7 +244,6 @@ static GError* channel_error = NULL; static GError* channel_error = NULL; // Fully-qualified appletviewer executable. static char* appletviewer_executable = NULL; -static char* extra_jars = NULL; static char* libjvm_so = NULL; class IcedTeaPluginFactory; @@ -317,8 +316,6 @@ char const* TYPES[10] = { "Object", char context[16]; \ GetCurrentPageAddress(&addr); \ GetCurrentContextAddr(context); \ - printf("Addr: %s , Context: %s\n", addr, context);\ -\ nsCString message ("context "); \ message.AppendInt (0); \ message += " reference "; \ @@ -428,12 +425,14 @@ char const* TYPES[10] = { "Object", #define MESSAGE_RECEIVE_REFERENCE(reference, cast, name) \ nsresult res = NS_OK; \ printf ("RECEIVE 1\n"); \ - while (factory->result_map[reference]->returnIdentifier == -1) \ + while (factory->result_map[reference]->returnIdentifier == -1 &&\ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ printf ("RECEIVE 3\n"); \ - if (factory->result_map[reference]->returnIdentifier == 0) \ + if (factory->result_map[reference]->returnIdentifier == 0 || \ + factory->result_map[reference]->errorOccured == PR_TRUE) \ { \ *name = NULL; \ } else { \ @@ -449,25 +448,33 @@ char const* TYPES[10] = { "Object", PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ printf("RECEIVE ID 1\n"); \ - while (factory->result_map[reference]->returnIdentifier == -1) \ + while (factory->result_map[reference]->returnIdentifier == -1 &&\ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ \ + if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + { \ + *id = NULL; \ + } else \ + { \ *id = reinterpret_cast \ (new JNIID (factory->result_map[reference]->returnIdentifier, signature)); \ printf ("RECEIVE_ID: %s result: %x = %d, %s\n", \ __func__, *id, factory->result_map[reference]->returnIdentifier, \ - signature); + signature); \ + } #define MESSAGE_RECEIVE_VALUE(reference, ctype, result) \ nsresult res = NS_OK; \ printf("RECEIVE VALUE 1\n"); \ - while (factory->result_map[reference]->returnValue == "") \ + while (factory->result_map[reference]->returnValue == "" && \ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ - *result = ParseValue (type, factory->result_map[reference]->returnValue); + *result = ParseValue (type, factory->result_map[reference]->returnValue); // \ // char* valueString = ValueString (type, *result); \ // printf ("RECEIVE_VALUE: %s result: %x = %s\n", \ @@ -479,13 +486,19 @@ char const* TYPES[10] = { "Object", PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ printf("RECEIVE SIZE 1\n"); \ - while (factory->result_map[reference]->returnValue == "") \ + while (factory->result_map[reference]->returnValue == "" && \ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ nsresult conversionResult; \ - *result = factory->result_map[reference]->returnValue.ToInteger (&conversionResult); \ - PLUGIN_CHECK ("parse integer", conversionResult); + if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + *result = NULL; \ + else \ + { \ + *result = factory->result_map[reference]->returnValue.ToInteger (&conversionResult); \ + PLUGIN_CHECK ("parse integer", conversionResult); \ + } // \ // printf ("RECEIVE_SIZE: %s result: %x = %d\n", \ // __func__, result, *result); @@ -495,13 +508,19 @@ char const* TYPES[10] = { "Object", PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ printf("RECEIVE STRING 1\n"); \ - while (factory->result_map[reference]->returnValue == "") \ + while (factory->result_map[reference]->returnValue == "" && \ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ - printf("Setting result to: %s\n", strdup (factory->result_map[reference]->returnValue.get ())); \ - *result = reinterpret_cast \ - (strdup (factory->result_map[reference]->returnValue.get ())); + if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + *result = NULL; \ + else \ + {\ + printf("Setting result to: %s\n", strdup (factory->result_map[reference]->returnValue.get ())); \ + *result = reinterpret_cast \ + (strdup (factory->result_map[reference]->returnValue.get ()));\ + } // \ // printf ("RECEIVE_STRING: %s result: %x = %s\n", \ // __func__, result, *result); @@ -511,16 +530,22 @@ char const* TYPES[10] = { "Object", PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ printf("RECEIVE STRING UCS 1\n"); \ - while (factory->result_map[reference]->returnValueUCS.IsEmpty()) \ + while (factory->result_map[reference]->returnValueUCS.IsEmpty() && \ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ - int length = factory->result_map[reference]->returnValueUCS.Length (); \ - jchar* newstring = static_cast (PR_Malloc (length)); \ - memset (newstring, 0, length); \ - memcpy (newstring, factory->result_map[reference]->returnValueUCS.get (), length); \ - std::cout << "Setting result to: " << factory->result_map[reference]->returnValueUCS.get() << std::endl; \ - *result = static_cast (newstring); + if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + *result = NULL; \ + else \ + { \ + int length = factory->result_map[reference]->returnValueUCS.Length (); \ + jchar* newstring = static_cast (PR_Malloc (length)); \ + memset (newstring, 0, length); \ + memcpy (newstring, factory->result_map[reference]->returnValueUCS.get (), length); \ + std::cout << "Setting result to: " << factory->result_map[reference]->returnValueUCS.get() << std::endl; \ + *result = static_cast (newstring); \ + } // \ // printf ("RECEIVE_STRING: %s result: %x = %s\n", \ @@ -530,11 +555,15 @@ char const* TYPES[10] = { "Object", PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ printf("RECEIVE BOOLEAN 1\n"); \ - while (factory->result_map[reference]->returnIdentifier == -1) \ + while (factory->result_map[reference]->returnIdentifier == -1 && \ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ - *result = factory->result_map[reference]->returnIdentifier; + if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + *result = NULL; \ + else \ + *result = factory->result_map[reference]->returnIdentifier; // res = factory->current->ProcessNextEvent (PR_TRUE, \ // &processed); \ // PLUGIN_CHECK_RETURN (__func__, res); \ @@ -1225,9 +1254,57 @@ template NS_IMETHODIMP template NS_IMETHODIMP IcedTeaRunnableMethod::Run () { - (object->*method) (); - return NS_OK; -} + (object->*method) (); + return NS_OK; +} + + +// FIXME: Special class just for dispatching GetURL to another +// thread.. seriously, a class just for that? there has to be a better way! + +class GetURLRunnable : public nsIRunnable +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIRUNNABLE + + GetURLRunnable (nsIPluginInstancePeer* peer, const char* url, const char* target); + + ~GetURLRunnable (); + +private: + nsIPluginInstancePeer* peer; + const char* url; + const char* target; +}; + +NS_IMPL_ISUPPORTS1 (GetURLRunnable, nsIRunnable) + +GetURLRunnable::GetURLRunnable (nsIPluginInstancePeer* peer, const char* url, const char* target) +: peer(peer), + url(url), + target(target) +{ + NS_ADDREF (peer); +} + +GetURLRunnable::~GetURLRunnable () +{ + NS_RELEASE(peer); +} + +NS_IMETHODIMP +GetURLRunnable::Run () +{ + nsCOMPtr ownerGetter = + do_QueryInterface (peer); + nsIPluginInstanceOwner* owner = nsnull; + ownerGetter->GetOwner (&owner); + + return owner->GetURL ((const char*) url, (const char*) target, + nsnull, 0, nsnull, 0); +} + NS_IMPL_ISUPPORTS6 (IcedTeaPluginFactory, nsIFactory, nsIPlugin, nsIJVMManager, nsIJVMPrefsWindow, nsIJVMPlugin, nsIInputStreamCallback) @@ -2433,6 +2510,11 @@ IcedTeaPluginFactory::OnInputStreamReady return NS_OK; } +#include +#include +#include +#include + void IcedTeaPluginFactory::HandleMessage (nsCString const& message) { @@ -2477,8 +2559,11 @@ IcedTeaPluginFactory::HandleMessage (nsC { IcedTeaPluginInstance* instance = NULL; instances.Get (identifier, &instance); -// if (instance != 0) -// instance->peer->ShowStatus (nsCString (rest).get ()); + if (instance != 0) + { + instance->peer->ShowStatus (nsCString (rest).get ()); + + } } else if (command == "initialized") { @@ -2504,9 +2589,10 @@ IcedTeaPluginFactory::HandleMessage (nsC nsIPluginInstanceOwner* owner = nsnull; ownerGetter->GetOwner (&owner); printf("Calling GetURL with %s and %s\n", nsCString (url).get (), nsCString (target).get ()); - owner->GetURL (nsCString (url).get (), - nsCString (target).get (), - nsnull, 0, nsnull, 0); + nsCOMPtr event = new GetURLRunnable (instance->peer, + nsCString (url).get (), + nsCString (target).get ()); + current->Dispatch(event, nsIEventTarget::DISPATCH_NORMAL); } } else if (command == "GetWindow") @@ -2841,20 +2927,47 @@ void IcedTeaPluginFactory::ProcessMessag void IcedTeaPluginFactory::ProcessMessage () { while (true) { - printf("Process thread sleeping...\n"); - PR_Sleep(PR_INTERVAL_NO_TIMEOUT); + PR_Sleep(1000); + + // If there was an interrupt, clear it PR_ClearInterrupt(); - - printf("Process thread interrupted...\n"); - // Was I interrupted for shutting down? if (shutting_down == PR_TRUE) { break; } - ConsumeMsgFromJVM(); + // Nope. Ok, is there work to do? + if (!jvmMsgQueue.empty()) + ConsumeMsgFromJVM(); + + // All done. Now let's process pending events + + // Were there new events dispatched? + + PRBool this_has_pending, curr_has_pending, processed = PR_FALSE; + PRBool continue_processing = PR_TRUE; + + while (continue_processing == PR_TRUE) { + + processThread->HasPendingEvents(&this_has_pending); + if (this_has_pending == PR_TRUE) { + processThread->ProcessNextEvent(PR_TRUE, &processed); + printf("Pending event processed (this) ... %d\n", processed); + } + + current->HasPendingEvents(&curr_has_pending); + if (curr_has_pending == PR_TRUE) { + current->ProcessNextEvent(PR_TRUE, &processed); + printf("Pending event processed (current) ... %d\n", processed); + } + + if (this_has_pending != PR_TRUE && curr_has_pending != PR_TRUE) { + continue_processing = PR_FALSE; + } + } } + } void IcedTeaPluginFactory::ConsumeMsgFromJVM () @@ -2872,9 +2985,7 @@ void IcedTeaPluginFactory::ConsumeMsgFro HandleMessage (message); printf("Processing complete\n"); } - -} - +} /** * @@ -3189,9 +3300,9 @@ IcedTeaPluginFactory::StartAppletviewer PLUGIN_CHECK_RETURN ("init process", result); // FIXME: hard-coded port number. - char const* args[8] = { "-classpath", extra_jars, "-Xdebug", "-Xnoagent", "-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n", "org.classpath.icedtea.plugin.PluginMain", "50007" }; + char const* args[5] = { "-Xdebug", "-Xnoagent", "-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n", "sun.applet.PluginMain", "50007" }; // char const* args[2] = { "sun.applet.PluginMain", "50007" }; - result = applet_viewer_process->Run (PR_FALSE, args, 8, nsnull); + result = applet_viewer_process->Run (PR_FALSE, args, 5, nsnull); PLUGIN_CHECK_RETURN ("run process", result); // start processing thread @@ -3812,6 +3923,7 @@ nsresult nsresult IcedTeaJNIEnv::GetCurrentContextAddr(char *addr) { + return NS_OK; PLUGIN_TRACE_JNIENV (); // Get JSContext from stack. @@ -3835,7 +3947,7 @@ nsresult nsresult IcedTeaJNIEnv::GetCurrentPageAddress(const char **addr) { - + return NS_OK; PLUGIN_TRACE_JNIENV (); nsIPrincipal *prin; @@ -4922,27 +5034,15 @@ NSGetFactory (nsISupports* aServMgr, nsC //executableString += nsCString ("/../../bin/pluginappletviewer"); executable += nsCString ("/../../bin/java"); - extrajars += jar; - extrajars += nsCString("/IcedTeaPlugin.jar"); - extrajars += ":"; - extrajars += jar; - extrajars += nsCString("/rt.jar"); //executable += nsCString ("/client/libjvm.so"); // Never freed. appletviewer_executable = strdup (executable.get ()); - extra_jars = strdup (extrajars.get ()); //libjvm_so = strdup (executable.get ()); if (!appletviewer_executable) { PLUGIN_ERROR ("Failed to create java executable name."); - return NS_ERROR_OUT_OF_MEMORY; - } - - if (!extra_jars) - { - PLUGIN_ERROR ("Failed to create plugin jar name."); return NS_ERROR_OUT_OF_MEMORY; } diff -r 868547baa028 -r 880c7189324c Makefile.am --- a/Makefile.am Thu Oct 02 15:34:39 2008 -0400 +++ b/Makefile.am Thu Oct 02 15:45:31 2008 -0400 @@ -12,15 +12,13 @@ if ENABLE_LIVECONNECT if ENABLE_LIVECONNECT ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin ICEDTEAPLUGIN_TARGET = IcedTeaPlugin.so -ICEDTEAPLUGIN_JAR = IcedTeaPlugin.jar PLUGIN_PATCH = patches/icedtea-liveconnect.patch -LIVECONNECT = $(abs_top_srcdir)/plugin/icedtea/ +LIVECONNECT_DIR = -C lib/rt netscape else ICEDTEAPLUGIN_CLEAN = ICEDTEAPLUGIN_TARGET = -ICEDTEAPLUGIN_JAR = -LIVECONNECT = PLUGIN_PATCH = patches/icedtea-plugin.patch +LIVECONNECT_DIR = if ENABLE_PLUGIN GCJWEBPLUGIN_CLEAN = clean-gcjwebplugin GCJWEBPLUGIN_TARGET = gcjwebplugin.so @@ -52,9 +50,9 @@ distclean-local: clean-copy clean-jtreg rm -rf openjdk-ecj rm -rf openjdk rm -rf hotspot-tools + rm -rf rt/netscape if ENABLE_LIVECONNECT rm -f IcedTeaPlugin.so - rm -f IcedTeaPlugin.jar else if ENABLE_PLUGIN rm -f gcjwebplugin.so @@ -600,9 +598,9 @@ stamps/patch.stamp: stamps/patch-fsg.sta echo WARNING make clean-patch before retrying a fix ; \ false; \ fi - if ENABLE_LIVECONNECT cp -a plugin/icedtea/sun/applet/*java openjdk/jdk/src/share/classes/sun/applet/ + cp -a plugin/icedtea/netscape rt/ endif clean-patch: @@ -622,6 +620,7 @@ clean-patch: if ! test x$${all_patches_ok} = "xyes" ; then \ echo "WARNING Not all patches reverted cleanly" ; \ fi + rm -rf rt/netscape for file in plugin/icedtea/sun/applet/*java ; \ do \ rm -f openjdk/jdk/src/share/classes/sun/applet/`basename $file` ; \ @@ -917,7 +916,7 @@ stamps/icedtea.stamp: stamps/bootstrap-d stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \ stamps/hotspot-tools.stamp stamps/plugs.stamp \ stamps/ports.stamp stamps/patch.stamp stamps/overlay.stamp \ - $(GCJWEBPLUGIN_TARGET) $(ICEDTEAPLUGIN_TARGET) $(ICEDTEAPLUGIN_JAR) \ + $(GCJWEBPLUGIN_TARGET) $(ICEDTEAPLUGIN_TARGET) \ extra-lib/about.jar stamps/cacao.stamp stamps/visualvm.stamp $(MAKE) \ $(ICEDTEA_ENV) \ @@ -928,10 +927,6 @@ if ENABLE_LIVECONNECT $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) cp -pPRf IcedTeaPlugin.so \ $(BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR) - cp -pPRf IcedTeaPlugin.jar \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/ - cp -pPRf IcedTeaPlugin.jar \ - $(BUILD_OUTPUT_DIR)/j2re-image/lib/ else if ENABLE_PLUGIN cp -pPRf gcjwebplugin.so \ @@ -973,7 +968,7 @@ stamps/icedtea-debug.stamp: stamps/boots stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink.stamp \ stamps/hotspot-tools.stamp stamps/plugs.stamp \ stamps/ports.stamp stamps/patch.stamp stamps/overlay.stamp \ - $(GCJWEBPLUGIN_TARGET) $(ICEDTEAPLUGIN_TARGET) $(ICEDTEAPLUGIN_JAR) \ + $(GCJWEBPLUGIN_TARGET) $(ICEDTEAPLUGIN_TARGET) \ extra-lib/about.jar stamps/cacao.stamp $(MAKE) \ $(ICEDTEA_ENV) \ @@ -984,10 +979,6 @@ if ENABLE_LIVECONNECT $(BUILD_OUTPUT_DIR)-debug/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) cp -pPRf IcedTeaPlugin.so \ $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib/$(INSTALL_ARCH_DIR) - cp -pPRf IcedTeaPlugin.jar \ - $(BUILD_OUTPUT_DIR)-debug/j2sdk-image/jre/lib/ - cp -pPRf IcedTeaPlugin.jar \ - $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib/ else if ENABLE_PLUGIN cp -pPRf gcjwebplugin.so \ @@ -1239,7 +1230,7 @@ bootstrap/jdk1.7.0/jre/lib/tools.jar: st # rt-closed.jar class files. rt-source-files.txt: stamps/extract.stamp stamps/copy-source-files.stamp - find $(abs_top_srcdir)/rt $(abs_top_builddir)/rt $(LIVECONNECT) -name '*.java' \ From dbhole at redhat.com Thu Oct 2 13:49:34 2008 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 02 Oct 2008 20:49:34 +0000 Subject: changeset in /hg/icedtea6: More refactoring -- the last big one ... Message-ID: changeset 358cb21c4730 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=358cb21c4730 description: More refactoring -- the last big one in the forseeable future. Implemented proper sandbox for liveconnect calls. Added error detection in the plugin, so it doesn't loop forever if Java side encounters an error. diffstat: 30 files changed, 2483 insertions(+), 2274 deletions(-) .hgignore | 1 ChangeLog | 44 IcedTeaPlugin.cc | 214 +- Makefile.am | 31 plugin/icedtea/org/classpath/icedtea/plugin/GetMemberPluginCallRequest.java | 78 plugin/icedtea/org/classpath/icedtea/plugin/GetWindowPluginCallRequest.java | 76 plugin/icedtea/org/classpath/icedtea/plugin/PluginAppletSecurityContext.java | 855 -------- plugin/icedtea/org/classpath/icedtea/plugin/PluginCallRequestFactoryImpl.java | 22 plugin/icedtea/org/classpath/icedtea/plugin/PluginMain.java | 193 - plugin/icedtea/org/classpath/icedtea/plugin/PluginMessageConsumer.java | 76 plugin/icedtea/org/classpath/icedtea/plugin/PluginMessageHandlerWorker.java | 79 plugin/icedtea/org/classpath/icedtea/plugin/PluginObjectStore.java | 119 - plugin/icedtea/org/classpath/icedtea/plugin/PluginStreamHandlerImpl.java | 362 --- plugin/icedtea/org/classpath/icedtea/plugin/RequestQueue.java | 40 plugin/icedtea/org/classpath/icedtea/plugin/TestEnv.java | 172 - plugin/icedtea/org/classpath/icedtea/plugin/VoidPluginCallRequest.java | 69 plugin/icedtea/sun/applet/AppletSecurityContext.java | 25 plugin/icedtea/sun/applet/AppletSecurityContextManager.java | 6 plugin/icedtea/sun/applet/GetMemberPluginCallRequest.java | 76 plugin/icedtea/sun/applet/GetWindowPluginCallRequest.java | 75 plugin/icedtea/sun/applet/PluginAppletSecurityContext.java | 1021 ++++++++++ plugin/icedtea/sun/applet/PluginCallRequestFactory.java | 19 plugin/icedtea/sun/applet/PluginMain.java | 188 + plugin/icedtea/sun/applet/PluginMessageConsumer.java | 67 plugin/icedtea/sun/applet/PluginMessageHandlerWorker.java | 78 plugin/icedtea/sun/applet/PluginObjectStore.java | 121 + plugin/icedtea/sun/applet/PluginStreamHandler.java | 371 +++ plugin/icedtea/sun/applet/RequestQueue.java | 39 plugin/icedtea/sun/applet/TestEnv.java | 172 + plugin/icedtea/sun/applet/VoidPluginCallRequest.java | 68 diffs (truncated from 5148 to 500 lines): diff -r f4981f8a1720 -r 358cb21c4730 .hgignore --- a/.hgignore Wed Oct 01 05:52:01 2008 -0400 +++ b/.hgignore Wed Oct 01 16:40:56 2008 -0400 @@ -25,7 +25,6 @@ gcjwebplugin.so gcjwebplugin.so IcedTeaPlugin.o IcedTeaPlugin.so -IcedTeaPlugin.jar extra-source-files.txt rt-source-files.txt hotspot-tools-source-files.txt diff -r f4981f8a1720 -r 358cb21c4730 ChangeLog --- a/ChangeLog Wed Oct 01 05:52:01 2008 -0400 +++ b/ChangeLog Wed Oct 01 16:40:56 2008 -0400 @@ -1,3 +1,47 @@ 2008-10-01 Gary Benson + * .hgignore: Removed IcedTeaPlugin.jar + * IcedTeaPlugin.cc: Updated classpath when launching Java. added checks to + detect error on Java side. + * Makefile.am: Updated to fit new refactored files. + * plugin/icedtea/sun/applet/AppletSecurityContextManager.java: New file, + moved out of org/classpath/icedtea/plugin/, as a result of refactoring. + * plugin/icedtea/sun/applet/PluginCallRequestFactory.java: Same. + * plugin/icedtea/sun/applet/PluginStreamHandler.java: Same. + * plugin/icedtea/sun/applet/GetMemberPluginCallRequest.java: Same. + * plugin/icedtea/sun/applet/GetWindowPluginCallRequest.java: Same. + * plugin/icedtea/sun/applet/PluginAppletSecurityContext.java: Same. + * plugin/icedtea/sun/applet/PluginMain.java: Same. + * plugin/icedtea/sun/applet/PluginMessageConsumer.java: Same. + * plugin/icedtea/sun/applet/PluginMessageHandlerWorker.java: Same. + * plugin/icedtea/sun/applet/PluginObjectStore.java: Same. + * plugin/icedtea/sun/applet/RequestQueue.java: Same. + * plugin/icedtea/sun/applet/TestEnv.java: Same. + * plugin/icedtea/sun/applet/VoidPluginCallRequest.java: Same. + * plugin/icedtea/org/classpath/icedtea/plugin/GetMemberPluginCallRequest.java: + Removed, as a result of refactoring. + * plugin/icedtea/org/classpath/icedtea/plugin/GetWindowPluginCallRequest.java: + Same. + *plugin/icedtea/org/classpath/icedtea/plugin/PluginAppletSecurityContext.java: + Same. + * plugin/icedtea/org/classpath/icedtea/plugin/PluginCallRequestFactoryImpl.java: + Same. + * plugin/icedtea/org/classpath/icedtea/plugin/PluginMain.java: Same. + * plugin/icedtea/org/classpath/icedtea/plugin/PluginMessageConsumer.java: + Same. + * + plugin/icedtea/org/classpath/icedtea/plugin/PluginMessageHandlerWorker.java: + Same. + * plugin/icedtea/org/classpath/icedtea/plugin/PluginObjectStore.java: + Same. + * + plugin/icedtea/org/classpath/icedtea/plugin/PluginStreamHandlerImpl.java: + Same. + * plugin/icedtea/org/classpath/icedtea/plugin/RequestQueue.java: Same. + * plugin/icedtea/org/classpath/icedtea/plugin/TestEnv.java: Same. + * plugin/icedtea/org/classpath/icedtea/plugin/VoidPluginCallRequest.java: + Same. + * plugin/icedtea/sun/applet/AppletSecurityContext.java: Same. + 2008-10-01 Gary Benson * ports/hotspot/src/share/vm/shark/sharkState.cpp: Remove a diff -r f4981f8a1720 -r 358cb21c4730 IcedTeaPlugin.cc --- a/IcedTeaPlugin.cc Wed Oct 01 05:52:01 2008 -0400 +++ b/IcedTeaPlugin.cc Wed Oct 01 16:40:56 2008 -0400 @@ -244,7 +244,6 @@ static GError* channel_error = NULL; static GError* channel_error = NULL; // Fully-qualified appletviewer executable. static char* appletviewer_executable = NULL; -static char* extra_jars = NULL; static char* libjvm_so = NULL; class IcedTeaPluginFactory; @@ -317,8 +316,6 @@ char const* TYPES[10] = { "Object", char context[16]; \ GetCurrentPageAddress(&addr); \ GetCurrentContextAddr(context); \ - printf("Addr: %s , Context: %s\n", addr, context);\ -\ nsCString message ("context "); \ message.AppendInt (0); \ message += " reference "; \ @@ -428,12 +425,14 @@ char const* TYPES[10] = { "Object", #define MESSAGE_RECEIVE_REFERENCE(reference, cast, name) \ nsresult res = NS_OK; \ printf ("RECEIVE 1\n"); \ - while (factory->result_map[reference]->returnIdentifier == -1) \ + while (factory->result_map[reference]->returnIdentifier == -1 &&\ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ printf ("RECEIVE 3\n"); \ - if (factory->result_map[reference]->returnIdentifier == 0) \ + if (factory->result_map[reference]->returnIdentifier == 0 || \ + factory->result_map[reference]->errorOccured == PR_TRUE) \ { \ *name = NULL; \ } else { \ @@ -449,25 +448,33 @@ char const* TYPES[10] = { "Object", PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ printf("RECEIVE ID 1\n"); \ - while (factory->result_map[reference]->returnIdentifier == -1) \ + while (factory->result_map[reference]->returnIdentifier == -1 &&\ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ \ + if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + { \ + *id = NULL; \ + } else \ + { \ *id = reinterpret_cast \ (new JNIID (factory->result_map[reference]->returnIdentifier, signature)); \ printf ("RECEIVE_ID: %s result: %x = %d, %s\n", \ __func__, *id, factory->result_map[reference]->returnIdentifier, \ - signature); + signature); \ + } #define MESSAGE_RECEIVE_VALUE(reference, ctype, result) \ nsresult res = NS_OK; \ printf("RECEIVE VALUE 1\n"); \ - while (factory->result_map[reference]->returnValue == "") \ + while (factory->result_map[reference]->returnValue == "" && \ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ - *result = ParseValue (type, factory->result_map[reference]->returnValue); + *result = ParseValue (type, factory->result_map[reference]->returnValue); // \ // char* valueString = ValueString (type, *result); \ // printf ("RECEIVE_VALUE: %s result: %x = %s\n", \ @@ -479,13 +486,19 @@ char const* TYPES[10] = { "Object", PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ printf("RECEIVE SIZE 1\n"); \ - while (factory->result_map[reference]->returnValue == "") \ + while (factory->result_map[reference]->returnValue == "" && \ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ nsresult conversionResult; \ - *result = factory->result_map[reference]->returnValue.ToInteger (&conversionResult); \ - PLUGIN_CHECK ("parse integer", conversionResult); + if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + *result = NULL; \ + else \ + { \ + *result = factory->result_map[reference]->returnValue.ToInteger (&conversionResult); \ + PLUGIN_CHECK ("parse integer", conversionResult); \ + } // \ // printf ("RECEIVE_SIZE: %s result: %x = %d\n", \ // __func__, result, *result); @@ -495,13 +508,19 @@ char const* TYPES[10] = { "Object", PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ printf("RECEIVE STRING 1\n"); \ - while (factory->result_map[reference]->returnValue == "") \ + while (factory->result_map[reference]->returnValue == "" && \ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ - printf("Setting result to: %s\n", strdup (factory->result_map[reference]->returnValue.get ())); \ - *result = reinterpret_cast \ - (strdup (factory->result_map[reference]->returnValue.get ())); + if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + *result = NULL; \ + else \ + {\ + printf("Setting result to: %s\n", strdup (factory->result_map[reference]->returnValue.get ())); \ + *result = reinterpret_cast \ + (strdup (factory->result_map[reference]->returnValue.get ()));\ + } // \ // printf ("RECEIVE_STRING: %s result: %x = %s\n", \ // __func__, result, *result); @@ -511,16 +530,22 @@ char const* TYPES[10] = { "Object", PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ printf("RECEIVE STRING UCS 1\n"); \ - while (factory->result_map[reference]->returnValueUCS.IsEmpty()) \ + while (factory->result_map[reference]->returnValueUCS.IsEmpty() && \ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ - int length = factory->result_map[reference]->returnValueUCS.Length (); \ - jchar* newstring = static_cast (PR_Malloc (length)); \ - memset (newstring, 0, length); \ - memcpy (newstring, factory->result_map[reference]->returnValueUCS.get (), length); \ - std::cout << "Setting result to: " << factory->result_map[reference]->returnValueUCS.get() << std::endl; \ - *result = static_cast (newstring); + if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + *result = NULL; \ + else \ + { \ + int length = factory->result_map[reference]->returnValueUCS.Length (); \ + jchar* newstring = static_cast (PR_Malloc (length)); \ + memset (newstring, 0, length); \ + memcpy (newstring, factory->result_map[reference]->returnValueUCS.get (), length); \ + std::cout << "Setting result to: " << factory->result_map[reference]->returnValueUCS.get() << std::endl; \ + *result = static_cast (newstring); \ + } // \ // printf ("RECEIVE_STRING: %s result: %x = %s\n", \ @@ -530,11 +555,15 @@ char const* TYPES[10] = { "Object", PRBool processed = PR_FALSE; \ nsresult res = NS_OK; \ printf("RECEIVE BOOLEAN 1\n"); \ - while (factory->result_map[reference]->returnIdentifier == -1) \ + while (factory->result_map[reference]->returnIdentifier == -1 && \ + factory->result_map[reference]->errorOccured == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ - *result = factory->result_map[reference]->returnIdentifier; + if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + *result = NULL; \ + else \ + *result = factory->result_map[reference]->returnIdentifier; // res = factory->current->ProcessNextEvent (PR_TRUE, \ // &processed); \ // PLUGIN_CHECK_RETURN (__func__, res); \ @@ -1225,9 +1254,57 @@ template NS_IMETHODIMP template NS_IMETHODIMP IcedTeaRunnableMethod::Run () { - (object->*method) (); - return NS_OK; -} + (object->*method) (); + return NS_OK; +} + + +// FIXME: Special class just for dispatching GetURL to another +// thread.. seriously, a class just for that? there has to be a better way! + +class GetURLRunnable : public nsIRunnable +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIRUNNABLE + + GetURLRunnable (nsIPluginInstancePeer* peer, const char* url, const char* target); + + ~GetURLRunnable (); + +private: + nsIPluginInstancePeer* peer; + const char* url; + const char* target; +}; + +NS_IMPL_ISUPPORTS1 (GetURLRunnable, nsIRunnable) + +GetURLRunnable::GetURLRunnable (nsIPluginInstancePeer* peer, const char* url, const char* target) +: peer(peer), + url(url), + target(target) +{ + NS_ADDREF (peer); +} + +GetURLRunnable::~GetURLRunnable () +{ + NS_RELEASE(peer); +} + +NS_IMETHODIMP +GetURLRunnable::Run () +{ + nsCOMPtr ownerGetter = + do_QueryInterface (peer); + nsIPluginInstanceOwner* owner = nsnull; + ownerGetter->GetOwner (&owner); + + return owner->GetURL ((const char*) url, (const char*) target, + nsnull, 0, nsnull, 0); +} + NS_IMPL_ISUPPORTS6 (IcedTeaPluginFactory, nsIFactory, nsIPlugin, nsIJVMManager, nsIJVMPrefsWindow, nsIJVMPlugin, nsIInputStreamCallback) @@ -2433,6 +2510,11 @@ IcedTeaPluginFactory::OnInputStreamReady return NS_OK; } +#include +#include +#include +#include + void IcedTeaPluginFactory::HandleMessage (nsCString const& message) { @@ -2477,8 +2559,11 @@ IcedTeaPluginFactory::HandleMessage (nsC { IcedTeaPluginInstance* instance = NULL; instances.Get (identifier, &instance); -// if (instance != 0) -// instance->peer->ShowStatus (nsCString (rest).get ()); + if (instance != 0) + { + instance->peer->ShowStatus (nsCString (rest).get ()); + + } } else if (command == "initialized") { @@ -2504,9 +2589,10 @@ IcedTeaPluginFactory::HandleMessage (nsC nsIPluginInstanceOwner* owner = nsnull; ownerGetter->GetOwner (&owner); printf("Calling GetURL with %s and %s\n", nsCString (url).get (), nsCString (target).get ()); - owner->GetURL (nsCString (url).get (), - nsCString (target).get (), - nsnull, 0, nsnull, 0); + nsCOMPtr event = new GetURLRunnable (instance->peer, + nsCString (url).get (), + nsCString (target).get ()); + current->Dispatch(event, nsIEventTarget::DISPATCH_NORMAL); } } else if (command == "GetWindow") @@ -2841,20 +2927,47 @@ void IcedTeaPluginFactory::ProcessMessag void IcedTeaPluginFactory::ProcessMessage () { while (true) { - printf("Process thread sleeping...\n"); - PR_Sleep(PR_INTERVAL_NO_TIMEOUT); + PR_Sleep(1000); + + // If there was an interrupt, clear it PR_ClearInterrupt(); - - printf("Process thread interrupted...\n"); - // Was I interrupted for shutting down? if (shutting_down == PR_TRUE) { break; } - ConsumeMsgFromJVM(); + // Nope. Ok, is there work to do? + if (!jvmMsgQueue.empty()) + ConsumeMsgFromJVM(); + + // All done. Now let's process pending events + + // Were there new events dispatched? + + PRBool this_has_pending, curr_has_pending, processed = PR_FALSE; + PRBool continue_processing = PR_TRUE; + + while (continue_processing == PR_TRUE) { + + processThread->HasPendingEvents(&this_has_pending); + if (this_has_pending == PR_TRUE) { + processThread->ProcessNextEvent(PR_TRUE, &processed); + printf("Pending event processed (this) ... %d\n", processed); + } + + current->HasPendingEvents(&curr_has_pending); + if (curr_has_pending == PR_TRUE) { + current->ProcessNextEvent(PR_TRUE, &processed); + printf("Pending event processed (current) ... %d\n", processed); + } + + if (this_has_pending != PR_TRUE && curr_has_pending != PR_TRUE) { + continue_processing = PR_FALSE; + } + } } + } void IcedTeaPluginFactory::ConsumeMsgFromJVM () @@ -2872,9 +2985,7 @@ void IcedTeaPluginFactory::ConsumeMsgFro HandleMessage (message); printf("Processing complete\n"); } - -} - +} /** * @@ -3189,9 +3300,9 @@ IcedTeaPluginFactory::StartAppletviewer PLUGIN_CHECK_RETURN ("init process", result); // FIXME: hard-coded port number. - char const* args[8] = { "-classpath", extra_jars, "-Xdebug", "-Xnoagent", "-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n", "org.classpath.icedtea.plugin.PluginMain", "50007" }; + char const* args[5] = { "-Xdebug", "-Xnoagent", "-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n", "sun.applet.PluginMain", "50007" }; // char const* args[2] = { "sun.applet.PluginMain", "50007" }; - result = applet_viewer_process->Run (PR_FALSE, args, 8, nsnull); + result = applet_viewer_process->Run (PR_FALSE, args, 5, nsnull); PLUGIN_CHECK_RETURN ("run process", result); // start processing thread @@ -3812,6 +3923,7 @@ nsresult nsresult IcedTeaJNIEnv::GetCurrentContextAddr(char *addr) { + return NS_OK; PLUGIN_TRACE_JNIENV (); // Get JSContext from stack. @@ -3835,7 +3947,7 @@ nsresult nsresult IcedTeaJNIEnv::GetCurrentPageAddress(const char **addr) { - + return NS_OK; PLUGIN_TRACE_JNIENV (); nsIPrincipal *prin; @@ -4922,27 +5034,15 @@ NSGetFactory (nsISupports* aServMgr, nsC //executableString += nsCString ("/../../bin/pluginappletviewer"); executable += nsCString ("/../../bin/java"); - extrajars += jar; - extrajars += nsCString("/IcedTeaPlugin.jar"); - extrajars += ":"; - extrajars += jar; - extrajars += nsCString("/rt.jar"); //executable += nsCString ("/client/libjvm.so"); // Never freed. appletviewer_executable = strdup (executable.get ()); - extra_jars = strdup (extrajars.get ()); //libjvm_so = strdup (executable.get ()); if (!appletviewer_executable) { PLUGIN_ERROR ("Failed to create java executable name."); - return NS_ERROR_OUT_OF_MEMORY; - } - - if (!extra_jars) - { - PLUGIN_ERROR ("Failed to create plugin jar name."); return NS_ERROR_OUT_OF_MEMORY; } diff -r f4981f8a1720 -r 358cb21c4730 Makefile.am --- a/Makefile.am Wed Oct 01 05:52:01 2008 -0400 +++ b/Makefile.am Wed Oct 01 16:40:56 2008 -0400 @@ -12,13 +12,11 @@ if ENABLE_LIVECONNECT if ENABLE_LIVECONNECT ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin ICEDTEAPLUGIN_TARGET = IcedTeaPlugin.so -ICEDTEAPLUGIN_JAR = IcedTeaPlugin.jar PLUGIN_PATCH = patches/icedtea-liveconnect.patch LIVECONNECT = $(abs_top_srcdir)/plugin/icedtea/ else ICEDTEAPLUGIN_CLEAN = ICEDTEAPLUGIN_TARGET = -ICEDTEAPLUGIN_JAR = PLUGIN_PATCH = patches/icedtea-plugin.patch LIVECONNECT = if ENABLE_PLUGIN @@ -48,7 +46,6 @@ distclean-local: clean-copy clean-jtreg rm -rf hotspot-tools if ENABLE_LIVECONNECT rm -f IcedTeaPlugin.so - rm -rf IcedTeaPlugin.jar else if ENABLE_PLUGIN rm -f gcjwebplugin.so @@ -597,6 +594,7 @@ stamps/patch.stamp: stamps/patch-fsg.sta fi if ENABLE_LIVECONNECT cp -a plugin/icedtea/sun/applet/*java openjdk/jdk/src/share/classes/sun/applet/ + cp -a plugin/icedtea/netscape openjdk/jdk/src/share/classes/ endif clean-patch: @@ -616,6 +614,7 @@ clean-patch: if ! test x$${all_patches_ok} = "xyes" ; then \ echo "WARNING Not all patches reverted cleanly" ; \ fi + rm -rf openjdk/jdk/src/share/classes/netscape for file in plugin/icedtea/sun/applet/*java ; \ do \ rm -f openjdk/jdk/src/share/classes/sun/applet/`basename $file` ; \ @@ -911,7 +910,7 @@ stamps/icedtea.stamp: stamps/bootstrap-d stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \ stamps/hotspot-tools.stamp stamps/plugs.stamp \ stamps/ports.stamp stamps/patch.stamp stamps/overlay.stamp \ From dbhole at redhat.com Thu Oct 2 13:49:34 2008 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 02 Oct 2008 20:49:34 +0000 Subject: changeset in /hg/icedtea6: - More updates to the makefile so tha... Message-ID: changeset e41e54a1c0b0 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e41e54a1c0b0 description: - More updates to the makefile so that it works with the new structure diffstat: 1 file changed, 8 insertions(+), 7 deletions(-) Makefile.am | 15 ++++++++------- diffs (66 lines): diff -r 358cb21c4730 -r e41e54a1c0b0 Makefile.am --- a/Makefile.am Wed Oct 01 16:40:56 2008 -0400 +++ b/Makefile.am Thu Oct 02 15:27:35 2008 -0400 @@ -13,12 +13,12 @@ ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugi ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin ICEDTEAPLUGIN_TARGET = IcedTeaPlugin.so PLUGIN_PATCH = patches/icedtea-liveconnect.patch -LIVECONNECT = $(abs_top_srcdir)/plugin/icedtea/ +LIVECONNECT_DIR = -C lib/rt netscape else ICEDTEAPLUGIN_CLEAN = ICEDTEAPLUGIN_TARGET = PLUGIN_PATCH = patches/icedtea-plugin.patch -LIVECONNECT = +LIVECONNECT_DIR = if ENABLE_PLUGIN GCJWEBPLUGIN_CLEAN = clean-gcjwebplugin GCJWEBPLUGIN_TARGET = gcjwebplugin.so @@ -44,6 +44,7 @@ distclean-local: clean-copy clean-jtreg rm -rf openjdk-ecj rm -rf openjdk rm -rf hotspot-tools + rm -rf rt/netscape if ENABLE_LIVECONNECT rm -f IcedTeaPlugin.so else @@ -594,7 +595,7 @@ stamps/patch.stamp: stamps/patch-fsg.sta fi if ENABLE_LIVECONNECT cp -a plugin/icedtea/sun/applet/*java openjdk/jdk/src/share/classes/sun/applet/ - cp -a plugin/icedtea/netscape openjdk/jdk/src/share/classes/ + cp -a plugin/icedtea/netscape rt/ endif clean-patch: @@ -614,7 +615,7 @@ clean-patch: if ! test x$${all_patches_ok} = "xyes" ; then \ echo "WARNING Not all patches reverted cleanly" ; \ fi - rm -rf openjdk/jdk/src/share/classes/netscape + rm -rf rt/netscape for file in plugin/icedtea/sun/applet/*java ; \ do \ rm -f openjdk/jdk/src/share/classes/sun/applet/`basename $file` ; \ @@ -1203,7 +1204,7 @@ bootstrap/jdk1.7.0/jre/lib/tools.jar: st # rt-closed.jar class files. rt-source-files.txt: stamps/extract.stamp stamps/copy-source-files.stamp - find $(abs_top_srcdir)/rt $(abs_top_builddir)/rt $(LIVECONNECT) -name '*.java' \ + find $(abs_top_srcdir)/rt $(abs_top_builddir)/rt -name '*.java' \ | sort -u > $@ stamps/rt-class-files.stamp: rt-source-files.txt @@ -1238,10 +1239,10 @@ bootstrap/jdk1.7.0/jre/lib/rt-closed.jar if ! test -d $(ICEDTEA_BOOT_DIR) ; \ then \ $(JAR) cf $@ -C lib/rt com -C lib/rt java \ - -C lib/rt javax -C lib/rt net -C lib/rt sun ; \ + -C lib/rt javax $(LIVECONNECT_DIR) -C lib/rt net -C lib/rt sun ; \ else \ $(ICEDTEA_BOOT_DIR)/bin/jar cf $@ -C lib/rt com -C lib/rt java \ - -C lib/rt javax -C lib/rt net -C lib/rt sun ; \ + -C lib/rt javax $(LIVECONNECT_DIR) -C lib/rt net -C lib/rt sun ; \ fi if test -d bootstrap/ecj/jre/lib ; \ then \ From dbhole at redhat.com Thu Oct 2 13:49:35 2008 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 02 Oct 2008 20:49:35 +0000 Subject: changeset in /hg/icedtea6: Merge with upstream Message-ID: changeset b83387569a2a in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=b83387569a2a description: Merge with upstream diffstat: 1 file changed, 1 deletion(-) configure.ac | 1 - diffs (11 lines): diff -r 880c7189324c -r b83387569a2a configure.ac --- a/configure.ac Thu Oct 02 15:45:31 2008 -0400 +++ b/configure.ac Thu Oct 02 16:15:21 2008 -0400 @@ -235,7 +235,6 @@ fi fi fi FIND_RHINO_JAR -FIND_NETBEANS WITH_OPENJDK_SRC_ZIP WITH_OPENJDK_SRC_DIR WITH_VISUALVM_SRC_ZIP From dbhole at redhat.com Thu Oct 2 13:49:34 2008 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 02 Oct 2008 20:49:34 +0000 Subject: changeset in /hg/icedtea6: ChangeLog update Message-ID: changeset 868547baa028 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=868547baa028 description: ChangeLog update diffstat: 1 file changed, 43 insertions(+) ChangeLog | 43 +++++++++++++++++++++++++++++++++++++++++++ diffs (50 lines): diff -r 09dcedbe63a8 -r 868547baa028 ChangeLog --- a/ChangeLog Thu Oct 02 10:55:55 2008 -0400 +++ b/ChangeLog Thu Oct 02 15:34:39 2008 -0400 @@ -1,3 +1,46 @@ 2008-10-02 Lillian Angel + * .hgignore: Removed IcedTeaPlugin.jar + * IcedTeaPlugin.cc: Updated classpath when launching Java. added + checks to detect error on Java side. + * Makefile.am: Updated to fit new refactored files. + * plugin/icedtea/sun/applet/AppletSecurityContextManager.java: New + file, moved out of org/classpath/icedtea/plugin/, as a result of + refactoring. + * plugin/icedtea/sun/applet/PluginCallRequestFactory.java: Same. + * plugin/icedtea/sun/applet/PluginStreamHandler.java: Same. + * plugin/icedtea/sun/applet/GetMemberPluginCallRequest.java: Same. + * plugin/icedtea/sun/applet/GetWindowPluginCallRequest.java: Same. + * plugin/icedtea/sun/applet/PluginAppletSecurityContext.java: Same. + * plugin/icedtea/sun/applet/PluginMain.java: Same. + * plugin/icedtea/sun/applet/PluginMessageConsumer.java: Same. + * plugin/icedtea/sun/applet/PluginMessageHandlerWorker.java: Same. + * plugin/icedtea/sun/applet/PluginObjectStore.java: Same. + * plugin/icedtea/sun/applet/RequestQueue.java: Same. + * plugin/icedtea/sun/applet/TestEnv.java: Same. + * plugin/icedtea/sun/applet/VoidPluginCallRequest.java: Same. + * plugin/icedtea/org/classpath/icedtea/plugin/GetMemberPluginCallRequest.java: + Removed, as a result of refactoring. + * plugin/icedtea/org/classpath/icedtea/plugin/GetWindowPluginCallRequest.java: + Same. + * plugin/icedtea/org/classpath/icedtea/plugin/PluginAppletSecurityContext.java: + Same. + * plugin/icedtea/org/classpath/icedtea/plugin/PluginCallRequestFactoryImpl.java: + Same. + * plugin/icedtea/org/classpath/icedtea/plugin/PluginMain.java: Same. + * plugin/icedtea/org/classpath/icedtea/plugin/PluginMessageConsumer.java: + Same. + * plugin/icedtea/org/classpath/icedtea/plugin/PluginMessageHandlerWorker.java: + Same. + * plugin/icedtea/org/classpath/icedtea/plugin/PluginObjectStore.java: + Same. + * plugin/icedtea/org/classpath/icedtea/plugin/PluginStreamHandlerImpl.java: + Same. + * plugin/icedtea/org/classpath/icedtea/plugin/RequestQueue.java: Same. + * plugin/icedtea/org/classpath/icedtea/plugin/TestEnv.java: Same. + * plugin/icedtea/org/classpath/icedtea/plugin/VoidPluginCallRequest.java: + Same. + * plugin/icedtea/sun/applet/AppletSecurityContext.java: Same. + 2008-10-02 Lillian Angel * HACKING: Updated with new visualvm patch. From matthew.flaschen at gatech.edu Thu Oct 2 21:31:49 2008 From: matthew.flaschen at gatech.edu (Matthew Flaschen) Date: Fri, 03 Oct 2008 00:31:49 -0400 Subject: JNLP failures building latest hg of IcedTea In-Reply-To: <17c6771e0809300224n236dd4dftcf9cef1ef1006714@mail.gmail.com> References: <48E05334.2000807@gatech.edu> <20080929164859.GB1303@rivendell.middle-earth.co.uk> <48E13D5F.80907@gatech.edu> <20080930004409.GE1303@rivendell.middle-earth.co.uk> <48E1801C.6070806@gatech.edu> <17c6771e0809300221x744dc00ex4f2ff96fbfc8b0a2@mail.gmail.com> <17c6771e0809300224n236dd4dftcf9cef1ef1006714@mail.gmail.com> Message-ID: <48E5A035.8090008@gatech.edu> Andrew John Hughes wrote: >> So the problem is: >> >> /home/matthew/Code/Java/IcedTea/icedtea7/bootstrap/jdk1.6.0/bin/javac >> -J-Xmx512m -g -d extra-lib \ >> -source 1.5 \ >> -sourcepath extra -cp >> /home/matthew/Code/Java/IcedTea/icedtea7/bootstrap/jdk1.6.0/jre/lib/rt.jar >> \ >> -bootclasspath '' @extra-source-files.txt ; \ >> >> And I have a feeling it may be that your IcedTea is too old to use for >> a --with-icedtea build >> (i.e. it lacks some features of the netx support that the build >> expects to find there). The problem was with the stamps/extra-class-files.stamp target. As you note, this target requires Launcher.class, among other things. Interestingly, it appears that this target does not run on ecj builds. However, I don't think my system is updated enough to do an ecj build. I was able to successfuly do a --with-icedtea build after removing the extra-lib/about.jar target, which depends on stamps/extra-class-files.stamp. The built IcedTea7 contains Launcher.class (though I'm not sure when in the build this gets compiled), so I was able to use this to build unmodified latest hg. Matt Flaschen From Joe.Darcy at Sun.COM Thu Oct 2 22:34:58 2008 From: Joe.Darcy at Sun.COM (Joseph D. Darcy) Date: Thu, 02 Oct 2008 22:34:58 -0700 Subject: On ecj and @Override annotations for interface methods In-Reply-To: <1222517020.22140.19.camel@hermans.wildebeest.org> References: <20080917084136.GA10250@bamboo.destinee.acro.gen.nz> <48D0C79F.1080909@redhat.com> <20080917235155.GA10355@rivendell.middle-earth.co.uk> <20080918010821.GD10250@bamboo.destinee.acro.gen.nz> <17c6771e0809180328s3aeacca4m8a3969ba2abf4c84@mail.gmail.com> <1221735243.3256.14.camel@dijkstra.wildebeest.org> <17c6771e0809180426o5483138cnd801325aa004a7ee@mail.gmail.com> <1221737607.3256.22.camel@dijkstra.wildebeest.org> <20080918113722.GG10250@bamboo.destinee.acro.gen.nz> <1221738084.3256.24.camel@dijkstra.wildebeest.org> <1221739400.3256.34.camel@dijkstra.wildebeest.org> <48D263FD.1080702@sun.com> <1221748518.3256.59.camel@dijkstra.wildebeest.org> <48D2A430.2070903@sun.com> <1222164188.3178.42.camel@dijkstra.wildebeest.org> <48D8F940.40600@sun.com> <1222517020.22140.19.camel@hermans.wildebeest.org> Message-ID: <48E5AF02.7060801@sun.com> Hello. Mark Wielaard wrote: > Hi Joe, > > On Tue, 2008-09-23 at 07:12 -0700, Joseph D. Darcy wrote: > >>> Are these manpages written by hand these days? It has a comment that >>> says: "Generated by html2man", but it doesn't say what the original html >>> file is that it was generated from. >>> >>> >> The process used in the past for man pages was that the docs team works >> with us developers to write the HTML man pages, which are in turn >> converted to SGML and *roff for Solaris and Linux, respectively. It >> looks like the last update to the HTML page, 6392810 "javac manpage >> needs to be updated to include JSR 269 and other Mustang options," did >> not get converted to the other formats. If the actual *nix man pages, >> regardless of format, are supposed to be generated in this fashion, it >> would admittedly be a better architecture to have them as generated >> files during the build and not track all three versions of the man page >> under version control. >> > > So if the preferred form of the for making modifications to these > documents is the HTML or SGML version that the doc team maintains it > would be good to get those in the openjdk tree. Agreed. > Does the documentation > team maintain their own repository for these documents? > Yes; at the moment there is a Sun-internal-only repository for these documents. IMO, at least the master manpages should be moved to a public repository for JDK 7 and the build rearranged so that the *roff and SGML files are generated and not separated tracked under version control. I'll broach this with the docs team for later in JDK 7. For OpenJDK 6, I'll make sure up-to-date manpages are included in the next build. -Joe From gnu_andrew at member.fsf.org Fri Oct 3 01:06:45 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 3 Oct 2008 09:06:45 +0100 Subject: JNLP failures building latest hg of IcedTea In-Reply-To: <48E5A035.8090008@gatech.edu> References: <48E05334.2000807@gatech.edu> <20080929164859.GB1303@rivendell.middle-earth.co.uk> <48E13D5F.80907@gatech.edu> <20080930004409.GE1303@rivendell.middle-earth.co.uk> <48E1801C.6070806@gatech.edu> <17c6771e0809300221x744dc00ex4f2ff96fbfc8b0a2@mail.gmail.com> <17c6771e0809300224n236dd4dftcf9cef1ef1006714@mail.gmail.com> <48E5A035.8090008@gatech.edu> Message-ID: <17c6771e0810030106t128f1dfbl2ceae10aa3c5b12e@mail.gmail.com> 2008/10/3 Matthew Flaschen : > Andrew John Hughes wrote: >>> So the problem is: >>> >>> /home/matthew/Code/Java/IcedTea/icedtea7/bootstrap/jdk1.6.0/bin/javac >>> -J-Xmx512m -g -d extra-lib \ >>> -source 1.5 \ >>> -sourcepath extra -cp >>> /home/matthew/Code/Java/IcedTea/icedtea7/bootstrap/jdk1.6.0/jre/lib/rt.jar >>> \ >>> -bootclasspath '' @extra-source-files.txt ; \ >>> >>> And I have a feeling it may be that your IcedTea is too old to use for >>> a --with-icedtea build >>> (i.e. it lacks some features of the netx support that the build >>> expects to find there). > > The problem was with the stamps/extra-class-files.stamp target. As you > note, this target requires Launcher.class, among other things. > Interestingly, it appears that this target does not run on ecj builds. > However, I don't think my system is updated enough to do an ecj build. > It should be; I managed to use it to build on Debian etch on Wednesday... > I was able to successfuly do a --with-icedtea build after removing the > extra-lib/about.jar target, which depends on > stamps/extra-class-files.stamp. The built IcedTea7 contains > Launcher.class (though I'm not sure when in the build this gets > compiled), so I was able to use this to build unmodified latest hg. > It sounds like you effectively did a hacked-up variant of the ecj build. The naming is perhaps a misnomer. The ecj build is the default, and uses your system jdk to build IcedTea. A number of patches are included to accomodate older versions of ecj, GNU Classpath/gcj etc. It then uses this build to bootstrap a clean IcedTea build as you just did. --with-icedtea is a shortcut option to skip to the second stage if you already have a copy of IcedTea new enough. If ${JDK_INSTALL} is the location of your installed JDK (be that IcedTea, gcj-jdk or whatever) the following options can be used: ./configure --with-gcj-home=${JDK_INSTALL} --with-libgcj-jar=${JDK_INSTALL}/jre/lib/rt.jar \ --with-java=${JDK_INSTALL}/bin/java --with-javah=${JDK_INSTALL}/bin/javah --with-jar=${JDK_INSTALL}/bin/jar You can fake this setup from a Classpath + VM install. mkdir -p fake-jdk/bin ln -s ${VM_INSTALL}/bin/${VM} fake-jdk/bin/java ln -s ${CLASSPATH_INSTALL}/bin/gjar fake-jdk/bin/jar ln -s ${CLASSPATH_INSTALL}/bin/gjavah fake-jdk/bin/javah mkdir -p fake-jdk/jre/lib ln -s ${CLASSPATH_INSTALL}/share/classpath/glibj.zip fake-jdk/jre/lib/rt.jar mkdir -p fake-jdk/lib ln -s ${CLASSPATH_INSTALL}/share/classpath/tools.zip fake-jdk/lib/tools.jar mkdir -p fake-jdk/jre/lib/${ARCH}/{client,server} ln -s ${VM_INSTALL}/lib/libjvm.so fake-jdk/jre/lib/${ARCH}/client ln -s ${VM_INSTALL}/lib/libjvm.so fake-jdk/jre/lib/${ARCH}/server ln -s ${CLASSPATH_INSTALL}/include fake-jdk > Matt Flaschen > -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From matthew.flaschen at gatech.edu Fri Oct 3 01:58:42 2008 From: matthew.flaschen at gatech.edu (Matthew Flaschen) Date: Fri, 03 Oct 2008 04:58:42 -0400 Subject: JNLP failures building latest hg of IcedTea In-Reply-To: <17c6771e0810030106t128f1dfbl2ceae10aa3c5b12e@mail.gmail.com> References: <48E05334.2000807@gatech.edu> <20080929164859.GB1303@rivendell.middle-earth.co.uk> <48E13D5F.80907@gatech.edu> <20080930004409.GE1303@rivendell.middle-earth.co.uk> <48E1801C.6070806@gatech.edu> <17c6771e0809300221x744dc00ex4f2ff96fbfc8b0a2@mail.gmail.com> <17c6771e0809300224n236dd4dftcf9cef1ef1006714@mail.gmail.com> <48E5A035.8090008@gatech.edu> <17c6771e0810030106t128f1dfbl2ceae10aa3c5b12e@mail.gmail.com> Message-ID: <48E5DEC2.10809@gatech.edu> Andrew John Hughes wrote: >> However, I don't think my system is updated enough to do an ecj build. >> > > It should be; I managed to use it to build on Debian etch on Wednesday... I don't have libgcj-4.3.*.jar. >> I was able to successfuly do a --with-icedtea build after removing the >> extra-lib/about.jar target, which depends on >> stamps/extra-class-files.stamp. The built IcedTea7 contains >> Launcher.class (though I'm not sure when in the build this gets >> compiled), so I was able to use this to build unmodified latest hg. >> > > It sounds like you effectively did a hacked-up variant of the ecj build. > The naming is perhaps a misnomer. The ecj build is the default, and uses > your system jdk to build IcedTea. I don't think so, unless I'm reading the Makefile totally wrong. I was still using an old copy of IcedTea to build a new IcedTea; I just skipped a very small part of the build (about.jar). My patch to the Makefile is attached. Now, of course, I can use my "new" IcedTea to build without the little hack (and have done so to test). Matt Flaschen -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea_on_icedtea_tweaks_2008-10-02.patch Type: text/x-patch Size: 889 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20081003/0814a709/attachment.bin From gnu_andrew at member.fsf.org Fri Oct 3 02:54:44 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 3 Oct 2008 10:54:44 +0100 Subject: JNLP failures building latest hg of IcedTea In-Reply-To: <48E5DEC2.10809@gatech.edu> References: <48E05334.2000807@gatech.edu> <20080929164859.GB1303@rivendell.middle-earth.co.uk> <48E13D5F.80907@gatech.edu> <20080930004409.GE1303@rivendell.middle-earth.co.uk> <48E1801C.6070806@gatech.edu> <17c6771e0809300221x744dc00ex4f2ff96fbfc8b0a2@mail.gmail.com> <17c6771e0809300224n236dd4dftcf9cef1ef1006714@mail.gmail.com> <48E5A035.8090008@gatech.edu> <17c6771e0810030106t128f1dfbl2ceae10aa3c5b12e@mail.gmail.com> <48E5DEC2.10809@gatech.edu> Message-ID: <17c6771e0810030254x29a5068ei1bf3ab1c56dfc36a@mail.gmail.com> 2008/10/3 Matthew Flaschen : > Andrew John Hughes wrote: >>> However, I don't think my system is updated enough to do an ecj build. >>> >> >> It should be; I managed to use it to build on Debian etch on Wednesday... > > I don't have libgcj-4.3.*.jar. > As I said, --with-libgcj-jar= would fix this. >>> I was able to successfuly do a --with-icedtea build after removing the >>> extra-lib/about.jar target, which depends on >>> stamps/extra-class-files.stamp. The built IcedTea7 contains >>> Launcher.class (though I'm not sure when in the build this gets >>> compiled), so I was able to use this to build unmodified latest hg. >>> >> >> It sounds like you effectively did a hacked-up variant of the ecj build. >> The naming is perhaps a misnomer. The ecj build is the default, and uses >> your system jdk to build IcedTea. > > I don't think so, unless I'm reading the Makefile totally wrong. I was > still using an old copy of IcedTea to build a new IcedTea; I just > skipped a very small part of the build (about.jar). My patch to the > Makefile is attached. > > Now, of course, I can use my "new" IcedTea to build without the little > hack (and have done so to test). > > Matt Flaschen > -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From matthew.flaschen at gatech.edu Fri Oct 3 03:00:30 2008 From: matthew.flaschen at gatech.edu (Matthew Flaschen) Date: Fri, 03 Oct 2008 06:00:30 -0400 Subject: JNLP failures building latest hg of IcedTea In-Reply-To: <17c6771e0810030254x29a5068ei1bf3ab1c56dfc36a@mail.gmail.com> References: <48E05334.2000807@gatech.edu> <20080929164859.GB1303@rivendell.middle-earth.co.uk> <48E13D5F.80907@gatech.edu> <20080930004409.GE1303@rivendell.middle-earth.co.uk> <48E1801C.6070806@gatech.edu> <17c6771e0809300221x744dc00ex4f2ff96fbfc8b0a2@mail.gmail.com> <17c6771e0809300224n236dd4dftcf9cef1ef1006714@mail.gmail.com> <48E5A035.8090008@gatech.edu> <17c6771e0810030106t128f1dfbl2ceae10aa3c5b12e@mail.gmail.com> <48E5DEC2.10809@gatech.edu> <17c6771e0810030254x29a5068ei1bf3ab1c56dfc36a@mail.gmail.com> Message-ID: <48E5ED3E.4030400@gatech.edu> Andrew John Hughes wrote: > 2008/10/3 Matthew Flaschen : >> Andrew John Hughes wrote: >>>> However, I don't think my system is updated enough to do an ecj build. >>>> >>> It should be; I managed to use it to build on Debian etch on Wednesday... >> I don't have libgcj-4.3.*.jar. >> > > As I said, --with-libgcj-jar= would fix this. And that would work even if rt.jar didn't have Launcher.class? I think I understand this now. Matt Flaschen From gnu_andrew at member.fsf.org Fri Oct 3 03:24:52 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Fri, 3 Oct 2008 11:24:52 +0100 Subject: JNLP failures building latest hg of IcedTea In-Reply-To: <48E5ED3E.4030400@gatech.edu> References: <48E05334.2000807@gatech.edu> <20080930004409.GE1303@rivendell.middle-earth.co.uk> <48E1801C.6070806@gatech.edu> <17c6771e0809300221x744dc00ex4f2ff96fbfc8b0a2@mail.gmail.com> <17c6771e0809300224n236dd4dftcf9cef1ef1006714@mail.gmail.com> <48E5A035.8090008@gatech.edu> <17c6771e0810030106t128f1dfbl2ceae10aa3c5b12e@mail.gmail.com> <48E5DEC2.10809@gatech.edu> <17c6771e0810030254x29a5068ei1bf3ab1c56dfc36a@mail.gmail.com> <48E5ED3E.4030400@gatech.edu> Message-ID: <17c6771e0810030324l4d5e18d6maab09526a47bb6bb@mail.gmail.com> 2008/10/3 Matthew Flaschen : > Andrew John Hughes wrote: >> 2008/10/3 Matthew Flaschen : >>> Andrew John Hughes wrote: >>>>> However, I don't think my system is updated enough to do an ecj build. >>>>> >>>> It should be; I managed to use it to build on Debian etch on Wednesday... >>> I don't have libgcj-4.3.*.jar. >>> >> >> As I said, --with-libgcj-jar= would fix this. > > And that would work even if rt.jar didn't have Launcher.class? I think > I understand this now. > > Matt Flaschen > Yes :) It adds a preliminary stage to the build that effectively puts you in the situation you are now; with a current IcedTea for building IcedTea. -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From bugzilla-daemon at icedtea.classpath.org Fri Oct 3 04:20:30 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 03 Oct 2008 11:20:30 +0000 Subject: [Bug 200] New: java-1.6.0-openjdk-plugin (x86_64) fails to render radar time loop animation Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=200 Summary: java-1.6.0-openjdk-plugin (x86_64) fails to render radar time loop animation Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: trapper at ledduk.net The web page with rendering failure is here: http://www.goes.noaa.gov/HURRLOOPS/huirloop.html This is a radar time loop java applet with generally 7 to 10 sequential frames. Although the progress bar shows the frame progress, the frames do not switch. Only the first frame is displayed. There is no animation of the radar display. This has been an ongoing issue with openjdk and Sun java through Fedora 8, 9 and 10 in both 32 bit & 64 bit versions when used with firefox 2x and 3x. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From gbenson at redhat.com Fri Oct 3 04:58:25 2008 From: gbenson at redhat.com (Gary Benson) Date: Fri, 03 Oct 2008 11:58:25 +0000 Subject: changeset in /hg/icedtea6: 2008-10-03 Gary Benson changeset e0a13e4cc434 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e0a13e4cc434 description: 2008-10-03 Gary Benson * ports/hotspot/build/linux/makefiles/shark.make: Work around some GCC optimizer failures. diffstat: 2 files changed, 19 insertions(+) ChangeLog | 5 +++++ ports/hotspot/build/linux/makefiles/shark.make | 14 ++++++++++++++ diffs (39 lines): diff -r b83387569a2a -r e0a13e4cc434 ChangeLog --- a/ChangeLog Thu Oct 02 16:15:21 2008 -0400 +++ b/ChangeLog Fri Oct 03 07:58:17 2008 -0400 @@ -1,3 +1,8 @@ 2008-10-01 Deepak Bhole + + * ports/hotspot/build/linux/makefiles/shark.make: + Work around some GCC optimizer failures. + 2008-10-01 Deepak Bhole * .hgignore: Removed IcedTeaPlugin.jar * IcedTeaPlugin.cc: Updated classpath when launching Java. added diff -r b83387569a2a -r e0a13e4cc434 ports/hotspot/build/linux/makefiles/shark.make --- a/ports/hotspot/build/linux/makefiles/shark.make Thu Oct 02 16:15:21 2008 -0400 +++ b/ports/hotspot/build/linux/makefiles/shark.make Fri Oct 03 07:58:17 2008 -0400 @@ -1,5 +1,6 @@ # # Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2008 Red Hat, Inc. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,3 +30,16 @@ VM_SUBDIR = server VM_SUBDIR = server CFLAGS += -DSHARK + +# Something these files fail with GCC at higher optimization levels. +# An llvm::Value ends up NULL, causing segfaults in LLVM when it is +# used. Observed with 4.1.2 20070925 (Red Hat 4.1.2-33) and 4.3.2. +OPT_CFLAGS/sharkBlock.o = -O0 +OPT_CFLAGS/sharkMonitor.o = -O0 + +# Something in this file fails with GCC at higher optimization levels. +# The part of ciTypeFlow::StateVector::meet_exception() that fills in +# local variables stops part way through leaving the rest set to T_TOP +# (ie uninitialized). The VM then aborts with a ShouldNotReachHere() +# in SharkPHIState::initialize(). Observed with 4.3.2. +OPT_CFLAGS/ciTypeFlow.o = -O1 From iivan at redhat.com Fri Oct 3 13:20:58 2008 From: iivan at redhat.com (Ioana Ivan) Date: Fri, 03 Oct 2008 20:20:58 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-03 Ioana Ivan changeset a9057b218aa0 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=a9057b218aa0 description: 2008-10-03 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/EventLoop.java: replaced call to System.load with call to System.loadLibrary * src/java/org/classpath/icedtea/pulseaudio/Operation.java: Likewise * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java: Likewise * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java: Likewise * src/java/org/classpath/icedtea/pulseaudio/Stream.java Likewise * Makefile.am: removed * build.xml: removed * src/native/Makefile.am: removed diffstat: 8 files changed, 5 insertions(+), 178 deletions(-) Makefile.am | 6 build.xml | 93 ---------- src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 11 - src/java/org/classpath/icedtea/pulseaudio/Operation.java | 11 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java | 11 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java | 11 - src/java/org/classpath/icedtea/pulseaudio/Stream.java | 11 - src/native/Makefile.am | 29 --- diffs (245 lines): diff -r a6a5ca46e90e -r a9057b218aa0 Makefile.am --- a/Makefile.am Tue Sep 30 14:43:55 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -SUBDIRS = src/native - -clean-local: - ant clean ; \ - rm -f libpulse-java.so ; - diff -r a6a5ca46e90e -r a9057b218aa0 build.xml --- a/build.xml Tue Sep 30 14:43:55 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r a6a5ca46e90e -r a9057b218aa0 src/java/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Tue Sep 30 14:43:55 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Fri Oct 03 16:20:27 2008 -0400 @@ -106,16 +106,7 @@ public class EventLoop implements Runnab */ static { - try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - // System.out.println(EventLoop.class.getCanonicalName() + ": " - // + library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } + System.loadLibrary("pulse-java"); } private EventLoop() { diff -r a6a5ca46e90e -r a9057b218aa0 src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Tue Sep 30 14:43:55 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Fri Oct 03 16:20:27 2008 -0400 @@ -59,16 +59,7 @@ public class Operation { } static { - try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - // System.out.println(Operation.class.getCanonicalName() + ": " - // + library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } + System.loadLibrary("pulse-java"); } private native void native_ref(); diff -r a6a5ca46e90e -r a9057b218aa0 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Tue Sep 30 14:43:55 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Fri Oct 03 16:20:27 2008 -0400 @@ -44,16 +44,7 @@ public class PulseAudioSourcePort extend public class PulseAudioSourcePort extends PulseAudioPort { static { - try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - // System.out.println(PulseAudioVolumeControl.class.getCanonicalName() - // + ": " + library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } + System.loadLibrary("pulse-java"); } public PulseAudioSourcePort(String name, EventLoop eventLoop) { diff -r a6a5ca46e90e -r a9057b218aa0 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Tue Sep 30 14:43:55 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Fri Oct 03 16:20:27 2008 -0400 @@ -44,16 +44,7 @@ public class PulseAudioTargetPort extend public class PulseAudioTargetPort extends PulseAudioPort { static { - try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - // System.out.println(PulseAudioVolumeControl.class.getCanonicalName() - // + ": " + library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } + System.loadLibrary("pulse-java"); } public PulseAudioTargetPort(String name, EventLoop eventLoop) { diff -r a6a5ca46e90e -r a9057b218aa0 src/java/org/classpath/icedtea/pulseaudio/Stream.java --- a/src/java/org/classpath/icedtea/pulseaudio/Stream.java Tue Sep 30 14:43:55 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java Fri Oct 03 16:20:27 2008 -0400 @@ -105,16 +105,7 @@ public class Stream { private byte[] streamPointer; static { - try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - // System.out - // .println(Stream.class.getCanonicalName() + ": " + library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } + System.loadLibrary("pulse-java"); } private Format format; diff -r a6a5ca46e90e -r a9057b218aa0 src/native/Makefile.am --- a/src/native/Makefile.am Tue Sep 30 14:43:55 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -lib_LTLIBRARIES = libpulse-java.la - -libpulse_java_la_SOURCES = \ - jni-common.c \ - jni-common.h \ - org_classpath_icedtea_pulseaudio_EventLoop.c \ - org_classpath_icedtea_pulseaudio_EventLoop.h \ - org_classpath_icedtea_pulseaudio_Operation.h \ - org_classpath_icedtea_pulseaudio_Operation.c \ - org_classpath_icedtea_pulseaudio_Stream.c \ - org_classpath_icedtea_pulseaudio_Stream.h \ - org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.h \ - org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c \ - org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c \ - org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.h - - - - -AM_CFLAGS = -g -Wall -Werror $(PLATFORM_FLAGS) $(LIBPULSE_CFLAGS) -AM_LDFLAGS = -g -Wall -Werror $(LIBPULSE_LIBS) - -PLATFORM_FLAGS = -DWITH_32BIT_PLATFORM - -topdir = ../.. - -all-local: $(lib_LTLIBRARIES) - cp .libs/libpulse-java.so $(topdir) - From doko at ubuntu.com Mon Oct 6 01:51:07 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Mon, 06 Oct 2008 08:51:07 +0000 Subject: changeset in /hg/icedtea6: 2008-10-05 Matthias Klose changeset 192176f52fb4 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=192176f52fb4 description: 2008-10-05 Matthias Klose * Makefile.am (distclean-local): Remove IcedTeaPlugin object file. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ Makefile.am | 2 +- diffs (23 lines): diff -r e0a13e4cc434 -r 192176f52fb4 ChangeLog --- a/ChangeLog Fri Oct 03 07:58:17 2008 -0400 +++ b/ChangeLog Mon Oct 06 10:37:31 2008 +0200 @@ -1,3 +1,7 @@ 2008-10-03 Gary Benson + + * Makefile.am (distclean-local): Remove IcedTeaPlugin object file. + 2008-10-03 Gary Benson * ports/hotspot/build/linux/makefiles/shark.make: diff -r e0a13e4cc434 -r 192176f52fb4 Makefile.am --- a/Makefile.am Fri Oct 03 07:58:17 2008 -0400 +++ b/Makefile.am Mon Oct 06 10:37:31 2008 +0200 @@ -52,7 +52,7 @@ distclean-local: clean-copy clean-jtreg rm -rf hotspot-tools rm -rf rt/netscape if ENABLE_LIVECONNECT - rm -f IcedTeaPlugin.so + rm -f IcedTeaPlugin.o IcedTeaPlugin.so else if ENABLE_PLUGIN rm -f gcjwebplugin.so From doko at ubuntu.com Mon Oct 6 03:00:26 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Mon, 06 Oct 2008 10:00:26 +0000 Subject: changeset in /hg/icedtea6: 2008-10-06 Matthias Klose changeset 76843a64878d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=76843a64878d description: 2008-10-06 Matthias Klose * IcedTeaPlugin.cc (PLUGIN_MIME_DESC): Remove 1.7 specs. diffstat: 2 files changed, 6 insertions(+), 4 deletions(-) ChangeLog | 4 ++++ IcedTeaPlugin.cc | 6 ++---- diffs (34 lines): diff -r 192176f52fb4 -r 76843a64878d ChangeLog --- a/ChangeLog Mon Oct 06 10:37:31 2008 +0200 +++ b/ChangeLog Mon Oct 06 11:59:41 2008 +0200 @@ -1,3 +1,7 @@ 2008-10-05 Matthias Klose + + * IcedTeaPlugin.cc (PLUGIN_MIME_DESC): Remove 1.7 specs. + 2008-10-05 Matthias Klose * Makefile.am (distclean-local): Remove IcedTeaPlugin object file. diff -r 192176f52fb4 -r 76843a64878d IcedTeaPlugin.cc --- a/IcedTeaPlugin.cc Mon Oct 06 10:37:31 2008 +0200 +++ b/IcedTeaPlugin.cc Mon Oct 06 11:59:41 2008 +0200 @@ -215,8 +215,7 @@ private: "application/x-java-applet;version=1.4.2:class,jar:IcedTea;" \ "application/x-java-applet;version=1.5:class,jar:IcedTea;" \ "application/x-java-applet;version=1.6:class,jar:IcedTea;" \ - "application/x-java-applet;version=1.7:class,jar:IcedTea;" \ - "application/x-java-applet;jpi-version=1.7.0_00:class,jar:IcedTea;" \ + "application/x-java-applet;jpi-version=1.6.0_00:class,jar:IcedTea;" \ "application/x-java-bean:class,jar:IcedTea;" \ "application/x-java-bean;version=1.1:class,jar:IcedTea;" \ "application/x-java-bean;version=1.1.1:class,jar:IcedTea;" \ @@ -232,8 +231,7 @@ private: "application/x-java-bean;version=1.4.2:class,jar:IcedTea;" \ "application/x-java-bean;version=1.5:class,jar:IcedTea;" \ "application/x-java-bean;version=1.6:class,jar:IcedTea;" \ - "application/x-java-bean;version=1.7:class,jar:IcedTea;" \ - "application/x-java-bean;jpi-version=1.7.0_00:class,jar:IcedTea;" + "application/x-java-bean;jpi-version=1.6.0_00:class,jar:IcedTea;" #define FAILURE_MESSAGE "IcedTeaPluginFactory error: Failed to run %s." \ " For more detail rerun \"firefox -g\" in a terminal window." From doko at ubuntu.com Mon Oct 6 03:02:47 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Mon, 06 Oct 2008 10:02:47 +0000 Subject: changeset in /hg/icedtea6: 2008-10-06 Matthias Klose changeset d6c8840e4167 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d6c8840e4167 description: 2008-10-06 Matthias Klose * generated/sun/misc/Version.java: Regenerate for 6b12. * generated/sun/tools/jconsole/Version.java: Likewise. diffstat: 3 files changed, 8 insertions(+), 3 deletions(-) ChangeLog | 5 +++++ generated/sun/misc/Version.java | 4 ++-- generated/sun/tools/jconsole/Version.java | 2 +- diffs (40 lines): diff -r 76843a64878d -r d6c8840e4167 ChangeLog --- a/ChangeLog Mon Oct 06 11:59:41 2008 +0200 +++ b/ChangeLog Mon Oct 06 12:02:04 2008 +0200 @@ -1,3 +1,8 @@ 2008-10-06 Matthias Klose + + * generated/sun/misc/Version.java: Regenerate for 6b12. + * generated/sun/tools/jconsole/Version.java: Likewise. + 2008-10-06 Matthias Klose * IcedTeaPlugin.cc (PLUGIN_MIME_DESC): Remove 1.7 specs. diff -r 76843a64878d -r d6c8840e4167 generated/sun/misc/Version.java --- a/generated/sun/misc/Version.java Mon Oct 06 11:59:41 2008 +0200 +++ b/generated/sun/misc/Version.java Mon Oct 06 12:02:04 2008 +0200 @@ -36,10 +36,10 @@ public class Version { "1.6.0_0"; private static final String java_runtime_name = - "OpenJDK Runtime Environment"; + "OpenJDK Runtime Environment"; private static final String java_runtime_version = - "1.6.0_0-b11"; + "1.6.0_0-b12"; static { init(); diff -r 76843a64878d -r d6c8840e4167 generated/sun/tools/jconsole/Version.java --- a/generated/sun/tools/jconsole/Version.java Mon Oct 06 11:59:41 2008 +0200 +++ b/generated/sun/tools/jconsole/Version.java Mon Oct 06 12:02:04 2008 +0200 @@ -29,7 +29,7 @@ import java.io.PrintStream; public class Version { private static final String jconsole_version = - "1.6.0_0-b11"; + "1.6.0_0-b12"; public static void print(PrintStream ps) { printFullVersion(ps); From bugzilla-daemon at icedtea.classpath.org Mon Oct 6 03:18:38 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 06 Oct 2008 10:18:38 +0000 Subject: [Bug 203] New: Shark segfaults in DaCapo eclipse benchmark Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=203 Summary: Shark segfaults in DaCapo eclipse benchmark Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: gbenson at redhat.com Shark fails to run the DaCapo eclipse benchmark, segfaulting after a while in org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser.readTokenSafely()I. It works fine if this method is excluded from being compiled, which suggests it is a miscompilation of some sort. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 6 03:18:47 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 06 Oct 2008 10:18:47 +0000 Subject: [Bug 203] Shark segfaults in DaCapo eclipse benchmark Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=203 gbenson at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|gbenson at redhat.com |.org | -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. From aph at redhat.com Mon Oct 6 04:49:57 2008 From: aph at redhat.com (Andrew Haley) Date: Mon, 06 Oct 2008 12:49:57 +0100 Subject: preparing a icedtea-1.3 release? In-Reply-To: <48E0DBF8.7070804@redhat.com> References: <48DFA75E.6080906@ubuntu.com> <1222636644.3271.10.camel@dijkstra.wildebeest.org> <20080928212527.GA7083@rivendell.middle-earth.co.uk> <48E0DBF8.7070804@redhat.com> Message-ID: <48E9FB65.7070504@redhat.com> Lillian Angel wrote: > Andrew John Hughes wrote: >> On 23:17 Sun 28 Sep , Mark Wielaard wrote: >>> Hi, >>> >>> On Sun, 2008-09-28 at 17:48 +0200, Matthias Klose wrote: >>>> The last icedtea release 1.2 (bases on b09) was four months ago. I >>>> would like to >>>> prepare a 1.3 release based ob b12. are there currently outstanding >>>> issues? >>> Good idea. There have been lots of improvements since the last official >>> 1.2 release. Including various security and crasher issues, that we >>> really should make sure are picked up by the various distros. >>> >> >> Lillian already mentioned she is working on this in her blog. >> >> http://langel.wordpress.com/2008/09/24/women-in-foss/ >> >> This really should have been sent to distro-pkg-dev as well. > > I have been waiting for the PulseAudio and LiveConnect work before going > ahead with a release. Is everyone ok with waiting for these? Yes. I think it's much better to go with a release when these significant features are added rather than at a fixed time interval. Andrew. From omajid at redhat.com Mon Oct 6 08:31:33 2008 From: omajid at redhat.com (Omair Majid) Date: Mon, 06 Oct 2008 15:31:33 +0000 Subject: changeset in /hg/pulseaudio: 2008-09-6 Omair Majid changeset eb2d35a91b0d in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=eb2d35a91b0d description: 2008-09-6 Omair Majid * Got rid of unneeded imports. * Removed unused stuff from PulseAudioVolumeControl diffstat: 6 files changed, 25 deletions(-) src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 1 src/java/org/classpath/icedtea/pulseaudio/Operation.java | 1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java | 2 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java | 2 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java | 18 ---------- src/java/org/classpath/icedtea/pulseaudio/Stream.java | 1 diffs (94 lines): diff -r a9057b218aa0 -r eb2d35a91b0d src/java/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Fri Oct 03 16:20:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Mon Oct 06 11:31:34 2008 -0400 @@ -37,7 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Semaphore; diff -r a9057b218aa0 -r eb2d35a91b0d src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Fri Oct 03 16:20:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Mon Oct 06 11:31:34 2008 -0400 @@ -37,7 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; /* * Encapsulates a pa_operation object diff -r a9057b218aa0 -r eb2d35a91b0d src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Fri Oct 03 16:20:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Mon Oct 06 11:31:34 2008 -0400 @@ -37,8 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; - import javax.sound.sampled.Port; public class PulseAudioSourcePort extends PulseAudioPort { diff -r a9057b218aa0 -r eb2d35a91b0d src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Fri Oct 03 16:20:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Mon Oct 06 11:31:34 2008 -0400 @@ -37,8 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; - import javax.sound.sampled.Port; public class PulseAudioTargetPort extends PulseAudioPort { diff -r a9057b218aa0 -r eb2d35a91b0d src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java Fri Oct 03 16:20:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java Mon Oct 06 11:31:34 2008 -0400 @@ -37,8 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; - import javax.sound.sampled.FloatControl; class PulseAudioVolumeControl extends FloatControl { @@ -55,24 +53,8 @@ class PulseAudioVolumeControl extends Fl this.eventLoop = eventLoop; } - @SuppressWarnings("unused") - private byte[] streamPointer; - private EventLoop eventLoop; private PulseAudioPlaybackLine line; - - static { - try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - // System.out.println(PulseAudioVolumeControl.class.getCanonicalName() - // + ": " + library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } - } public synchronized void setValue(float newValue) { if (newValue > MAX_VOLUME || newValue < MIN_VOLUME) { diff -r a9057b218aa0 -r eb2d35a91b0d src/java/org/classpath/icedtea/pulseaudio/Stream.java --- a/src/java/org/classpath/icedtea/pulseaudio/Stream.java Fri Oct 03 16:20:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java Mon Oct 06 11:31:34 2008 -0400 @@ -37,7 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; import java.util.LinkedList; import java.util.List; From omajid at redhat.com Mon Oct 6 12:42:18 2008 From: omajid at redhat.com (Omair Majid) Date: Mon, 06 Oct 2008 19:42:18 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-06 Omair Majid changeset fa7dd0d762f1 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=fa7dd0d762f1 description: 2008-10-06 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (open): Synchronized method. (native_setVolume): Synchronized native method on eventLoop. (setVolume): Synchronized method. (write): Set flushed to false on initialization, and false when handling the flush. (close): Synchronized method. diffstat: 1 file changed, 20 insertions(+), 16 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 36 +++++----- diffs (98 lines): diff -r 86fab9e2bc64 -r fa7dd0d762f1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Oct 06 15:30:33 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Oct 06 15:36:55 2008 -0400 @@ -51,7 +51,7 @@ public class PulseAudioSourceDataLine ex private PulseAudioVolumeControl volumeControl; private boolean muted; private float volume; - + boolean flushed = false; boolean drained = false; @@ -67,7 +67,7 @@ public class PulseAudioSourceDataLine ex } @Override - public void open(AudioFormat format, int bufferSize) + synchronized public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { super.open(format, bufferSize); @@ -88,7 +88,9 @@ public class PulseAudioSourceDataLine ex } public byte[] native_setVolume(float value) { - return stream.native_setVolume(value); + synchronized (eventLoop.threadLock) { + return stream.native_setVolume(value); + } } public boolean isMuted() { @@ -103,7 +105,7 @@ public class PulseAudioSourceDataLine ex return this.volume; } - public void setVolume(float value) { + synchronized public void setVolume(float value) { this.volume = value; } @@ -155,20 +157,22 @@ public class PulseAudioSourceDataLine ex int sizeWritten = 0; + flushed = false; + boolean interrupted = false; while (remainingLength != 0) { synchronized (this) { - - if (!isStarted || !isOpen) { + + if (!isStarted || !isOpen) { return sizeWritten; } - + if (flushed) { + flushed = false; return sizeWritten; } - synchronized (eventLoop.threadLock) { @@ -264,7 +268,7 @@ public class PulseAudioSourceDataLine ex operation.waitForCompletion(); operation.releaseReference(); - + synchronized (this) { drained = true; } @@ -287,13 +291,13 @@ public class PulseAudioSourceDataLine ex operation.releaseReference(); synchronized (this) { - flushed= true; - } - - } - - @Override - public void close() { + flushed = true; + } + + } + + @Override + synchronized public void close() { if (!isOpen) { throw new IllegalStateException("not open so cant close"); } From omajid at redhat.com Mon Oct 6 12:42:18 2008 From: omajid at redhat.com (Omair Majid) Date: Mon, 06 Oct 2008 19:42:18 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-06 Omair Majid changeset 86fab9e2bc64 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=86fab9e2bc64 description: 2008-10-06 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java New variables flushed and drained. (write): Synchronized on this. (flush): Set flushed to true. (drain): Set drained to true. diffstat: 2 files changed, 61 insertions(+), 34 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 92 ++++++---- src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 3 diffs (139 lines): diff -r eb2d35a91b0d -r 86fab9e2bc64 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Oct 06 11:31:34 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Mon Oct 06 15:30:33 2008 -0400 @@ -51,6 +51,9 @@ public class PulseAudioSourceDataLine ex private PulseAudioVolumeControl volumeControl; private boolean muted; private float volume; + + boolean flushed = false; + boolean drained = false; public PulseAudioSourceDataLine(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { @@ -156,43 +159,56 @@ public class PulseAudioSourceDataLine ex while (remainingLength != 0) { - synchronized (eventLoop.threadLock) { - - do { - availableSize = stream.getWritableSize(); - - if (availableSize < 0) { - return sizeWritten; + synchronized (this) { + + if (!isStarted || !isOpen) { + return sizeWritten; + } + + if (flushed) { + return sizeWritten; + } + + + synchronized (eventLoop.threadLock) { + + do { + availableSize = stream.getWritableSize(); + + if (availableSize < 0) { + return sizeWritten; + } + + if (availableSize == 0) { + try { + eventLoop.threadLock.wait(); + } catch (InterruptedException e) { + // ignore for now + interrupted = true; + } + + } + + } while (availableSize == 0); + + if (availableSize > remainingLength) { + availableSize = remainingLength; } - if (availableSize == 0) { - try { - eventLoop.threadLock.wait(); - } catch (InterruptedException e) { - // ignore for now - interrupted = true; - } - - } - - } while (availableSize == 0); - - if (availableSize > remainingLength) { - availableSize = remainingLength; + // only write entire frames, so round down avialableSize to + // a + // multiple of frameSize + availableSize = (availableSize / frameSize) * frameSize; + + /* write a little bit of the buffer */ + stream.write(data, position, availableSize); + + sizeWritten += availableSize; + position += availableSize; + remainingLength -= availableSize; + + framesSinceOpen += availableSize / frameSize; } - - // only write entire frames, so round down avialableSize to a - // multiple of frameSize - availableSize = (availableSize / frameSize) * frameSize; - - /* write a little bit of the buffer */ - stream.write(data, position, availableSize); - - sizeWritten += availableSize; - position += availableSize; - remainingLength -= availableSize; - - framesSinceOpen += availableSize / frameSize; } } @@ -248,6 +264,10 @@ public class PulseAudioSourceDataLine ex operation.waitForCompletion(); operation.releaseReference(); + + synchronized (this) { + drained = true; + } } @@ -266,6 +286,10 @@ public class PulseAudioSourceDataLine ex operation.waitForCompletion(); operation.releaseReference(); + synchronized (this) { + flushed= true; + } + } @Override diff -r eb2d35a91b0d -r 86fab9e2bc64 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Oct 06 11:31:34 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Oct 06 15:30:33 2008 -0400 @@ -151,6 +151,9 @@ public class PulseAudioTargetDataLine ex /* bytes read on each iteration of loop */ int bytesRead; + flushed = false; + drained = false; + /* * to read, we first take stuff from the fragmentBuffer */ From omajid at redhat.com Mon Oct 6 14:03:18 2008 From: omajid at redhat.com (Omair Majid) Date: Mon, 06 Oct 2008 21:03:18 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-06 Omair Majid changeset 6695cbc7fe43 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=6695cbc7fe43 description: 2008-10-06 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java (read): Continue reading if peek returns null. * src/native/org_classpath_icedtea_pulseaudio_Stream.c (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1peek): Return null if no data to read. diffstat: 2 files changed, 7 insertions(+), 1 deletion(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 3 ++- src/native/org_classpath_icedtea_pulseaudio_Stream.c | 5 +++++ diffs (32 lines): diff -r fa7dd0d762f1 -r 6695cbc7fe43 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Oct 06 15:36:55 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Mon Oct 06 17:03:22 2008 -0400 @@ -219,11 +219,12 @@ public class PulseAudioTargetDataLine ex /* read a fragment, and drop it from the server */ currentFragment = stream.peek(); + stream.drop(); if (currentFragment == null) { System.out .println("DEBUG: PulseAudioTargetDataLine:read(): error in stream.peek()"); - return sizeRead; + continue; } bytesRead = Math.min(currentFragment.length, diff -r fa7dd0d762f1 -r 6695cbc7fe43 src/native/org_classpath_icedtea_pulseaudio_Stream.c --- a/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Oct 06 15:36:55 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Oct 06 17:03:22 2008 -0400 @@ -560,6 +560,11 @@ JNIEXPORT jbyteArray JNICALL Java_org_cl return NULL; } + /* no data available */ + if (startLocation == NULL) { + return NULL; + } + jsize length = count; jbyteArray data = (*env)->NewByteArray(env, length); From doko at ubuntu.com Tue Oct 7 05:12:33 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Tue, 07 Oct 2008 12:12:33 +0000 Subject: changeset in /hg/icedtea6: 2008-10-07 Matthias Klose changeset e4575e17609d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e4575e17609d description: 2008-10-07 Matthias Klose * Makefile.am: Don't rely on versioned cacao source directory. diffstat: 2 files changed, 7 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ Makefile.am | 4 +++- diffs (32 lines): diff -r d6c8840e4167 -r e4575e17609d ChangeLog --- a/ChangeLog Mon Oct 06 12:02:04 2008 +0200 +++ b/ChangeLog Tue Oct 07 14:11:49 2008 +0200 @@ -1,3 +1,7 @@ 2008-10-06 Matthias Klose + + * Makefile.am: Don't rely on versioned cacao source directory. + 2008-10-06 Matthias Klose * generated/sun/misc/Version.java: Regenerate for 6b12. diff -r d6c8840e4167 -r e4575e17609d Makefile.am --- a/Makefile.am Mon Oct 06 12:02:04 2008 +0200 +++ b/Makefile.am Tue Oct 07 14:11:49 2008 +0200 @@ -533,6 +533,8 @@ if !USE_SYSTEM_CACAO then \ mkdir cacao ; \ $(TAR) xf $(CACAO_SRC_ZIP) -C cacao ; \ + dir=$$(basename cacao/cacao-*) ; \ + ln -s $$dir cacao/cacao ; \ fi endif endif @@ -1316,7 +1318,7 @@ stamps/cacao.stamp: stamps/extract.stamp stamps/cacao.stamp: stamps/extract.stamp stamps/rt-class-files.stamp if WITH_CACAO if !USE_SYSTEM_CACAO - cd cacao/cacao-$(CACAO_VERSION) && \ + cd cacao/cacao && \ ./configure \ --prefix=$(abs_top_builddir)/cacao/install \ --with-java-runtime-library=openjdk \ From gbenson at redhat.com Tue Oct 7 08:16:21 2008 From: gbenson at redhat.com (Gary Benson) Date: Tue, 07 Oct 2008 15:16:21 +0000 Subject: changeset in /hg/icedtea6: 2008-10-07 Gary Benson changeset ab8aa9425fc4 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=ab8aa9425fc4 description: 2008-10-07 Gary Benson Andrew Haley * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp (object): Add missing return statement. (displaced_header): Likewise. * ports/hotspot/build/linux/makefiles/shark.make: Remove workaround for the above. diffstat: 3 files changed, 12 insertions(+), 8 deletions(-) ChangeLog | 10 ++++++++++ ports/hotspot/build/linux/makefiles/shark.make | 6 ------ ports/hotspot/src/share/vm/shark/sharkMonitor.hpp | 4 ++-- diffs (54 lines): diff -r e4575e17609d -r ab8aa9425fc4 ChangeLog --- a/ChangeLog Tue Oct 07 14:11:49 2008 +0200 +++ b/ChangeLog Tue Oct 07 11:16:16 2008 -0400 @@ -1,3 +1,13 @@ 2008-10-07 Matthias Klose + Andrew Haley + + * ports/hotspot/src/share/vm/shark/sharkMonitor.hpp + (object): Add missing return statement. + (displaced_header): Likewise. + + * ports/hotspot/build/linux/makefiles/shark.make: + Remove workaround for the above. + 2008-10-07 Matthias Klose * Makefile.am: Don't rely on versioned cacao source directory. diff -r e4575e17609d -r ab8aa9425fc4 ports/hotspot/build/linux/makefiles/shark.make --- a/ports/hotspot/build/linux/makefiles/shark.make Tue Oct 07 14:11:49 2008 +0200 +++ b/ports/hotspot/build/linux/makefiles/shark.make Tue Oct 07 11:16:16 2008 -0400 @@ -31,12 +31,6 @@ VM_SUBDIR = server CFLAGS += -DSHARK -# Something these files fail with GCC at higher optimization levels. -# An llvm::Value ends up NULL, causing segfaults in LLVM when it is -# used. Observed with 4.1.2 20070925 (Red Hat 4.1.2-33) and 4.3.2. -OPT_CFLAGS/sharkBlock.o = -O0 -OPT_CFLAGS/sharkMonitor.o = -O0 - # Something in this file fails with GCC at higher optimization levels. # The part of ciTypeFlow::StateVector::meet_exception() that fills in # local variables stops part way through leaving the rest set to T_TOP diff -r e4575e17609d -r ab8aa9425fc4 ports/hotspot/src/share/vm/shark/sharkMonitor.hpp --- a/ports/hotspot/src/share/vm/shark/sharkMonitor.hpp Tue Oct 07 14:11:49 2008 +0200 +++ b/ports/hotspot/src/share/vm/shark/sharkMonitor.hpp Tue Oct 07 11:16:16 2008 -0400 @@ -67,7 +67,7 @@ class SharkMonitor : public ResourceObj public: llvm::Value* object() const { - builder()->CreateLoad(object_addr()); + return builder()->CreateLoad(object_addr()); } void set_object(llvm::Value* object) const { @@ -75,7 +75,7 @@ class SharkMonitor : public ResourceObj } llvm::Value* displaced_header() const { - builder()->CreateLoad(displaced_header_addr()); + return builder()->CreateLoad(displaced_header_addr()); } void set_displaced_header(llvm::Value* displaced_header) const { From omajid at redhat.com Tue Oct 7 09:06:26 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 07 Oct 2008 16:06:26 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-07 Omair Majid changeset e688b471726e in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=e688b471726e description: 2008-10-07 Omair Majid * src/native/jni-common.h Grouped related functions together. Added sections in file. Added two constants ILLEGAL_STATE_EXCEPTION and ILLEGAL_ARGUMENT_EXCEPTION to make it easiser to throw exceptions. * src/native/org_classpath_icedtea_pulseaudio_Stream.c (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1read): Removed commented function. (drain_callback): Throw an exception instaed of an assert if the operation failed. (cork_callback): Likewise. (flush_callback): Likewise. (trigger_callback): Likewise. (set_name_callback): Likewise. (set_buffer_attr_callback): Likewise. (update_sample_rate_callback): Likewise diffstat: 2 files changed, 100 insertions(+), 83 deletions(-) src/native/jni-common.h | 27 ++- src/native/org_classpath_icedtea_pulseaudio_Stream.c | 156 +++++++++--------- diffs (302 lines): diff -r 6695cbc7fe43 -r e688b471726e src/native/jni-common.h --- a/src/native/jni-common.h Mon Oct 06 17:03:22 2008 -0400 +++ b/src/native/jni-common.h Tue Oct 07 11:31:39 2008 -0400 @@ -49,6 +49,21 @@ typedef struct java_context_t { jobject obj; } java_context_t; +/* Exception Handling */ + +void throwByName(JNIEnv* const env, const char* const name, + const char* const msg); + +#define ILLEGAL_ARGUMENT_EXCEPTION "java/lang/IllegalArgumentException" +#define ILLEGAL_STATE_EXCEPTION "java/lang/IllegalStateException" + +/* Threading and Synchronization */ + +jobject getLockObject(JNIEnv* env); +void notifyWaitingOperations(JNIEnv* env); + +/* Storing and Loading Values */ + jint getJavaIntField(JNIEnv* env, jobject obj, char* fieldName); void setJavaIntField(JNIEnv* env, jobject obj, char* fieldName, jint value); @@ -59,13 +74,7 @@ void setJavaByteArrayField(JNIEnv* env, void setJavaByteArrayField(JNIEnv* env, jobject obj, char* name, jbyteArray array); -void callJavaVoidMethod(JNIEnv* env, jobject obj, const char* method_name); - -void throwByName(JNIEnv* const env, const char* const name, - const char* const msg); - -jobject getLockObject(JNIEnv* env); -void notifyWaitingOperations(JNIEnv* env); +/* Pointers and Java */ void* getJavaPointer(JNIEnv* env, jobject obj, char* name); void setJavaPointer(JNIEnv* env, jobject obj, char*name, void* pointer_value); @@ -73,5 +82,9 @@ void* convertJavaPointerToNative(JNIEnv* void* convertJavaPointerToNative(JNIEnv* env, jbyteArray pointer); jbyteArray convertNativePointerToJava(JNIEnv* env, void* pointer); +/* Calling Java Functions */ + +void callJavaVoidMethod(JNIEnv* env, jobject obj, const char* method_name); + #endif diff -r 6695cbc7fe43 -r e688b471726e src/native/org_classpath_icedtea_pulseaudio_Stream.c --- a/src/native/org_classpath_icedtea_pulseaudio_Stream.c Mon Oct 06 17:03:22 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_Stream.c Tue Oct 07 11:31:39 2008 -0400 @@ -401,15 +401,14 @@ JNIEXPORT jint JNICALL Java_org_classpat jbyteArray volumePointer, jbyteArray sync_streamPointer) { pa_stream *sync_stream; - if(sync_streamPointer != NULL) { - sync_stream = convertJavaPointerToNative(env, sync_streamPointer); - printf("Master stream is %p\n", sync_stream); - } else { - sync_stream = NULL; - } - - pa_stream* stream = (pa_stream*) getJavaPointer(env, obj, STREAM_POINTER); - + if(sync_streamPointer != NULL) { + sync_stream = convertJavaPointerToNative(env, sync_streamPointer); + printf("Master stream is %p\n", sync_stream); + } else { + sync_stream = NULL; + } + + pa_stream* stream = (pa_stream*) getJavaPointer(env, obj, STREAM_POINTER); pa_buffer_attr buffer_attr; @@ -436,8 +435,8 @@ JNIEXPORT jint JNICALL Java_org_classpat } } /* Set flags to 0 to fix problem with draining before calling start, might need to - be changed back to PA_STREAM_START_CORKED in the future, if we'll be able to implement - synchronization*/ + be changed back to PA_STREAM_START_CORKED in the future, if we'll be able to implement + synchronization*/ int value = pa_stream_connect_playback(stream, dev, &buffer_attr, 0, NULL, sync_stream); if (dev != NULL) { @@ -526,24 +525,6 @@ JNIEXPORT jint JNICALL Java_org_classpat } /* -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1read -(JNIEnv *env, jobject obj, jbyteArray array, jint length, jint offset) { - pa_stream *stream = getJavaPointer(env, obj, STREAM_POINTER); - assert(stream); - const void *read_data = NULL; - size_t read_length = 0; - pa_stream_peek(stream, &read_data, &read_length); - if (length < read_length) { - read_length = length; - } - - (*env)->SetByteArrayRegion(env, array, offset, read_length, read_data); - pa_stream_drop(stream); - return read_length; -} -*/ - -/* * Class: org_classpath_icedtea_pulseaudio_Stream * Method: native_pa_stream_peek * Signature: ()[B @@ -564,7 +545,7 @@ JNIEXPORT jbyteArray JNICALL Java_org_cl if (startLocation == NULL) { return NULL; } - + jsize length = count; jbyteArray data = (*env)->NewByteArray(env, length); @@ -616,48 +597,56 @@ JNIEXPORT jint JNICALL Java_org_classpat static void drain_callback(pa_stream* stream, int success, void* userdata) { - assert(success); + assert(stream); + JNIEnv* env = pulse_thread_env; + assert(env); + + notifyWaitingOperations(env); + + if (success == 0) { + throwByName(env, ILLEGA_STATE_EXCEPTION, "drain failed"); + } + +} + +/* + * Class: org_classpath_icedtea_pulseaudio_Stream + * Method: native_pa_stream_drain + * Signature: ()[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1drain +(JNIEnv* env, jobject obj) { + pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, STREAM_POINTER); + assert(stream); + pa_operation* operation = pa_stream_drain(stream, drain_callback, NULL); + assert(operation); + return convertNativePointerToJava(env, operation); +} + +/* + * Class: org_classpath_icedtea_pulseaudio_Stream + * Method: native_pa_stream_is_corked + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1is_1corked +(JNIEnv* env, jobject obj) { + pa_stream* stream = (pa_stream*) getJavaPointer(env, obj, STREAM_POINTER); + assert(stream); + return pa_stream_is_corked(stream); +} + +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); -} - -/* - * Class: org_classpath_icedtea_pulseaudio_Stream - * Method: native_pa_stream_drain - * Signature: ()[B - */ -JNIEXPORT jbyteArray JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1drain -(JNIEnv* env, jobject obj) { - pa_stream* stream = (pa_stream*)getJavaPointer(env, obj, STREAM_POINTER); - assert(stream); - pa_operation* operation = pa_stream_drain(stream, drain_callback, NULL); - assert(operation); - return convertNativePointerToJava(env, operation); -} - -/* - * Class: org_classpath_icedtea_pulseaudio_Stream - * Method: native_pa_stream_is_corked - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1is_1corked -(JNIEnv* env, jobject obj) { - pa_stream* stream = (pa_stream*) getJavaPointer(env, obj, STREAM_POINTER); - assert(stream); - return pa_stream_is_corked(stream); -} - -static void cork_callback(pa_stream* stream, int success, void* userdata) { - - java_context* context = userdata; - assert(stream); - assert(context); - assert(success); - JNIEnv* env = pulse_thread_env; - assert(env); - notifyWaitingOperations(env); + if (success == 0) { + throwByName(env, ILLEGAL_STATE_EXCEPTION, "cork failed"); + } } @@ -680,11 +669,15 @@ JNIEXPORT jbyteArray JNICALL Java_org_cl } static void flush_callback(pa_stream* stream, int success, void* userdata) { - assert(success); + assert(stream); JNIEnv* env = pulse_thread_env; assert(env); notifyWaitingOperations(env); + if (success == 0) { + throwByName(env, ILLEGAL_STATE_EXCEPTION, "flush failed"); + } + } /* @@ -702,11 +695,15 @@ JNIEXPORT jbyteArray JNICALL Java_org_cl } static void trigger_callback(pa_stream* stream, int success, void* userdata) { - assert(success); + assert(stream); JNIEnv* env = pulse_thread_env; assert(env); notifyWaitingOperations(env); + if (success == 0) { + throwByName(env, ILLEGAL_STATE_EXCEPTION, "trigger failed"); + } + } /* @@ -724,10 +721,13 @@ JNIEXPORT jbyteArray JNICALL Java_org_cl } static void set_name_callback(pa_stream* stream, int success, void* userdata) { - assert(success); + assert(stream); JNIEnv* env = pulse_thread_env; notifyWaitingOperations(env); + if (success == 0) { + throwByName(env, ILLEGAL_STATE_EXCEPTION, "set_name failed"); + } } /* @@ -856,14 +856,14 @@ static void set_buffer_attr_callback(pa_ static void set_buffer_attr_callback(pa_stream* stream, int success, void* userdata) { - const pa_buffer_attr* buffer = pa_stream_get_buffer_attr(stream); - assert(buffer); - - assert(success); + assert(stream); JNIEnv* env = pulse_thread_env; assert(env); notifyWaitingOperations(env); + if (success == 0) { + throwByName(env, ILLEGAL_STATE_EXCEPTION, "set_buffer_attr failed"); + } } /* @@ -918,11 +918,15 @@ JNIEXPORT jbyteArray JNICALL Java_org_cl static void update_sample_rate_callback(pa_stream* stream, int success, void* userdata) { - assert(success); + assert(stream); JNIEnv* env = pulse_thread_env; assert(env); notifyWaitingOperations(env); + if (success == 0) { + throwByName(eng, ILLEGAL_STATE_EXCEPTION, "update_sampl_rate failed"); + } + } /* * Class: org_classpath_icedtea_pulseaudio_Stream From omajid at redhat.com Tue Oct 7 09:06:26 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 07 Oct 2008 16:06:26 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-07 Omair Majid changeset d7c213ee6717 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=d7c213ee6717 description: 2008-10-07 Omair Majid * src/native/org_classpath_icedtea_pulseaudio_Stream.c (drain_callback): Fixed typo. (update_sample_rate_callback): Likewise. diffstat: 1 file changed, 2 insertions(+), 2 deletions(-) src/native/org_classpath_icedtea_pulseaudio_Stream.c | 4 ++-- diffs (21 lines): diff -r e688b471726e -r d7c213ee6717 src/native/org_classpath_icedtea_pulseaudio_Stream.c --- a/src/native/org_classpath_icedtea_pulseaudio_Stream.c Tue Oct 07 11:31:39 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_Stream.c Tue Oct 07 12:06:29 2008 -0400 @@ -604,7 +604,7 @@ static void drain_callback(pa_stream* st notifyWaitingOperations(env); if (success == 0) { - throwByName(env, ILLEGA_STATE_EXCEPTION, "drain failed"); + throwByName(env, ILLEGAL_STATE_EXCEPTION, "drain failed"); } } @@ -924,7 +924,7 @@ static void update_sample_rate_callback( notifyWaitingOperations(env); if (success == 0) { - throwByName(eng, ILLEGAL_STATE_EXCEPTION, "update_sampl_rate failed"); + throwByName(env, ILLEGAL_STATE_EXCEPTION, "update_sampl_rate failed"); } } From omajid at redhat.com Tue Oct 7 11:08:18 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 07 Oct 2008 18:08:18 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-07 Omair Majid changeset c080309b8edd in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=c080309b8edd description: 2008-10-07 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java (writeFrames): Synchronized the call to notifyAll. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java (addStreamListeners): Likewise. diffstat: 2 files changed, 17 insertions(+), 23 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 4 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 36 +++------- diffs (112 lines): diff -r d7c213ee6717 -r c080309b8edd src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Tue Oct 07 12:06:29 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Tue Oct 07 14:08:22 2008 -0400 @@ -125,7 +125,9 @@ public class PulseAudioClip extends Puls WriteListener writeListener = new WriteListener() { @Override public void update() { - eventLoop.threadLock.notifyAll(); + synchronized (eventLoop.threadLock) { + eventLoop.threadLock.notifyAll(); + } } }; diff -r d7c213ee6717 -r c080309b8edd src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Tue Oct 07 12:06:29 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Tue Oct 07 14:08:22 2008 -0400 @@ -58,9 +58,8 @@ public abstract class PulseAudioDataLine // true between start() and stop() protected boolean isStarted = false; - //true between a started and an underflow callback + // true between a started and an underflow callback protected boolean dataWritten = false; - // true if a stream has been paused // protected boolean isPaused = false; @@ -161,10 +160,9 @@ public abstract class PulseAudioDataLine Stream.UnderflowListener stoppedListener = new Stream.UnderflowListener() { @Override - public void update() { dataWritten = false; - System.out.println("underflow"); + // always send a STOP event on an underflow (assumption: // an underflow can't happen while the stream is corked) fireLineEvent(new LineEvent(PulseAudioDataLine.this, @@ -176,10 +174,9 @@ public abstract class PulseAudioDataLine Stream.PlaybackStartedListener startedListener = new Stream.PlaybackStartedListener() { @Override public void update() { - System.out.println("started callback"); - - //only send a START event in the beginning and following - //an underflow + + // only send a START event in the beginning and following + // an underflow if (!dataWritten) { fireLineEvent(new LineEvent(PulseAudioDataLine.this, LineEvent.Type.START, framesSinceOpen)); @@ -196,8 +193,9 @@ public abstract class PulseAudioDataLine @Override public void update() { - // System.out.println("can write"); - eventLoop.threadLock.notifyAll(); + synchronized (eventLoop.threadLock) { + eventLoop.threadLock.notifyAll(); + } } }; @@ -207,8 +205,9 @@ public abstract class PulseAudioDataLine @Override public void update() { - - eventLoop.threadLock.notifyAll(); + synchronized (eventLoop.threadLock) { + eventLoop.threadLock.notifyAll(); + } } }; @@ -314,10 +313,9 @@ public abstract class PulseAudioDataLine if (isStarted) { return; - - } - - + + } + Operation op; synchronized (eventLoop.threadLock) { op = stream.unCork(); @@ -330,7 +328,6 @@ public abstract class PulseAudioDataLine op.waitForCompletion(); op.releaseReference(); isStarted = true; - } @@ -427,11 +424,6 @@ public abstract class PulseAudioDataLine public void setName(String streamName) { if (isOpen) { - /* - * Note: setting the name of the stream after it's created wont - * work. In fact, it sets the name of the application! This is a bug - * in PulseAudio 0.9.12 but fixed in git. - */ Operation o; synchronized (eventLoop.threadLock) { From bugzilla-daemon at icedtea.classpath.org Tue Oct 7 11:49:23 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 07 Oct 2008 18:49:23 +0000 Subject: [Bug 206] New: Eclipse crashes Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=206 Summary: Eclipse crashes Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: critical Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: marc at marcchamberlin.com I guess I am suppose to report this here... I keep getting crashes in Eclipse Version: 3.4.1 Build id: M20080911-1700 These crashes occur at an unpredictable moment, dunno if each crash is related. HUMP! Well I would have included the log file but this version of Bugzilla will neither let me append it to this description (too long) nor does is have the ability to attach a separate file to a report. If you want me to send it in, then send me an email telling where... I will hang on to it for a month or so.. I have appended the first part of the log file... Marc.. # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fcd30fd5e1a, pid=12902, tid=1088575824 # # Java VM: OpenJDK 64-Bit Server VM (1.6.0-b09 mixed mode linux-amd64) # Problematic frame: # V [libjvm.so+0x200e1a] # # If you would like to submit a bug report, please visit: # http://icedtea.classpath.org/bugzilla # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Tue Oct 7 14:17:39 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 07 Oct 2008 21:17:39 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-07 Omair Majid changeset a4ec901897a5 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=a4ec901897a5 description: 2008-10-07 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java (static): Use System.loadLibrary instead of System.load. diffstat: 1 file changed, 1 insertion(+), 12 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java | 13 ---------- diffs (30 lines): diff -r c080309b8edd -r a4ec901897a5 src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Tue Oct 07 14:08:22 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Tue Oct 07 17:17:31 2008 -0400 @@ -37,8 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; - import javax.sound.sampled.AudioSystem; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineUnavailableException; @@ -66,16 +64,7 @@ public abstract class PulseAudioPort ext private PulseAudioVolumeControl volumeControl; static { - try { - String library = new java.io.File(".").getCanonicalPath() - + java.io.File.separatorChar - + System.mapLibraryName("pulse-java"); - // System.out.println(PulseAudioVolumeControl.class.getCanonicalName() - // + ": " + library); - System.load(library); - } catch (IOException e) { - assert ("Loading failed".endsWith("library")); - } + System.loadLibrary("pulse-java"); } public PulseAudioPort(String name, EventLoop eventLoop) { From bugzilla-daemon at icedtea.classpath.org Wed Oct 8 01:17:51 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 08 Oct 2008 08:17:51 +0000 Subject: [Bug 206] Eclipse crashes Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=206 ------- Comment #1 from matthew.flaschen at gatech.edu 2008-10-08 08:17 ------- Click "Create a New Attachment"... -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Oct 8 01:49:07 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 08 Oct 2008 08:49:07 +0000 Subject: [Bug 206] Eclipse crashes Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=206 ------- Comment #2 from mark at klomp.org 2008-10-08 08:49 ------- This seems to be a really old IcedTea, based on openjdk b09. This is most likely a duplicate of bug #180. Could you try with a newer version? BTW. Attachements can only be added after the bug is created. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Wed Oct 8 07:10:20 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 08 Oct 2008 14:10:20 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-08 Omair Majid changeset c9645471db6c in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=c9645471db6c description: 2008-10-08 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java (isSynchronizationSupported): Return false. (synchronize): Commented out non-working code. Throw exception instead. diffstat: 1 file changed, 35 insertions(+), 32 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 67 +++++----- diffs (81 lines): diff -r a4ec901897a5 -r c9645471db6c src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Tue Oct 07 17:17:31 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 10:09:48 2008 -0400 @@ -393,42 +393,45 @@ public class PulseAudioMixer implements @Override public boolean isSynchronizationSupported(Line[] lines, boolean maintainSync) { - // FIXME - return true; + return false; } @Override public void synchronize(Line[] lines, boolean maintainSync) { - Line masterStream = null; - for (Line line : lines) { - if (line.isOpen()) { - masterStream = line; - break; - } - } - if (masterStream == null) { - // for now, can't synchronize lines if none of them is open (no - // stream pointer to pass) - // will see what to do about this later - throw new IllegalArgumentException(); - } - - try { - - for (Line line : lines) { - if (line != masterStream) { - - ((PulseAudioDataLine) line) - .reconnectforSynchronization(((PulseAudioDataLine) masterStream) - .getStream()); - - } - } - } catch (LineUnavailableException e) { - // we couldn't reconnect, so tell the user we failed by throwing an - // exception - throw new IllegalArgumentException(e); - } + + throw new IllegalArgumentException( + "Mixer does not support synchronizing lines"); + + // Line masterStream = null; + // for (Line line : lines) { + // if (line.isOpen()) { + // masterStream = line; + // break; + // } + // } + // if (masterStream == null) { + // // for now, can't synchronize lines if none of them is open (no + // // stream pointer to pass) + // // will see what to do about this later + // throw new IllegalArgumentException(); + // } + // + // try { + // + // for (Line line : lines) { + // if (line != masterStream) { + // + // ((PulseAudioDataLine) line) + // .reconnectforSynchronization(((PulseAudioDataLine) masterStream) + // .getStream()); + // + // } + // } + // } catch (LineUnavailableException e) { + // // we couldn't reconnect, so tell the user we failed by throwing an + // // exception + // throw new IllegalArgumentException(e); + // } } From omajid at redhat.com Wed Oct 8 07:19:40 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 08 Oct 2008 14:19:40 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-08 Omair Majid changeset 96e885ef985c in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=96e885ef985c description: 2008-10-08 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java (getMaxLines): Return AudioSystem.NOT_SPECIFIED only for supported formats. diffstat: 1 file changed, 10 insertions(+), 2 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 12 ++++++++-- diffs (22 lines): diff -r c9645471db6c -r 96e885ef985c src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 10:09:48 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 10:19:48 2008 -0400 @@ -316,8 +316,16 @@ public class PulseAudioMixer implements } @Override - public int getMaxLines(javax.sound.sampled.Line.Info info) { - return AudioSystem.NOT_SPECIFIED; + public int getMaxLines(Line.Info info) { + /* + * PulseAudio supports (theoretically) unlimited number of streams for + * supported formats + */ + if (isLineSupported(info)) { + return AudioSystem.NOT_SPECIFIED; + } + + return 0; } @Override From omajid at redhat.com Wed Oct 8 07:38:25 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 08 Oct 2008 14:38:25 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-08 Omair Majid changeset a3a8e9e19967 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=a3a8e9e19967 description: 2008-10-08 Omair Majid * unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java (testSynchronizationNotSupported): Checks that synchronization isnt allowed by the mixer. diffstat: 1 file changed, 37 insertions(+) unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 37 ++++++++++ diffs (54 lines): diff -r 96e885ef985c -r a3a8e9e19967 unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Wed Oct 08 10:19:48 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Wed Oct 08 10:38:29 2008 -0400 @@ -45,6 +45,7 @@ import javax.sound.sampled.LineUnavailab import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Mixer; import javax.sound.sampled.Port; +import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.TargetDataLine; import org.junit.After; @@ -366,6 +367,42 @@ public class PulseAudioMixerTest { } @Test + public void testSynchronizationNotSupported() + throws LineUnavailableException { + selectedMixer.open(); + + SourceDataLine line1 = (SourceDataLine) selectedMixer + .getLine(new Line.Info(SourceDataLine.class)); + SourceDataLine line2 = (SourceDataLine) selectedMixer + .getLine(new Line.Info(SourceDataLine.class)); + Line[] lines = { line1, line2 }; + + Assert.assertFalse(selectedMixer + .isSynchronizationSupported(lines, true)); + + Assert.assertFalse(selectedMixer.isSynchronizationSupported(lines, + false)); + + try { + selectedMixer.synchronize(lines, true); + Assert.fail("mixer shouldnt be able to synchronize lines"); + } catch (IllegalArgumentException e) { + + } + + try { + selectedMixer.synchronize(lines, false); + Assert.fail("mixer shouldnt be able to synchronize lines"); + } catch (IllegalArgumentException e) { + + } + + selectedMixer.close(); + + } + + @Ignore + @Test public void testLongWait() throws LineUnavailableException { selectedMixer.open(); try { From bugzilla-daemon at icedtea.classpath.org Wed Oct 8 11:08:45 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 08 Oct 2008 18:08:45 +0000 Subject: [Bug 206] Eclipse crashes Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=206 ------- Comment #3 from marc at marcchamberlin.com 2008-10-08 18:08 ------- Created an attachment (id=107) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=107&action=view) Log file from Eclipse crash -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Oct 8 11:10:12 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 08 Oct 2008 18:10:12 +0000 Subject: [Bug 206] Eclipse crashes Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=206 ------- Comment #4 from marc at marcchamberlin.com 2008-10-08 18:10 ------- Aw I see the "Create a New Attachment" now... bit confusing that Bugzilla does not offer that initially when creating a new bug report... Anywise I will attach the log file so it can be examined and if this is a duplicate of an already reported bug then ok by me to mark as resolved... I think I will not be using this flavor of Java after all however.. it now appears that I will need to use an Enterprise Edition of Java JDK or SDK so will go look at IBM's Geronimo or Sun's GlassFish versions and install one of those instead... -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Oct 8 11:21:13 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 08 Oct 2008 18:21:13 +0000 Subject: [Bug 180] JVM crash while running Eclipse 3.4 on Fedora 9 (x86_64) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=180 mark at klomp.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marc at marcchamberlin.com ------- Comment #8 from mark at klomp.org 2008-10-08 18:21 ------- *** Bug 206 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Oct 8 11:21:13 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 08 Oct 2008 18:21:13 +0000 Subject: [Bug 206] Eclipse crashes Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=206 mark at klomp.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #5 from mark at klomp.org 2008-10-08 18:21 ------- DataTreeNode.forwardDeltaWith hotspot crash is indeed a duplicate of bug #180. Please upgrade to a newer icedtea version. *** This bug has been marked as a duplicate of bug 180 *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From iivan at redhat.com Wed Oct 8 11:35:49 2008 From: iivan at redhat.com (Ioana Ivan) Date: Wed, 08 Oct 2008 18:35:49 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-08 Ioana Ivan changeset 4260a476a101 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=4260a476a101 description: 2008-10-08 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java (addStreamListener): startedListener always fires a START event strtedListener notifies drain that there is data on the line (stop): sets writeInterrupted to true (start): doesn't send any events (getBytesInBuffer): new function, returns the number of bytes currently present in a stream's buffer * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: (write): -checks writeInterrupted instead of drain and flush -if stop() was called before write() it writes data to the buffer until the buffer fills, then blocks -moved some code from the synchronized(this) block, since it was causing one test to hang (close): sets writeInterrupted to true (drain): sets writeInterrupted to true if the line is stopped and there is no data on the line, returns immediately, if there is data, blocks until the line is started * src/java/org/classpath/icedtea/pulseaudio/Stream.java (native_pa_stream_updateTimingInfo): new function ( bytesInBuffer): new function * src/native/org_classpath_icedtea_pulseaudio_Stream.c (JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_bytesInBuffer): new function (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1updateTimingInfo): new function (update_timing_info_callback): new function (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1writable_1size): return 0 if the stream has been closed diffstat: 12 files changed, 254 insertions(+), 102 deletions(-) ChangeLog | 36 ++ configure.ac | 6 src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 4 src/java/org/classpath/icedtea/pulseaudio/Operation.java | 1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 41 +-- src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 136 +++++----- src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java | 2 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java | 2 src/java/org/classpath/icedtea/pulseaudio/Stream.java | 16 + src/native/org_classpath_icedtea_pulseaudio_Stream.c | 44 +++ unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java | 67 +++- diffs (truncated from 695 to 500 lines): diff -r a3a8e9e19967 -r 4260a476a101 ChangeLog --- a/ChangeLog Wed Oct 08 10:38:29 2008 -0400 +++ b/ChangeLog Wed Oct 08 14:27:39 2008 -0400 @@ -1,3 +1,39 @@ 2008-09-25 Ioana Ivan +2008-10-08 Ioana Ivan + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java + (addStreamListener): startedListener always fires a START event + strtedListener notifies drain that there is data + on the line + (stop): sets writeInterrupted to true + (start): doesn't send any events + (getBytesInBuffer): new function, returns the number of bytes + currently present in a stream's buffer + + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java: + (write): -checks writeInterrupted instead of drain and flush + -if stop() was called before write() it writes data to the + buffer until the buffer fills, then blocks + -moved some code from the synchronized(this) block, since it + was causing one test to hang + (close): sets writeInterrupted to true + (drain): sets writeInterrupted to true + if the line is stopped and there is no data on the line, + returns immediately, if there is data, blocks until the line + is started + + * src/java/org/classpath/icedtea/pulseaudio/Stream.java + (native_pa_stream_updateTimingInfo): new function + ( bytesInBuffer): new function + + * src/native/org_classpath_icedtea_pulseaudio_Stream.c + (JNICALL Java_org_classpath_icedtea_pulseaudio_Stream_bytesInBuffer): + new function + (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1updateTimingInfo): + new function + (update_timing_info_callback): new function + (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1writable_1size): + return 0 if the stream has been closed + + 2008-09-25 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java: removed all references to the boolean variable corked since it was diff -r a3a8e9e19967 -r 4260a476a101 configure.ac --- a/configure.ac Wed Oct 08 10:38:29 2008 -0400 +++ b/configure.ac Wed Oct 08 14:27:39 2008 -0400 @@ -4,12 +4,12 @@ AC_PROG_LIBTOOL AC_PROG_LIBTOOL dnl Check for pulseaudio libraries. -PKG_CHECK_MODULES(LIBPULSE,[libpulse >= 0.9.11],[LIBPULSE_FOUND=yes] +PKG_CHECK_MODULES(LIBPULSE,libpulse,[LIBPULSE_FOUND=yes] ,[LIBPULSE_FOUND=no]) if test "x${LIBPULSE_FOUND}" = xno then - AC_MSG_ERROR([Could not find pulseaudio>=0.9.11 libraries - \ - Try installing pulseaudio-libs-devel>=0.9.11.]) + AC_MSG_ERROR([Could not find pulseaudio libraries - \ + Try installing pulseaudio-libs-devel.]) fi AC_SUBST(LIBPULSE_CFLAGS) AC_SUBST(LIBPULSE_LIBS) diff -r a3a8e9e19967 -r 4260a476a101 src/java/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Oct 08 10:38:29 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Oct 08 14:27:39 2008 -0400 @@ -37,6 +37,7 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; +import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Semaphore; @@ -105,7 +106,7 @@ public class EventLoop implements Runnab */ static { - System.loadLibrary("pulse-java"); + System.loadLibrary("pulse-java"); } private EventLoop() { @@ -197,6 +198,7 @@ public class EventLoop implements Runnab break; case 5: fireEvent(new ContextEvent(Type.FAILED)); + System.out.println("context failed"); break; case 6: fireEvent(new ContextEvent(Type.TERMINATED)); diff -r a3a8e9e19967 -r 4260a476a101 src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Wed Oct 08 10:38:29 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Wed Oct 08 14:27:39 2008 -0400 @@ -37,6 +37,7 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; +import java.io.IOException; /* * Encapsulates a pa_operation object diff -r a3a8e9e19967 -r 4260a476a101 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Wed Oct 08 10:38:29 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Wed Oct 08 14:27:39 2008 -0400 @@ -76,6 +76,7 @@ public abstract class PulseAudioDataLine protected EventLoop eventLoop = null; protected Semaphore semaphore = new Semaphore(0); protected Stream stream; + boolean writeInterrupted = false; protected void open(AudioFormat format, int bufferSize) throws LineUnavailableException { @@ -149,6 +150,9 @@ public abstract class PulseAudioDataLine PulseAudioDataLine.this, LineEvent.Type.CLOSE, framesSinceOpen))); } + synchronized (this) { + this.notifyAll(); + } semaphore.release(); } @@ -174,15 +178,13 @@ public abstract class PulseAudioDataLine Stream.PlaybackStartedListener startedListener = new Stream.PlaybackStartedListener() { @Override public void update() { - - // only send a START event in the beginning and following - // an underflow - if (!dataWritten) { - fireLineEvent(new LineEvent(PulseAudioDataLine.this, - LineEvent.Type.START, framesSinceOpen)); - } + fireLineEvent(new LineEvent(PulseAudioDataLine.this, + LineEvent.Type.START, framesSinceOpen)); dataWritten = true; + synchronized (this) { + this.notifyAll(); + } } }; @@ -260,6 +262,7 @@ public abstract class PulseAudioDataLine } public void close() { + if (!isOpen) { throw new IllegalStateException( "Line must be open for close() to work"); @@ -280,10 +283,10 @@ public abstract class PulseAudioDataLine } super.close(); + isStarted = false; - - } - + } + public void reconnectforSynchronization(Stream masterStream) throws LineUnavailableException { sendEvents = false; @@ -319,10 +322,6 @@ public abstract class PulseAudioDataLine Operation op; synchronized (eventLoop.threadLock) { op = stream.unCork(); - if (dataWritten && (!isStarted)) { - fireLineEvent(new LineEvent(PulseAudioDataLine.this, - LineEvent.Type.START, framesSinceOpen)); - } } op.waitForCompletion(); @@ -331,16 +330,18 @@ public abstract class PulseAudioDataLine } + public synchronized void stop() { if (!isOpen) { throw new IllegalStateException( "Line must be open()ed before it can be start()ed"); } + writeInterrupted = true; if (!isStarted) { return; } - isStarted = true; + Operation op; synchronized (eventLoop.threadLock) { op = stream.cork(); @@ -442,4 +443,14 @@ public abstract class PulseAudioDataLine return streamName; } + public int getBytesInBuffer() { + Operation o; + synchronized (eventLoop.threadLock) { + o = stream.updateTimingInfo(); + } + o.waitForCompletion(); + o.releaseReference(); + return stream.bytesInBuffer(); + } + } diff -r a3a8e9e19967 -r 4260a476a101 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 10:38:29 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 14:27:39 2008 -0400 @@ -401,6 +401,7 @@ public class PulseAudioMixer implements @Override public boolean isSynchronizationSupported(Line[] lines, boolean maintainSync) { + return false; } diff -r a3a8e9e19967 -r 4260a476a101 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Oct 08 10:38:29 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Oct 08 14:27:39 2008 -0400 @@ -44,6 +44,8 @@ import javax.sound.sampled.LineUnavailab import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; +import org.classpath.icedtea.pulseaudio.Operation.State; + public class PulseAudioSourceDataLine extends PulseAudioDataLine implements SourceDataLine, PulseAudioPlaybackLine { @@ -51,9 +53,6 @@ public class PulseAudioSourceDataLine ex private PulseAudioVolumeControl volumeControl; private boolean muted; private float volume; - - boolean flushed = false; - boolean drained = false; public PulseAudioSourceDataLine(EventLoop eventLoop, AudioFormat[] formats, AudioFormat defaultFormat) { @@ -134,6 +133,10 @@ public class PulseAudioSourceDataLine ex public int write(byte[] data, int offset, int length) { // can't call write() without open()ing first, but can call write() // without start()ing + synchronized (this) { + writeInterrupted = false; + } + if (!isOpen) { throw new IllegalStateException("must call open() before write()"); } @@ -157,62 +160,57 @@ public class PulseAudioSourceDataLine ex int sizeWritten = 0; - flushed = false; - boolean interrupted = false; while (remainingLength != 0) { - synchronized (this) { - - if (!isStarted || !isOpen) { - return sizeWritten; - } - - if (flushed) { - flushed = false; - return sizeWritten; - } - - synchronized (eventLoop.threadLock) { - - do { - availableSize = stream.getWritableSize(); - - if (availableSize < 0) { - return sizeWritten; + synchronized (eventLoop.threadLock) { + + do { + if (writeInterrupted) { + return sizeWritten; + } + + if (availableSize == -1) { + return sizeWritten; + } + availableSize = stream.getWritableSize(); + + if (availableSize == 0) { + try { + eventLoop.threadLock.wait(100); + } catch (InterruptedException e) { + // ignore for now + interrupted = true; } - if (availableSize == 0) { - try { - eventLoop.threadLock.wait(); - } catch (InterruptedException e) { - // ignore for now - interrupted = true; - } - - } - - } while (availableSize == 0); - - if (availableSize > remainingLength) { - availableSize = remainingLength; - } - - // only write entire frames, so round down avialableSize to - // a - // multiple of frameSize - availableSize = (availableSize / frameSize) * frameSize; - + } + + } while (availableSize == 0); + + if (availableSize > remainingLength) { + availableSize = remainingLength; + } + + // only write entire frames, so round down avialableSize to + // a + // multiple of frameSize + availableSize = (availableSize / frameSize) * frameSize; + + synchronized (this) { + if (writeInterrupted) { + return sizeWritten; + } /* write a little bit of the buffer */ stream.write(data, position, availableSize); - - sizeWritten += availableSize; - position += availableSize; - remainingLength -= availableSize; - - framesSinceOpen += availableSize / frameSize; - } + } + + sizeWritten += availableSize; + position += availableSize; + remainingLength -= availableSize; + + framesSinceOpen += availableSize / frameSize; + } } @@ -260,6 +258,29 @@ public class PulseAudioSourceDataLine ex } + synchronized (this) { + writeInterrupted = true; + } + + do { + synchronized (this) { + if (!isOpen) { + return; + } + if (getBytesInBuffer() == 0) { + return; + } + if (isStarted || !isOpen) { + break; + } + try { + this.wait(100); + } catch (InterruptedException e) { + return; + } + } + } while (!isStarted); + Operation operation; synchronized (eventLoop.threadLock) { @@ -269,10 +290,6 @@ public class PulseAudioSourceDataLine ex operation.waitForCompletion(); operation.releaseReference(); - synchronized (this) { - drained = true; - } - } @Override @@ -281,6 +298,9 @@ public class PulseAudioSourceDataLine ex throw new IllegalStateException( "Line must be open before it can be flush()ed"); } + synchronized (this) { + writeInterrupted = true; + } Operation operation; synchronized (eventLoop.threadLock) { @@ -290,10 +310,6 @@ public class PulseAudioSourceDataLine ex operation.waitForCompletion(); operation.releaseReference(); - synchronized (this) { - flushed = true; - } - } @Override @@ -301,6 +317,8 @@ public class PulseAudioSourceDataLine ex if (!isOpen) { throw new IllegalStateException("not open so cant close"); } + + writeInterrupted = true; PulseAudioMixer parent = PulseAudioMixer.getInstance(); parent.removeSourceLine(this); diff -r a3a8e9e19967 -r 4260a476a101 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Wed Oct 08 10:38:29 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Wed Oct 08 14:27:39 2008 -0400 @@ -37,6 +37,8 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; +import java.io.IOException; + import javax.sound.sampled.Port; public class PulseAudioSourcePort extends PulseAudioPort { diff -r a3a8e9e19967 -r 4260a476a101 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Wed Oct 08 10:38:29 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Wed Oct 08 14:27:39 2008 -0400 @@ -37,6 +37,8 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; +import java.io.IOException; + import javax.sound.sampled.Port; public class PulseAudioTargetPort extends PulseAudioPort { diff -r a3a8e9e19967 -r 4260a476a101 src/java/org/classpath/icedtea/pulseaudio/Stream.java --- a/src/java/org/classpath/icedtea/pulseaudio/Stream.java Wed Oct 08 10:38:29 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java Wed Oct 08 14:27:39 2008 -0400 @@ -37,6 +37,7 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; +import java.io.IOException; import java.util.LinkedList; import java.util.List; @@ -83,6 +84,10 @@ public class Stream { } public interface MovedListener { + public void update(); + } + + public interface UpdateTimingInfoListener { public void update(); } @@ -163,6 +168,10 @@ public class Stream { private native int native_pa_stream_readable_size(); private native byte[] native_pa_stream_drain(); + + private native byte[] native_pa_stream_updateTimingInfo(); + + public native int bytesInBuffer(); /* * pa_operation pa_stream_update_timing_info (pa_stream *p, @@ -370,6 +379,7 @@ public class Stream { suspendedListeners.remove(listener); } } + public Stream.State getState() { int state = native_pa_stream_get_state(); @@ -534,6 +544,12 @@ public class Stream { return drainOperation; } From omajid at redhat.com Wed Oct 8 12:27:47 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 08 Oct 2008 19:27:47 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-08 Omair Majid changeset 6ac2c3df7588 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=6ac2c3df7588 description: 2008-10-08 Omair Majid * unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (testHasADefaultFormat): Also check that the line can be opened with the default format. diffstat: 1 file changed, 12 insertions(+), 4 deletions(-) unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java | 16 +++++++--- diffs (45 lines): diff -r 0a46fbaa018e -r 6ac2c3df7588 unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java Wed Oct 08 12:30:00 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java Wed Oct 08 13:57:49 2008 -0400 @@ -36,8 +36,6 @@ exception statement from your version. */ package org.classpath.icedtea.pulseaudio; - -import static org.junit.Assert.assertNotNull; import java.io.File; import java.io.IOException; @@ -138,9 +136,9 @@ public class PulseAudioSourceDataLineTes selectedMixerInfo = info; } } - assertNotNull(selectedMixerInfo); + Assert.assertNotNull(selectedMixerInfo); mixer = AudioSystem.getMixer(selectedMixerInfo); - assertNotNull(mixer); + Assert.assertNotNull(mixer); if (mixer.isOpen()) { mixer.close(); } @@ -1029,10 +1027,20 @@ public class PulseAudioSourceDataLineTes @Test public void testHasADefaultFormat() throws LineUnavailableException { + System.out.println("This test checks that a SourceDataLine has " + + " a default format, and it can be opened with" + + " that format"); + sourceDataLine = (SourceDataLine) mixer.getLine(new Line.Info( SourceDataLine.class)); + + /* check that there is a default format */ Assert.assertNotNull(sourceDataLine.getFormat()); System.out.println(sourceDataLine.getFormat()); + + /* check that the line can be opened with the default format */ + sourceDataLine.open(); + sourceDataLine.close(); } From omajid at redhat.com Wed Oct 8 12:27:47 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 08 Oct 2008 19:27:47 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-08 Omair Majid changeset 66bcf656c0fb in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=66bcf656c0fb description: 2008-10-08 Omair Majid Merged changes diffstat: 4 files changed, 72 insertions(+), 20 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 26 ++++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 30 ++++++---- unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 20 +++++- unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java | 16 ++++- diffs (223 lines): diff -r 4260a476a101 -r 66bcf656c0fb src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Wed Oct 08 14:27:39 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Wed Oct 08 15:27:58 2008 -0400 @@ -95,11 +95,31 @@ public abstract class PulseAudioDataLine for (AudioFormat myFormat : supportedFormats) { if (format.matches(myFormat)) { + /* + * A few issues with format: + * + * To match: SAME encoding: safe because its a java enum. SAME + * number of channels: safe because myFormat has specific + * values. SAME bits per sample (aka sampleSize) and bytes per + * frame (aka frameSize): safe because myFormat has specific + * values. SAME sample rate: _not_ safe because myFormat uses + * AudioSystem.NOT_SPECIFIED. SAME frame rate: safe because we + * _ignore_ it completely ;) + * + * + */ + + float sampleRate = format.getSampleRate(); + if (sampleRate == (float) AudioSystem.NOT_SPECIFIED) { + /* pick a random sample rate */ + sampleRate = 44100.0f; + } + synchronized (eventLoop.threadLock) { stream = new Stream(eventLoop.getContextPointer(), streamName, Stream.Format.valueOf((String) myFormat .getProperty(PULSEAUDIO_FORMAT_KEY)), - (int) format.getSampleRate(), format.getChannels()); + (int) sampleRate, myFormat.getChannels()); } currentFormat = format; @@ -372,7 +392,9 @@ public abstract class PulseAudioDataLine * underrun/overflow. * * - * HOWEVER, the javadocs say the opposite thing! + * HOWEVER, the javadocs say the opposite thing! (need help from the jck = + * official spec) + * * */ diff -r 4260a476a101 -r 66bcf656c0fb src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 14:27:39 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 15:27:58 2008 -0400 @@ -103,6 +103,8 @@ public class PulseAudioMixer implements formats, StreamBufferAttributes.MIN_VALUE, StreamBufferAttributes.MAX_VALUE)); + refreshSourceAndTargetLines(); + } synchronized public static PulseAudioMixer getInstance() { @@ -119,12 +121,21 @@ public class PulseAudioMixer implements Map properties; /* - * frameSize = sample size (in bytes, not bits) x # of channels ^ From - * PulseAudio's sources + * frameSize = sample size (in bytes, not bits) x # of channels + * + * From PulseAudio's sources * http://git.0pointer.de/?p=pulseaudio.git;a=blob;f=src/pulse/sample.c;h=93da2465f4301e27af4976e82737c3a048124a68;hb=82ea8dde8abc51165a781c69bc3b38034d62d969#l63 */ - int[] channelSizes = new int[] { 1, 2, 5, 6, 8 }; + /* + * technically, PulseAudio supports up to 16 channels, but things get + * interesting with channel maps + * + * PA_CHANNEL_MAP_DEFAULT (=PA_CHANNEL_MAP_AIFF) supports 1,2,3,4,5 or 6 + * channels only + * + */ + int[] channelSizes = new int[] { 1, 2, 3, 4, 5, 6 }; for (int channelSize : channelSizes) { properties = new HashMap(); properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_U8"); @@ -252,15 +263,14 @@ public class PulseAudioMixer implements } @Override - public Line getLine(javax.sound.sampled.Line.Info info) - throws LineUnavailableException { + public Line getLine(Line.Info info) throws LineUnavailableException { + + if (!isLineSupported(info)) { + throw new IllegalArgumentException("Line unsupported: " + info); + } if (!isOpen) { throw new LineUnavailableException("The mixer isnt open"); - } - - if (!isLineSupported(info)) { - throw new IllegalArgumentException("Line unsupported: " + info); } AudioFormat[] formats = null; @@ -324,7 +334,7 @@ public class PulseAudioMixer implements if (isLineSupported(info)) { return AudioSystem.NOT_SPECIFIED; } - + return 0; } diff -r 4260a476a101 -r 66bcf656c0fb unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Wed Oct 08 14:27:39 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Wed Oct 08 15:27:58 2008 -0400 @@ -39,6 +39,7 @@ package org.classpath.icedtea.pulseaudio import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.DataLine; import javax.sound.sampled.Line; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; @@ -60,6 +61,8 @@ public class PulseAudioMixerTest { AudioFormat aSupportedFormat = new AudioFormat( AudioFormat.Encoding.PCM_UNSIGNED, 44100f, 8, 1, 1, 44100f, true); + AudioFormat aNotSupportedFormat = new AudioFormat( + AudioFormat.Encoding.ULAW, 44100, 32, 10, 10, 44100f, true); @Before public void setUp() throws Exception { @@ -289,7 +292,6 @@ public class PulseAudioMixerTest { try { Line sourceLine = selectedMixer.getLine(lineInfo); sourceLine.open(); - System.out.println("closing line"); sourceLine.close(); } catch (IllegalArgumentException e) { // ignore this @@ -308,15 +310,12 @@ public class PulseAudioMixerTest { TargetDataLine targetLine = (TargetDataLine) selectedMixer .getLine(lineInfo); Assert.assertNotNull(targetLine); - System.out.println("opening line"); targetLine.open(aSupportedFormat); - System.out.println("closing line"); targetLine.close(); } catch (ClassCastException cce) { Port targetLine = (Port) selectedMixer.getLine(lineInfo); Assert.assertNotNull(targetLine); targetLine.open(); - System.out.println("closing line"); targetLine.close(); } @@ -367,6 +366,19 @@ public class PulseAudioMixerTest { } @Test + public void testLineSupportedWorksWithoutOpeningMixer() { + + Assert.assertFalse(selectedMixer.isOpen()); + + Assert.assertFalse(selectedMixer.isLineSupported(new DataLine.Info( + SourceDataLine.class, aNotSupportedFormat))); + + Assert.assertTrue(selectedMixer.isLineSupported(new DataLine.Info( + SourceDataLine.class, aSupportedFormat))); + + } + + @Test public void testSynchronizationNotSupported() throws LineUnavailableException { selectedMixer.open(); diff -r 4260a476a101 -r 66bcf656c0fb unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java Wed Oct 08 14:27:39 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java Wed Oct 08 15:27:58 2008 -0400 @@ -36,8 +36,6 @@ exception statement from your version. */ package org.classpath.icedtea.pulseaudio; - -import static org.junit.Assert.assertNotNull; import java.io.File; import java.io.IOException; @@ -138,9 +136,9 @@ public class PulseAudioSourceDataLineTes selectedMixerInfo = info; } } - assertNotNull(selectedMixerInfo); + Assert.assertNotNull(selectedMixerInfo); mixer = AudioSystem.getMixer(selectedMixerInfo); - assertNotNull(mixer); + Assert.assertNotNull(mixer); if (mixer.isOpen()) { mixer.close(); } @@ -1029,10 +1027,20 @@ public class PulseAudioSourceDataLineTes @Test public void testHasADefaultFormat() throws LineUnavailableException { + System.out.println("This test checks that a SourceDataLine has " + + " a default format, and it can be opened with" + + " that format"); + sourceDataLine = (SourceDataLine) mixer.getLine(new Line.Info( SourceDataLine.class)); + + /* check that there is a default format */ Assert.assertNotNull(sourceDataLine.getFormat()); System.out.println(sourceDataLine.getFormat()); + + /* check that the line can be opened with the default format */ + sourceDataLine.open(); + sourceDataLine.close(); } From omajid at redhat.com Wed Oct 8 12:27:47 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 08 Oct 2008 19:27:47 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-08 Omair Majid changeset 0a46fbaa018e in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=0a46fbaa018e description: 2008-10-08 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java (PulseAudioMixer): Call refreshSourceAndTargetLines to initialize sourceLines and targetLines. (getLine): Check that a line is supported before worrying about whether the mixer is open. * unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java New variable aNotSupportedFormat that represents a known format that does not work with PulseAudio*DataLine. (testLineSupportedWorksWithoutOpeningMixer): New test. Checks that isLineSupported works without depending on the mixer to be open. diffstat: 2 files changed, 24 insertions(+), 7 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 15 +++++---- unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 16 ++++++++++ diffs (82 lines): diff -r a3a8e9e19967 -r 0a46fbaa018e src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 10:38:29 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 12:30:00 2008 -0400 @@ -103,6 +103,8 @@ public class PulseAudioMixer implements formats, StreamBufferAttributes.MIN_VALUE, StreamBufferAttributes.MAX_VALUE)); + refreshSourceAndTargetLines(); + } synchronized public static PulseAudioMixer getInstance() { @@ -252,15 +254,14 @@ public class PulseAudioMixer implements } @Override - public Line getLine(javax.sound.sampled.Line.Info info) - throws LineUnavailableException { + public Line getLine(Line.Info info) throws LineUnavailableException { + + if (!isLineSupported(info)) { + throw new IllegalArgumentException("Line unsupported: " + info); + } if (!isOpen) { throw new LineUnavailableException("The mixer isnt open"); - } - - if (!isLineSupported(info)) { - throw new IllegalArgumentException("Line unsupported: " + info); } AudioFormat[] formats = null; @@ -324,7 +325,7 @@ public class PulseAudioMixer implements if (isLineSupported(info)) { return AudioSystem.NOT_SPECIFIED; } - + return 0; } diff -r a3a8e9e19967 -r 0a46fbaa018e unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Wed Oct 08 10:38:29 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Wed Oct 08 12:30:00 2008 -0400 @@ -39,6 +39,7 @@ package org.classpath.icedtea.pulseaudio import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.DataLine; import javax.sound.sampled.Line; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineListener; @@ -60,6 +61,8 @@ public class PulseAudioMixerTest { AudioFormat aSupportedFormat = new AudioFormat( AudioFormat.Encoding.PCM_UNSIGNED, 44100f, 8, 1, 1, 44100f, true); + AudioFormat aNotSupportedFormat = new AudioFormat( + AudioFormat.Encoding.ULAW, 44100, 32, 10, 10, 44100f, true); @Before public void setUp() throws Exception { @@ -367,6 +370,19 @@ public class PulseAudioMixerTest { } @Test + public void testLineSupportedWorksWithoutOpeningMixer() { + + Assert.assertFalse(selectedMixer.isOpen()); + + Assert.assertFalse(selectedMixer.isLineSupported(new DataLine.Info( + SourceDataLine.class, aNotSupportedFormat))); + + Assert.assertTrue(selectedMixer.isLineSupported(new DataLine.Info( + SourceDataLine.class, aSupportedFormat))); + + } + + @Test public void testSynchronizationNotSupported() throws LineUnavailableException { selectedMixer.open(); From omajid at redhat.com Wed Oct 8 12:27:47 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 08 Oct 2008 19:27:47 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-08 Omair Majid changeset 4e6c0e204d29 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=4e6c0e204d29 description: 2008-10-08 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java (createStream): Pick a random sample rate if none given. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java (getSupportedFormats): New channel numbers. These numbers actually have a source. * unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java (testSourceLinesOpenAndClose): Removed debug output. (testTargetLinesOpenAndClose): Likewise. diffstat: 3 files changed, 37 insertions(+), 10 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 26 +++++++++- src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 17 +++++- unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 4 - diffs (111 lines): diff -r 6ac2c3df7588 -r 4e6c0e204d29 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Wed Oct 08 13:57:49 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Wed Oct 08 15:26:51 2008 -0400 @@ -94,11 +94,31 @@ public abstract class PulseAudioDataLine for (AudioFormat myFormat : supportedFormats) { if (format.matches(myFormat)) { + /* + * A few issues with format: + * + * To match: SAME encoding: safe because its a java enum. SAME + * number of channels: safe because myFormat has specific + * values. SAME bits per sample (aka sampleSize) and bytes per + * frame (aka frameSize): safe because myFormat has specific + * values. SAME sample rate: _not_ safe because myFormat uses + * AudioSystem.NOT_SPECIFIED. SAME frame rate: safe because we + * _ignore_ it completely ;) + * + * + */ + + float sampleRate = format.getSampleRate(); + if (sampleRate == (float) AudioSystem.NOT_SPECIFIED) { + /* pick a random sample rate */ + sampleRate = 44100.0f; + } + synchronized (eventLoop.threadLock) { stream = new Stream(eventLoop.getContextPointer(), streamName, Stream.Format.valueOf((String) myFormat .getProperty(PULSEAUDIO_FORMAT_KEY)), - (int) format.getSampleRate(), format.getChannels()); + (int) sampleRate, myFormat.getChannels()); } currentFormat = format; @@ -371,7 +391,9 @@ public abstract class PulseAudioDataLine * underrun/overflow. * * - * HOWEVER, the javadocs say the opposite thing! + * HOWEVER, the javadocs say the opposite thing! (need help from the jck = + * official spec) + * * */ diff -r 6ac2c3df7588 -r 4e6c0e204d29 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 13:57:49 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 15:26:51 2008 -0400 @@ -104,7 +104,7 @@ public class PulseAudioMixer implements StreamBufferAttributes.MAX_VALUE)); refreshSourceAndTargetLines(); - + } synchronized public static PulseAudioMixer getInstance() { @@ -121,12 +121,21 @@ public class PulseAudioMixer implements Map properties; /* - * frameSize = sample size (in bytes, not bits) x # of channels ^ From - * PulseAudio's sources + * frameSize = sample size (in bytes, not bits) x # of channels + * + * From PulseAudio's sources * http://git.0pointer.de/?p=pulseaudio.git;a=blob;f=src/pulse/sample.c;h=93da2465f4301e27af4976e82737c3a048124a68;hb=82ea8dde8abc51165a781c69bc3b38034d62d969#l63 */ - int[] channelSizes = new int[] { 1, 2, 5, 6, 8 }; + /* + * technically, PulseAudio supports up to 16 channels, but things get + * interesting with channel maps + * + * PA_CHANNEL_MAP_DEFAULT (=PA_CHANNEL_MAP_AIFF) supports 1,2,3,4,5 or 6 + * channels only + * + */ + int[] channelSizes = new int[] { 1, 2, 3, 4, 5, 6 }; for (int channelSize : channelSizes) { properties = new HashMap(); properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_U8"); diff -r 6ac2c3df7588 -r 4e6c0e204d29 unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Wed Oct 08 13:57:49 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java Wed Oct 08 15:26:51 2008 -0400 @@ -292,7 +292,6 @@ public class PulseAudioMixerTest { try { Line sourceLine = selectedMixer.getLine(lineInfo); sourceLine.open(); - System.out.println("closing line"); sourceLine.close(); } catch (IllegalArgumentException e) { // ignore this @@ -311,15 +310,12 @@ public class PulseAudioMixerTest { TargetDataLine targetLine = (TargetDataLine) selectedMixer .getLine(lineInfo); Assert.assertNotNull(targetLine); - System.out.println("opening line"); targetLine.open(aSupportedFormat); - System.out.println("closing line"); targetLine.close(); } catch (ClassCastException cce) { Port targetLine = (Port) selectedMixer.getLine(lineInfo); Assert.assertNotNull(targetLine); targetLine.open(); - System.out.println("closing line"); targetLine.close(); } From bugzilla-daemon at icedtea.classpath.org Wed Oct 8 12:53:21 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 08 Oct 2008 19:53:21 +0000 Subject: [Bug 207] New: Installation failure Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=207 Summary: Installation failure Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: p.bradley at dsl.pipex.com # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00002b3036d5e001, pid=13961, tid=1089530192 # # Java VM: IcedTea 64-Bit Server VM (1.7.0-b24 mixed mode linux-amd64) # Problematic frame: # C [ld-linux-x86-64.so.2+0x12001] # # An error report file with more information is saved as: # /home/peter/downloads/eXist/hs_err_pid13961.log # # If you would like to submit a bug report, please visit: # http://icedtea.classpath.org/bugzilla # If anyone's interested, I can supply the error log. It finishes: VM Arguments: java_command: eXist-setup-1.2.4-rev8072.jar Launcher Type: SUN_STANDARD Environment Variables: JAVA_HOME=/usr/lib64/jvm/java JRE_HOME=/usr/lib64/jvm/java/jre PATH=/opt/kde3/bin:/home/peter/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin LD_LIBRARY_PATH=/usr/lib64/jvm/java-1.7.0-icedtea-1.5_b24/jre/lib/amd64/server:/usr/lib64/jvm/java-1.7.0-icedtea-1.5_b24/jre/lib/amd64:/usr/lib64/jvm/java-1.7.0-icedtea-1.5_b24/jre/../lib/amd64 SHELL=/bin/bash DISPLAY=:0.0 HOSTTYPE=x86_64 OSTYPE=linux MACHTYPE=x86_64-suse-linux Signal Handlers: SIGSEGV: [libjvm.so+0x5ac1b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGBUS: [libjvm.so+0x5ac1b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGFPE: [libjvm.so+0x4964b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGPIPE: [libjvm.so+0x4964b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGXFSZ: [libjvm.so+0x4964b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGILL: [libjvm.so+0x4964b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGUSR2: [libjvm.so+0x495c80], sa_mask[0]=0x00000000, sa_flags=0x10000004 SIGHUP: [libjvm.so+0x497d80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGINT: [libjvm.so+0x497d80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGTERM: [libjvm.so+0x497d80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGQUIT: [libjvm.so+0x497d80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 --------------- S Y S T E M --------------- OS:openSUSE 10.3 (X86-64) VERSION = 10.3 uname:Linux 2.6.22.18-0.2-default #1 SMP 2008-06-09 13:53:20 +0200 x86_64 libc:glibc 2.6.1 NPTL 2.6.1 rlimit: STACK 8192k, CORE 0k, NPROC 16375, NOFILE 8192, AS 2491440k load average:1.16 1.15 1.08 CPU:total 2 (2 cores per cpu, 1 threads per core) family 15 model 43 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, mmxext, 3dnow, 3dnowext Memory: 4k page, physical 2062024k(69428k free), swap 1052216k(1049800k free) vm_info: IcedTea 64-Bit Server VM (1.7.0-b24) for linux-amd64 JRE (1.7.0-b24), built on Feb 15 2008 14:30:17 by "abuild" with gcc 4.3.0 20080131 (experimental) [trunk revision 131976] time: Wed Oct 8 20:43:48 2008 elapsed time: 7 seconds -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Wed Oct 8 13:05:56 2008 From: omajid at redhat.com (Omair Majid) Date: Wed, 08 Oct 2008 20:05:56 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-08 Omair Majid changeset 5108fc37a890 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=5108fc37a890 description: 2008-10-08 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Removed unused import to get rid of compiler warning. * src/java/org/classpath/icedtea/pulseaudio/Operation.java Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java (ClipThread.run): Do a sanity check before abusing the value of LOOP_CONTINUOUSLY. (loop): Check the value of the argument. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Removed unused import to get rid of compiler warning. (write): Removed a FIXME, as it is now implemented. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Removed unused import to get rid of compiler warning. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Likewise. * src/java/org/classpath/icedtea/pulseaudio/Stream.java Likewise. diffstat: 7 files changed, 17 insertions(+), 17 deletions(-) src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 1 src/java/org/classpath/icedtea/pulseaudio/Operation.java | 1 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 17 ++++++++-- src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 10 +---- src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java | 2 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java | 2 - src/java/org/classpath/icedtea/pulseaudio/Stream.java | 1 diffs (132 lines): diff -r 66bcf656c0fb -r 5108fc37a890 src/java/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Oct 08 15:27:58 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Wed Oct 08 16:06:00 2008 -0400 @@ -37,7 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Semaphore; diff -r 66bcf656c0fb -r 5108fc37a890 src/java/org/classpath/icedtea/pulseaudio/Operation.java --- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java Wed Oct 08 15:27:58 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java Wed Oct 08 16:06:00 2008 -0400 @@ -37,7 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; /* * Encapsulates a pa_operation object diff -r 66bcf656c0fb -r 5108fc37a890 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Oct 08 15:27:58 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Wed Oct 08 16:06:00 2008 -0400 @@ -77,6 +77,17 @@ public class PulseAudioClip extends Puls private class ClipThread extends Thread { @Override public void run() { + + /* + * The while loop below only works with LOOP_CONTINUOUSLY because we + * abuse the fact that loopsLeft's initial value is -1 + * (=LOOP_CONTINUOUSLY) and it keeps on going lower without hitting + * 0. So do a sanity check + */ + if (Clip.LOOP_CONTINUOUSLY != -1) { + throw new UnsupportedOperationException( + "LOOP_CONTINUOUSLY has changed; things are going to break"); + } while (true) { writeFrames(currentFrame, endFrame + 1); @@ -345,8 +356,10 @@ public class PulseAudioClip extends Puls throw new IllegalStateException("Line not open"); } - System.out.println("Loop " + count + " called"); - + if ( count < 0 && count != LOOP_CONTINUOUSLY) { + throw new IllegalArgumentException("invalid value for count:" + count); + } + if (clipThread.isAlive() && count != 0) { // Do nothing; behavior not specified by the Java API return; diff -r 66bcf656c0fb -r 5108fc37a890 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Oct 08 15:27:58 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Wed Oct 08 16:06:00 2008 -0400 @@ -44,8 +44,6 @@ import javax.sound.sampled.LineUnavailab import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; -import org.classpath.icedtea.pulseaudio.Operation.State; - public class PulseAudioSourceDataLine extends PulseAudioDataLine implements SourceDataLine, PulseAudioPlaybackLine { @@ -136,7 +134,7 @@ public class PulseAudioSourceDataLine ex synchronized (this) { writeInterrupted = false; } - + if (!isOpen) { throw new IllegalStateException("must call open() before write()"); } @@ -216,10 +214,6 @@ public class PulseAudioSourceDataLine ex // all the data should have been played by now assert (sizeWritten == length); - /* - * FIXME when the stream is flushed() etc, instead of returning length - * this should unblock and return the the size of data written so far - */ if (interrupted) { Thread.currentThread().interrupt(); @@ -317,7 +311,7 @@ public class PulseAudioSourceDataLine ex if (!isOpen) { throw new IllegalStateException("not open so cant close"); } - + writeInterrupted = true; PulseAudioMixer parent = PulseAudioMixer.getInstance(); diff -r 66bcf656c0fb -r 5108fc37a890 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Wed Oct 08 15:27:58 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Wed Oct 08 16:06:00 2008 -0400 @@ -37,8 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; - import javax.sound.sampled.Port; public class PulseAudioSourcePort extends PulseAudioPort { diff -r 66bcf656c0fb -r 5108fc37a890 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Wed Oct 08 15:27:58 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Wed Oct 08 16:06:00 2008 -0400 @@ -37,8 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; - import javax.sound.sampled.Port; public class PulseAudioTargetPort extends PulseAudioPort { diff -r 66bcf656c0fb -r 5108fc37a890 src/java/org/classpath/icedtea/pulseaudio/Stream.java --- a/src/java/org/classpath/icedtea/pulseaudio/Stream.java Wed Oct 08 15:27:58 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java Wed Oct 08 16:06:00 2008 -0400 @@ -37,7 +37,6 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; -import java.io.IOException; import java.util.LinkedList; import java.util.List; From dbhole at redhat.com Wed Oct 8 14:00:28 2008 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 08 Oct 2008 21:00:28 +0000 Subject: changeset in /hg/icedtea6: - Implemented JS->Java security. Message-ID: changeset 86fbcf148d1f in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=86fbcf148d1f description: - Implemented JS->Java security. - Removed ambiguity from class finding mechanism for cases where JS needs a signature involving an applet specific class. - Rewrote code that parsed messages from C++ side -- now it can handle any number of optional components. diffstat: 7 files changed, 730 insertions(+), 323 deletions(-) ChangeLog | 13 IcedTeaPlugin.cc | 508 +++++++---- plugin/icedtea/sun/applet/AppletSecurityContextManager.java | 10 plugin/icedtea/sun/applet/PluginAppletSecurityContext.java | 412 ++++++-- plugin/icedtea/sun/applet/PluginAppletViewer.java | 33 plugin/icedtea/sun/applet/PluginObjectStore.java | 11 plugin/icedtea/sun/applet/PluginStreamHandler.java | 66 - diffs (truncated from 1911 to 500 lines): diff -r ab8aa9425fc4 -r 86fbcf148d1f ChangeLog --- a/ChangeLog Tue Oct 07 11:16:16 2008 -0400 +++ b/ChangeLog Wed Oct 08 17:00:19 2008 -0400 @@ -1,3 +1,16 @@ 2008-10-07 Gary Benson + * IcedTeaPlugin.cc: Implemented JS->Java security. + * plugin/icedtea/sun/applet/AppletSecurityContextManager.java: Same. + * plugin/icedtea/sun/applet/PluginAppletSecurityContext.java: Same. Also, + remove ambiguity from class finding mechanism for cases where JS needs a + signature involving an applet specific class. + * plugin/icedtea/sun/applet/PluginAppletViewer.java: Implemented JS->Java + security. + * plugin/icedtea/sun/applet/PluginObjectStore.java: Same. + * plugin/icedtea/sun/applet/PluginStreamHandler.java: Rewrote code that + parsed messages from C++ side -- now it can handle any number of optional + components. + 2008-10-07 Gary Benson Andrew Haley diff -r ab8aa9425fc4 -r 86fbcf148d1f IcedTeaPlugin.cc --- a/IcedTeaPlugin.cc Tue Oct 07 11:16:16 2008 -0400 +++ b/IcedTeaPlugin.cc Wed Oct 08 17:00:19 2008 -0400 @@ -309,29 +309,36 @@ char const* TYPES[10] = { "Object", #include // FIXME: create index from security context. -#define MESSAGE_CREATE(reference) \ - const char* addr; \ - char context[16]; \ - GetCurrentPageAddress(&addr); \ - GetCurrentContextAddr(context); \ +#define MESSAGE_CREATE() \ nsCString message ("context "); \ message.AppendInt (0); \ + +#define MESSAGE_ADD_STACK_REFERENCE(reference) \ message += " reference "; \ message.AppendInt (reference); \ - if (factory->codebase_map.find(nsCString(addr)) != factory->codebase_map.end()) \ - { \ - message += " src "; \ - message += factory->codebase_map[nsCString(addr)];\ - } \ - message += " "; \ - message += __func__; \ if (factory->result_map[reference] == NULL) { \ factory->result_map[reference] = new ResultContainer(); \ printf("ResultMap created -- %p %d\n", factory->result_map[reference], factory->result_map[reference]->returnIdentifier); \ } \ else \ - factory->result_map[reference]->Clear(); - + factory->result_map[reference]->Clear(); + +#define MESSAGE_ADD_SRC(src) \ + message += " src "; \ + message += src; + +#define MESSAGE_ADD_PRIVILEGES() \ + nsCString privileges(""); \ + GetEnabledPrivileges(&privileges); \ + if (privileges.Length() > 0) \ + { \ + message += " privileges "; \ + message += privileges; \ + } + +#define MESSAGE_ADD_FUNC() \ + message += " "; \ + message += __func__; #define MESSAGE_ADD_STRING(name) \ message += " "; \ @@ -396,7 +403,7 @@ char const* TYPES[10] = { "Object", #define PROCESS_PENDING_EVENTS_REF(reference) \ if (factory->shutting_down == PR_TRUE && \ - factory->result_map[reference]->errorOccured == PR_TRUE) \ + factory->result_map[reference]->errorOccurred == PR_TRUE) \ { \ printf("Error occured. Exiting function\n"); \ return NS_ERROR_FAILURE; \ @@ -424,13 +431,13 @@ char const* TYPES[10] = { "Object", nsresult res = NS_OK; \ printf ("RECEIVE 1\n"); \ while (factory->result_map[reference]->returnIdentifier == -1 &&\ - factory->result_map[reference]->errorOccured == PR_FALSE) \ + factory->result_map[reference]->errorOccurred == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ printf ("RECEIVE 3\n"); \ if (factory->result_map[reference]->returnIdentifier == 0 || \ - factory->result_map[reference]->errorOccured == PR_TRUE) \ + factory->result_map[reference]->errorOccurred == PR_TRUE) \ { \ *name = NULL; \ } else { \ @@ -447,12 +454,12 @@ char const* TYPES[10] = { "Object", nsresult res = NS_OK; \ printf("RECEIVE ID 1\n"); \ while (factory->result_map[reference]->returnIdentifier == -1 &&\ - factory->result_map[reference]->errorOccured == PR_FALSE) \ + factory->result_map[reference]->errorOccurred == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ \ - if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + if (factory->result_map[reference]->errorOccurred == PR_TRUE) \ { \ *id = NULL; \ } else \ @@ -468,7 +475,7 @@ char const* TYPES[10] = { "Object", nsresult res = NS_OK; \ printf("RECEIVE VALUE 1\n"); \ while (factory->result_map[reference]->returnValue == "" && \ - factory->result_map[reference]->errorOccured == PR_FALSE) \ + factory->result_map[reference]->errorOccurred == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ @@ -485,12 +492,12 @@ char const* TYPES[10] = { "Object", nsresult res = NS_OK; \ printf("RECEIVE SIZE 1\n"); \ while (factory->result_map[reference]->returnValue == "" && \ - factory->result_map[reference]->errorOccured == PR_FALSE) \ + factory->result_map[reference]->errorOccurred == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ nsresult conversionResult; \ - if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + if (factory->result_map[reference]->errorOccurred == PR_TRUE) \ *result = NULL; \ else \ { \ @@ -507,11 +514,11 @@ char const* TYPES[10] = { "Object", nsresult res = NS_OK; \ printf("RECEIVE STRING 1\n"); \ while (factory->result_map[reference]->returnValue == "" && \ - factory->result_map[reference]->errorOccured == PR_FALSE) \ + factory->result_map[reference]->errorOccurred == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ - if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + if (factory->result_map[reference]->errorOccurred == PR_TRUE) \ *result = NULL; \ else \ {\ @@ -529,11 +536,11 @@ char const* TYPES[10] = { "Object", nsresult res = NS_OK; \ printf("RECEIVE STRING UCS 1\n"); \ while (factory->result_map[reference]->returnValueUCS.IsEmpty() && \ - factory->result_map[reference]->errorOccured == PR_FALSE) \ + factory->result_map[reference]->errorOccurred == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ - if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + if (factory->result_map[reference]->errorOccurred == PR_TRUE) \ *result = NULL; \ else \ { \ @@ -554,11 +561,11 @@ char const* TYPES[10] = { "Object", nsresult res = NS_OK; \ printf("RECEIVE BOOLEAN 1\n"); \ while (factory->result_map[reference]->returnIdentifier == -1 && \ - factory->result_map[reference]->errorOccured == PR_FALSE) \ + factory->result_map[reference]->errorOccurred == PR_FALSE) \ { \ PROCESS_PENDING_EVENTS_REF (reference); \ } \ - if (factory->result_map[reference]->errorOccured == PR_TRUE) \ + if (factory->result_map[reference]->errorOccurred == PR_TRUE) \ *result = NULL; \ else \ *result = factory->result_map[reference]->returnIdentifier; @@ -717,8 +724,8 @@ class ResultContainer PRUint32 returnIdentifier; nsCString returnValue; nsString returnValueUCS; - PRBool errorOccured; - + nsCString errorMessage; + PRBool errorOccurred; }; ResultContainer::ResultContainer () @@ -728,7 +735,8 @@ ResultContainer::ResultContainer () returnIdentifier = -1; returnValue.Truncate(); returnValueUCS.Truncate(); - errorOccured = PR_FALSE; + errorMessage.Truncate(); + errorOccurred = PR_FALSE; } ResultContainer::~ResultContainer () @@ -738,6 +746,7 @@ ResultContainer::~ResultContainer () returnIdentifier = -1; returnValue.Truncate(); returnValueUCS.Truncate(); + errorMessage.Truncate(); } void @@ -748,7 +757,8 @@ ResultContainer::Clear() returnIdentifier = -1; returnValue.Truncate(); returnValueUCS.Truncate(); - errorOccured = PR_FALSE; + errorMessage.Truncate(); + errorOccurred = PR_FALSE; } #include @@ -1182,6 +1192,7 @@ private: void DecrementContextCounter(); nsresult GetCurrentContextAddr(char *addr); nsresult GetCurrentPageAddress(const char **addr); + nsresult GetEnabledPrivileges(nsCString *privileges); int contextCounter; }; @@ -2780,7 +2791,16 @@ IcedTeaPluginFactory::HandleMessage (nsC else if (command == "Error") { printf("Error occured. Setting error flag for container @ %d to true\n", reference); - result_map[reference]->errorOccured = PR_TRUE; + result_map[reference]->errorOccurred = PR_TRUE; + result_map[reference]->errorMessage = (nsCString) rest; + + rest += "ERROR: "; + IcedTeaPluginInstance* instance = NULL; + instances.Get (identifier, &instance); + if (instance != 0) + { + instance->peer->ShowStatus (nsCString (rest).get ()); + } } } else if (prefix == "context") @@ -3916,91 +3936,72 @@ IcedTeaJNIEnv::DecrementContextCounter ( PR_ExitMonitor(contextCounterPRMonitor); } -#include - nsresult -IcedTeaJNIEnv::GetCurrentContextAddr(char *addr) -{ - return NS_OK; - PLUGIN_TRACE_JNIENV (); - - // Get JSContext from stack. - nsCOMPtr mJSContextStack(do_GetService("@mozilla.org/js/xpc/ContextStack;1")); - if (mJSContextStack) { - JSContext *cx; - if (NS_FAILED(mJSContextStack->Peek(&cx))) - return NS_ERROR_FAILURE; - - printf("Context1: %p\n", cx); - - // address cannot be more than 8 bytes (8 bytes = 64 bits) - sprintf(addr, "%p", cx); - - printf("Context2: %s\n", addr); - } - - return NS_OK; -} - -nsresult -IcedTeaJNIEnv::GetCurrentPageAddress(const char **addr) -{ - return NS_OK; - PLUGIN_TRACE_JNIENV (); - - nsIPrincipal *prin; - nsCOMPtr sec_man(do_GetService("@mozilla.org/scriptsecuritymanager;1")); - - if (sec_man) { - - PRBool isEnabled = PR_FALSE; - sec_man->IsCapabilityEnabled("UniversalBrowserRead", &isEnabled); - - if (isEnabled == PR_FALSE) { - printf("UniversalBrowserRead is NOT enabled\n"); - } else { - printf("UniversalBrowserRead IS enabled\n"); - } - - sec_man->IsCapabilityEnabled("UniversalBrowserWrite", &isEnabled); - - if (isEnabled == PR_FALSE) { - printf("UniversalBrowserWrite is NOT enabled\n"); - } else { - printf("UniversalBrowserWrite IS enabled\n"); - } - } - - if (sec_man) - { - sec_man->GetSubjectPrincipal(&prin); - } else { +IcedTeaJNIEnv::GetEnabledPrivileges(nsCString *privileges) +{ + nsresult rv; + nsCOMPtr sec_man = + do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv); + + if (NS_FAILED(rv) || !sec_man) { return NS_ERROR_FAILURE; } - if (prin) - { - nsIURI *uri; - prin->GetURI(&uri); - - if (uri) - { - nsCAutoString str; - uri->GetSpec(str); - NS_CStringGetData(str, addr); - } else { - return NS_ERROR_FAILURE; - } - } else { - return NS_ERROR_FAILURE; - } - - - nsCOMPtr js_id(do_GetService("@mozilla.org/js/xpc/ID;1")); - printf("JS ID is: %s\n", js_id->GetID()->ToString()); - - return NS_OK; - + PRBool isEnabled = PR_FALSE; + + // check privileges one by one + + privileges->Truncate(); + char available_privileges[1024]; + + // see: http://docs.sun.com/source/816-6170-10/index.htm + + // Should these other privileges be supported? According to + // http://java.sun.com/j2se/1.3/docs/guide/plugin/security.html it is + // either UniversalBrowserRead/UniversalJavaPermissions or the highway... + +/* + // broken down to make it clean... + sprintf(available_privileges, "%s %s %s %s %s %s %s %s %s %s %s %s", + "LimitedInstall FullInstall SilentInstall", + "UniversalAccept UniversalAwtEventQueueAccess UniversalConnect", + "UniversalConnectWithRedirect UniversalDialogModality", + "UniversalExecAccess UniversalExitAccess UniversalFdRead", + "UniversalFileDelete UniversalFileRead UniversalFileWrite", + "UniversalLinkAccess UniversalListen UniversalMulticast", + "UniversalJavaPermissions UniversalPackageAccess", + "UniversalPackageDefinition UniversalPrintJobAccess", + "UniversalPropertyRead UniversalPropertyWrite", + "UniversalSendMail UniversalSetFactory UniversalSystemClipboardAccess", + "UniversalThreadAccess UniversalThreadGroupAccess", + "UniversalTopLevelWindow"); +*/ + + sprintf(available_privileges, "%s", + "UniversalBrowserRead UniversalJavaPermissions"); + + + char *token = strtok(available_privileges, " "); + while (token != NULL) + { + isEnabled = PR_FALSE; + sec_man->IsCapabilityEnabled(token, &isEnabled); + + if (isEnabled == PR_TRUE) + { + printf("GetEnabledPrivileges : %s is enabled\n", token); + *privileges += token; + *privileges += ","; + } else { + printf("GetEnabledPrivileges : %s is _NOT_ enabled\n", token); + } + + token = strtok (NULL, " "); + } + + privileges->Trim(","); + + return NS_OK; } NS_IMETHODIMP @@ -4011,14 +4012,41 @@ IcedTeaJNIEnv::NewObject (jclass clazz, nsISecurityContext* ctx) { PLUGIN_TRACE_JNIENV (); + + char origin[1024]; + sprintf(origin, ""); + + if (ctx) + ctx->GetOrigin(origin, 1024); + int reference = IncrementContextCounter (); - MESSAGE_CREATE (reference); + MESSAGE_CREATE (); + MESSAGE_ADD_STACK_REFERENCE(reference); + MESSAGE_ADD_SRC(origin); + MESSAGE_ADD_FUNC(); MESSAGE_ADD_REFERENCE (clazz); MESSAGE_ADD_ID (methodID); MESSAGE_ADD_ARGS (methodID, args); MESSAGE_SEND (); - printf("MSG SEND COMPLETE. NOW RECEIVING...\n"); MESSAGE_RECEIVE_REFERENCE (reference, jobject, result); + + if (factory->result_map[reference]->errorOccurred == PR_TRUE && + factory->result_map[reference]->errorMessage.Find("LiveConnectPermissionNeeded") == 0) + { + // Permission error. Try again. This time, send permissions over the wire + MESSAGE_CREATE (); + MESSAGE_ADD_STACK_REFERENCE(reference); + MESSAGE_ADD_SRC(origin); + MESSAGE_ADD_PRIVILEGES(); + MESSAGE_ADD_FUNC(); + MESSAGE_ADD_REFERENCE (clazz); + MESSAGE_ADD_ID (methodID); + MESSAGE_ADD_ARGS (methodID, args); + MESSAGE_SEND (); + MESSAGE_RECEIVE_REFERENCE (reference, jobject, result); + } + + DecrementContextCounter (); return NS_OK; @@ -4033,15 +4061,43 @@ IcedTeaJNIEnv::CallMethod (jni_type type nsISecurityContext* ctx) { PLUGIN_TRACE_JNIENV (); + + char origin[1024]; + sprintf(origin, ""); + + if (ctx) + ctx->GetOrigin(origin, 1024); + int reference = IncrementContextCounter (); - MESSAGE_CREATE (reference); + MESSAGE_CREATE (); + MESSAGE_ADD_STACK_REFERENCE(reference); + MESSAGE_ADD_SRC(origin); + MESSAGE_ADD_FUNC(); MESSAGE_ADD_REFERENCE (obj); MESSAGE_ADD_ID (methodID); MESSAGE_ADD_ARGS (methodID, args); - std::cout << "CALLMETHOD -- OBJ: " << obj << " METHOD: " << methodID << " ARGS: " << args << std::endl; MESSAGE_SEND (); - printf("MSG SEND COMPLETE. NOW RECEIVING...\n"); MESSAGE_RECEIVE_VALUE (reference, type, result); + + if (factory->result_map[reference]->errorOccurred == PR_TRUE && + factory->result_map[reference]->errorMessage.Find("LiveConnectPermissionNeeded") == 0) + { + MESSAGE_CREATE (); + MESSAGE_ADD_STACK_REFERENCE(reference); + MESSAGE_ADD_SRC(origin); + MESSAGE_ADD_PRIVILEGES(); + MESSAGE_ADD_FUNC(); + MESSAGE_ADD_REFERENCE (obj); + MESSAGE_ADD_ID (methodID); + MESSAGE_ADD_ARGS (methodID, args); + MESSAGE_SEND (); + MESSAGE_RECEIVE_VALUE (reference, type, result); + + // if everything was OK, clear exception from previous access exception + if (factory->result_map[reference]->errorOccurred == PR_FALSE) + ExceptionClear(); + } + DecrementContextCounter (); return NS_OK; @@ -4307,13 +4363,37 @@ IcedTeaJNIEnv::GetField (jni_type type, nsISecurityContext* ctx) { PLUGIN_TRACE_JNIENV (); + + char origin[1024]; + sprintf(origin, ""); + + if (ctx) + ctx->GetOrigin(origin, 1024); From bugzilla-daemon at icedtea.classpath.org Wed Oct 8 23:50:44 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 09 Oct 2008 06:50:44 +0000 Subject: [Bug 208] New: icedteaplugin error on https://www.netbank.nordea.dk/netbank/ Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=208 Summary: icedteaplugin error on https://www.netbank.nordea.dk/netbank/ Product: IcedTea Version: unspecified Platform: PC URL: https://bugs.launchpad.net/bugs/234169 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com https://www.netbank.nordea.dk/netbank/index.jsp loads, nothing appears on the login pane. the applet on the second pane does work. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Oct 9 00:06:47 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 09 Oct 2008 07:06:47 +0000 Subject: [Bug 209] New: display problems with applet Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=209 Summary: display problems with applet Product: IcedTea Version: unspecified Platform: PC URL: https://bugs.launchpad.net/bugs/274356 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com http://www.goproblems.com/prob.php3?nutrial=1&plevel=15&PHPSESSID=fe9eea85de8d89bd7cadde323ab7ecfe doesn't draw the drop down box on the left over the pie chart below. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From mark at klomp.org Thu Oct 9 01:43:25 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 09 Oct 2008 10:43:25 +0200 Subject: Public open specs In-Reply-To: <1222940811.3265.12.camel@dijkstra.wildebeest.org> References: <20080917084136.GA10250@bamboo.destinee.acro.gen.nz> <48D0C79F.1080909@redhat.com> <20080917235155.GA10355@rivendell.middle-earth.co.uk> <20080918010821.GD10250@bamboo.destinee.acro.gen.nz> <17c6771e0809180328s3aeacca4m8a3969ba2abf4c84@mail.gmail.com> <1221735243.3256.14.camel@dijkstra.wildebeest.org> <48D25FA3.1010101@sun.com> <1221748023.3256.55.camel@dijkstra.wildebeest.org> <48D3779C.4090503@sun.com> <1221819427.3288.2.camel@dijkstra.wildebeest.org> <48D38203.8040609@sun.com> <1221821605.3288.10.camel@dijkstra.wildebeest.org> <48D38A0B.8070305@sun.com> <1222347445.3266.72.camel@dijkstra.wildebeest.org> <48DB92FC.3060100@sun.com> <1222940811.3265.12.camel@dijkstra.wildebeest.org> Message-ID: <1223541805.3958.3.camel@dijkstra.wildebeest.org> Hi Dalibor, On Thu, 2008-10-02 at 11:46 +0200, Mark Wielaard wrote: > On Thu, 2008-09-25 at 15:32 +0200, Dalibor Topic wrote: > > Mark Wielaard wrote: > > > Any progress on getting this specification open and public? > > > > > Unfortunately, there is no visible progress yet. > > Any invisible progress then now? Got anything yet? Can Sun can publish the core Class File Specifications under terms that are acceptable to the community, so that getting access to the document doesn't take away any rights of publishing an independent or openjdk based implementation under the GPL without the restrictions on scope that the current terms 2 (a - c) inflict upon us hackers? Thanks, Mark From bugzilla-daemon at icedtea.classpath.org Thu Oct 9 03:47:58 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 09 Oct 2008 10:47:58 +0000 Subject: [Bug 192] com.sun.image.codec.jpeg doesn't work with ImageJ Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=192 ------- Comment #14 from gnu_andrew at member.fsf.org 2008-10-09 10:47 ------- Has a bug been filed with ImageJ? They should be using javax.imageio. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Oct 9 04:07:22 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 09 Oct 2008 11:07:22 +0000 Subject: [Bug 192] com.sun.image.codec.jpeg doesn't work with ImageJ Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=192 ------- Comment #15 from mark at klomp.org 2008-10-09 11:07 ------- (In reply to comment #14) > Has a bug been filed with ImageJ? They should be using javax.imageio. That should be possible now: https://list.nih.gov/cgi-bin/wa?A2=ind0809&L=imagej&H=1&P=21500 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From doko at ubuntu.com Thu Oct 9 04:35:50 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Thu, 09 Oct 2008 11:35:50 +0000 Subject: changeset in /hg/icedtea6: 2008-10-09 Matthias Klose changeset 6790b974078e in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6790b974078e description: 2008-10-09 Matthias Klose * patches/icedtea-6open-6616825.patch: New. * patches/icedtea-6open-6651382.patch: New. * patches/icedtea-6open-6756202.patch: New. * Makefile.am: Apply patches. diffstat: 5 files changed, 440 insertions(+) ChangeLog | 7 Makefile.am | 3 patches/icedtea-6open-6616825.patch | 294 +++++++++++++++++++++++++++++++++++ patches/icedtea-6open-6651382.patch | 116 +++++++++++++ patches/icedtea-6open-6756202.patch | 20 ++ diffs (469 lines): diff -r 86fbcf148d1f -r 6790b974078e ChangeLog --- a/ChangeLog Wed Oct 08 17:00:19 2008 -0400 +++ b/ChangeLog Thu Oct 09 13:35:37 2008 +0200 @@ -1,3 +1,10 @@ 2008-10-08 Deepak Bhole + + * patches/icedtea-6open-6616825.patch: New. + * patches/icedtea-6open-6651382.patch: New. + * patches/icedtea-6open-6756202.patch: New. + * Makefile.am: Apply patches. + 2008-10-08 Deepak Bhole * IcedTeaPlugin.cc: Implemented JS->Java security. * plugin/icedtea/sun/applet/AppletSecurityContextManager.java: Same. diff -r 86fbcf148d1f -r 6790b974078e Makefile.am --- a/Makefile.am Wed Oct 08 17:00:19 2008 -0400 +++ b/Makefile.am Thu Oct 09 13:35:37 2008 +0200 @@ -504,6 +504,9 @@ ICEDTEA_PATCHES = \ patches/icedtea-arch.patch \ patches/icedtea-lc_ctype.patch \ patches/icedtea-messageutils.patch \ + patches/icedtea-6open-6616825.patch \ + patches/icedtea-6open-6651382.patch \ + patches/icedtea-6open-6756202.patch \ $(VISUALVM_PATCH) if WITH_RHINO diff -r 86fbcf148d1f -r 6790b974078e patches/icedtea-6open-6616825.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-6open-6616825.patch Thu Oct 09 13:35:37 2008 +0200 @@ -0,0 +1,294 @@ +--- openjdk/jdk/src/share/classes/javax/management/ObjectName.java Wed Oct 8 06:07:09 2008 ++++ openjdk/jdk/src/share/classes/javax/management/ObjectName.java Wed Oct 8 06:07:09 2008 +@@ -37,9 +37,6 @@ + import java.util.HashMap; + import java.util.Hashtable; + import java.util.Map; +-import javax.management.MBeanServer; +-import javax.management.MalformedObjectNameException; +-import javax.management.QueryExp; + + /** + *

Represents the object name of an MBean, or a pattern that can +@@ -1159,9 +1156,19 @@ + // + //in.defaultReadObject(); + final ObjectInputStream.GetField fields = in.readFields(); ++ String propListString = ++ (String)fields.get("propertyListString", ""); ++ ++ // 6616825: take care of property patterns ++ final boolean propPattern = ++ fields.get("propertyPattern" , false); ++ if (propPattern) { ++ propListString = ++ (propListString.length()==0?"*":(propListString+",*")); ++ } ++ + cn = (String)fields.get("domain", "default")+ +- ":"+ +- (String)fields.get("propertyListString", ""); ++ ":"+ propListString; + } else { + // Read an object serialized in the new serial form + // +@@ -1795,6 +1802,7 @@ + * @return True if object is an ObjectName whose + * canonical form is equal to that of this ObjectName. + */ ++ @Override + public boolean equals(Object object) { + + // same object case +@@ -1818,6 +1826,7 @@ + * Returns a hash code for this object name. + * + */ ++ @Override + public int hashCode() { + return _canonicalName.hashCode(); + } +--- openjdk/jdk/test/javax/management/ObjectName/SerialCompatTest.java Wed Oct 8 06:07:12 2008 ++++ openjdk/jdk/test/javax/management/ObjectName/SerialCompatTest.java Wed Oct 8 06:07:12 2008 +@@ -23,9 +23,9 @@ + + /* + * @test +- * @bug 6211220 ++ * @bug 6211220 6616825 + * @summary Test that jmx.serial.form=1.0 works for ObjectName +- * @author Eamonn McManus ++ * @author Eamonn McManus, Daniel Fuchs + * @run clean SerialCompatTest + * @run build SerialCompatTest + * @run main/othervm SerialCompatTest +@@ -36,20 +36,8 @@ + import javax.management.ObjectName; + + public class SerialCompatTest { +- public static void main(String[] args) throws Exception { +- System.setProperty("jmx.serial.form", "1.0"); ++ public static void check6211220() throws Exception { + +- /* Check that we really are in jmx.serial.form=1.0 mode. +- The property is frozen the first time the ObjectName class +- is referenced so checking that it is set to the correct +- value now is not enough. */ +- ObjectStreamClass osc = ObjectStreamClass.lookup(ObjectName.class); +- if (osc.getFields().length != 6) { +- throw new Exception("Not using old serial form: fields: " + +- Arrays.asList(osc.getFields())); +- // new serial form has no fields, uses writeObject +- } +- + ObjectName on = new ObjectName("a:b=c"); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(bos); +@@ -62,53 +50,192 @@ + + // if the bug is present, these will get NullPointerException + for (int i = 0; i <= 11; i++) { ++ String msg = "6211220 case("+i+")"; + try { + switch (i) { + case 0: +- check(on1.getDomain().equals("a")); break; ++ check(msg, on1.getDomain().equals("a")); break; + case 1: +- check(on1.getCanonicalName().equals("a:b=c")); break; ++ check(msg, on1.getCanonicalName().equals("a:b=c")); break; + case 2: +- check(on1.getKeyPropertyListString().equals("b=c")); break; ++ check(msg, on1.getKeyPropertyListString().equals("b=c")); ++ break; + case 3: +- check(on1.getCanonicalKeyPropertyListString().equals("b=c")); ++ check(msg, on1.getCanonicalKeyPropertyListString() ++ .equals("b=c")); + break; + case 4: +- check(on1.getKeyProperty("b").equals("c")); break; ++ check(msg, on1.getKeyProperty("b").equals("c")); break; + case 5: +- check(on1.getKeyPropertyList() ++ check(msg, on1.getKeyPropertyList() + .equals(Collections.singletonMap("b", "c"))); break; + case 6: +- check(!on1.isDomainPattern()); break; ++ check(msg, !on1.isDomainPattern()); break; + case 7: +- check(!on1.isPattern()); break; ++ check(msg, !on1.isPattern()); break; + case 8: +- check(!on1.isPropertyPattern()); break; ++ check(msg, !on1.isPropertyPattern()); break; + case 9: +- check(on1.equals(on)); break; ++ check(msg, on1.equals(on)); break; + case 10: +- check(on.equals(on1)); break; ++ check(msg, on.equals(on1)); break; + case 11: +- check(on1.apply(on)); break; ++ check(msg, on1.apply(on)); break; + default: ++ throw new Exception(msg+": Test incorrect"); ++ } ++ } catch (Exception e) { ++ System.out.println(msg+": Test failed with exception:"); ++ e.printStackTrace(System.out); ++ failed = true; ++ } ++ } ++ ++ if (failed) ++ throw new Exception("Some tests for 6211220 failed"); ++ else ++ System.out.println("All tests for 6211220 passed"); ++ } ++ ++ static void checkName(String testname, ObjectName on) ++ throws Exception { ++ ByteArrayOutputStream bos = new ByteArrayOutputStream(); ++ ObjectOutputStream oos = new ObjectOutputStream(bos); ++ oos.writeObject(on); ++ oos.close(); ++ byte[] bytes = bos.toByteArray(); ++ ByteArrayInputStream bis = new ByteArrayInputStream(bytes); ++ ObjectInputStream ois = new ObjectInputStream(bis); ++ ObjectName on1 = (ObjectName) ois.readObject(); ++ // if the bug is present, these will get NullPointerException ++ for (int i = 0; i <= 11; i++) { ++ String msg = testname + " case("+i+")"; ++ try { ++ switch (i) { ++ case 0: ++ check(msg,on1.getDomain().equals(on.getDomain())); ++ break; ++ case 1: ++ check(msg,on1.getCanonicalName(). ++ equals(on.getCanonicalName())); ++ break; ++ case 2: ++ check(msg,on1.getKeyPropertyListString(). ++ equals(on.getKeyPropertyListString())); break; ++ case 3: ++ check(msg,on1.getCanonicalKeyPropertyListString(). ++ equals(on.getCanonicalKeyPropertyListString())); ++ break; ++ case 4: ++ for (Object ko : on1.getKeyPropertyList().keySet()) { ++ final String key = (String) ko; ++ check(msg,on1.getKeyProperty(key). ++ equals(on.getKeyProperty(key))); ++ } ++ for (Object ko : on.getKeyPropertyList().keySet()) { ++ final String key = (String) ko; ++ check(msg,on1.getKeyProperty(key). ++ equals(on.getKeyProperty(key))); ++ } ++ case 5: ++ check(msg,on1.getKeyPropertyList() ++ .equals(on.getKeyPropertyList())); break; ++ case 6: ++ check(msg,on1.isDomainPattern()==on.isDomainPattern()); ++ break; ++ case 7: ++ check(msg,on1.isPattern()==on.isPattern()); break; ++ case 8: ++ check(msg, ++ on1.isPropertyPattern()==on.isPropertyPattern()); break; ++ case 9: ++ check(msg,on1.equals(on)); break; ++ case 10: ++ check(msg,on.equals(on1)); break; ++ case 11: ++ if (!on.isPattern()) ++ check(msg,on1.apply(on)); break; ++ default: + throw new Exception("Test incorrect: case: " + i); + } + } catch (Exception e) { +- System.out.println("Test failed with exception:"); ++ System.out.println("Test ("+i+") failed with exception:"); + e.printStackTrace(System.out); + failed = true; + } + } + ++ } ++ ++ private static String[] names6616825 = { ++ "a:b=c","a:b=c,*","*:*",":*",":b=c",":b=c,*", ++ "a:*,b=c",":*",":*,b=c","*x?:k=\"x\\*z\"","*x?:k=\"x\\*z\",*", ++ "*x?:*,k=\"x\\*z\"","*x?:k=\"x\\*z\",*,b=c" ++ }; ++ ++ static void check6616825() throws Exception { ++ System.out.println("Testing 616825"); ++ for (String n : names6616825) { ++ final ObjectName on; ++ try { ++ on = new ObjectName(n); ++ } catch (Exception x) { ++ failed = true; ++ System.out.println("Unexpected failure for 6616825 ["+n ++ +"]: "+x); ++ x.printStackTrace(System.out); ++ continue; ++ } ++ try { ++ checkName("616825 "+n,on); ++ } catch (Exception x) { ++ failed = true; ++ System.out.println("6616825 failed for ["+n+"]: "+x); ++ x.printStackTrace(System.out); ++ } ++ } ++ + if (failed) ++ throw new Exception("Some tests for 6616825 failed"); ++ else ++ System.out.println("All tests for 6616825 passed"); ++ } ++ ++ public static void main(String[] args) throws Exception { ++ System.setProperty("jmx.serial.form", "1.0"); ++ ++ /* Check that we really are in jmx.serial.form=1.0 mode. ++ The property is frozen the first time the ObjectName class ++ is referenced so checking that it is set to the correct ++ value now is not enough. */ ++ ObjectStreamClass osc = ObjectStreamClass.lookup(ObjectName.class); ++ if (osc.getFields().length != 6) { ++ throw new Exception("Not using old serial form: fields: " + ++ Arrays.asList(osc.getFields())); ++ // new serial form has no fields, uses writeObject ++ } ++ ++ try { ++ check6211220(); ++ } catch (Exception x) { ++ System.err.println(x.getMessage()); ++ } ++ try { ++ check6616825(); ++ } catch (Exception x) { ++ System.err.println(x.getMessage()); ++ } ++ ++ if (failed) + throw new Exception("Some tests failed"); + else + System.out.println("All tests passed"); ++ + } + +- private static void check(boolean condition) { ++ private static void check(String msg, boolean condition) { + if (!condition) { +- new Throwable("Test failed").printStackTrace(System.out); ++ new Throwable("Test failed "+msg).printStackTrace(System.out); + failed = true; + } + } diff -r 86fbcf148d1f -r 6790b974078e patches/icedtea-6open-6651382.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-6open-6651382.patch Thu Oct 09 13:35:37 2008 +0200 @@ -0,0 +1,116 @@ +--- openjdk/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemPoolEntryImpl.java Tue Oct 7 08:43:32 2008 ++++ openjdk/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemPoolEntryImpl.java Tue Oct 7 08:43:32 2008 +@@ -26,7 +26,6 @@ + + // java imports + // +-import java.io.Serializable; + import java.util.Map; + + // jmx imports +@@ -36,9 +35,7 @@ + + // jdmk imports + // +-import com.sun.jmx.snmp.agent.SnmpMib; + +-import java.lang.management.ManagementFactory; + import java.lang.management.MemoryUsage; + import java.lang.management.MemoryType; + import java.lang.management.MemoryPoolMXBean; +@@ -73,8 +70,10 @@ + "jvmMemPoolEntry.getCollectionUsage"; + final static MemoryUsage ZEROS = new MemoryUsage(0,0,0,0); + +- +- ++ final String entryMemoryTag; ++ final String entryPeakMemoryTag; ++ final String entryCollectMemoryTag; ++ + MemoryUsage getMemoryUsage() { + try { + final Map m = JvmContextFactory.getUserData(); +@@ -81,10 +80,10 @@ + + if (m != null) { + final MemoryUsage cached = (MemoryUsage) +- m.get(memoryTag); ++ m.get(entryMemoryTag); + if (cached != null) { +- log.debug("getMemoryUsage", +- "jvmMemPoolEntry.getUsage found in cache."); ++ log.debug("getMemoryUsage",entryMemoryTag+ ++ " found in cache."); + return cached; + } + +@@ -91,7 +90,7 @@ + MemoryUsage u = pool.getUsage(); + if (u == null) u = ZEROS; + +- m.put(memoryTag,u); ++ m.put(entryMemoryTag,u); + return u; + } + // Should never come here. +@@ -113,11 +112,11 @@ + + if (m != null) { + final MemoryUsage cached = (MemoryUsage) +- m.get(peakMemoryTag); ++ m.get(entryPeakMemoryTag); + if (cached != null) { + if (log.isDebugOn()) + log.debug("getPeakMemoryUsage", +- peakMemoryTag + " found in cache."); ++ entryPeakMemoryTag + " found in cache."); + return cached; + } + +@@ -124,7 +123,7 @@ + MemoryUsage u = pool.getPeakUsage(); + if (u == null) u = ZEROS; + +- m.put(peakMemoryTag,u); ++ m.put(entryPeakMemoryTag,u); + return u; + } + // Should never come here. +@@ -146,11 +145,11 @@ + + if (m != null) { + final MemoryUsage cached = (MemoryUsage) +- m.get(collectMemoryTag); ++ m.get(entryCollectMemoryTag); + if (cached != null) { + if (log.isDebugOn()) + log.debug("getCollectMemoryUsage", +- collectMemoryTag + " found in cache."); ++ entryCollectMemoryTag + " found in cache."); + return cached; + } + +@@ -157,7 +156,7 @@ + MemoryUsage u = pool.getCollectionUsage(); + if (u == null) u = ZEROS; + +- m.put(collectMemoryTag,u); ++ m.put(entryCollectMemoryTag,u); + return u; + } + // Should never come here. +@@ -179,9 +178,12 @@ + /** + * Constructor for the "JvmMemPoolEntry" group. + */ +- public JvmMemPoolEntryImpl(MemoryPoolMXBean mp, int index) { ++ public JvmMemPoolEntryImpl(MemoryPoolMXBean mp, final int index) { + this.pool=mp; + this.jvmMemPoolIndex = index; ++ this.entryMemoryTag = memoryTag + "." + index; ++ this.entryPeakMemoryTag = peakMemoryTag + "." + index; ++ this.entryCollectMemoryTag = collectMemoryTag + "." + index; + } + + /** diff -r 86fbcf148d1f -r 6790b974078e patches/icedtea-6open-6756202.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-6open-6756202.patch Thu Oct 09 13:35:37 2008 +0200 @@ -0,0 +1,20 @@ +--- openjdk/jdk/make/netbeans/jmx/build.properties Wed Oct 8 09:13:27 2008 ++++ openjdk/jdk/make/netbeans/jmx/build.properties Wed Oct 8 09:13:27 2008 +@@ -42,14 +42,14 @@ + java/lang/management/ \ + javax/management/ + +-project.spec.version = JMX API 2.0 ++project.spec.version = JMX API 1.4 + + jar.jmx.name = jmx.jar + jar.jmx.sealed = true +-jar.jmx.spec.title = JSR 003, 160, 255 - JMX API ++jar.jmx.spec.title = JSR 003, 160 - JMX API + jar.jmx.spec.version = ${project.spec.version} + jar.jmx.spec.vendor = Sun Microsystems, Inc. +-jar.jmx.impl.title = JSR 003, 160, 255 - OpenJDK 7 JMX API ++jar.jmx.impl.title = JSR 003, 160 - OpenJDK 6 JMX API + jar.jmx.impl.vendor = Project OpenJDK + + javadoc.options=-J-Xmx256m From omajid at redhat.com Thu Oct 9 07:43:17 2008 From: omajid at redhat.com (Omair Majid) Date: Thu, 09 Oct 2008 10:43:17 -0400 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 Message-ID: <48EE1885.9050005@redhat.com> Hi, Ioana and I have been working on creating a PulseAudio based Mixer and we believe that it has become stable enough to include it as an optional build in icedtea6. To do that, the pulseaudio source code needs to be put in the pulseaudio folder in icedtea and the attached patch needs to be applied. The configure option --enable-pulse-java is used to enable building the PulseAudio based mixer. To compile icedtea with the pulseaudio-based mixer : (assuming the icedtea-pulseaudio.patch file is in the current directory) hg clone http://icedtea.classpath.org/hg/icedtea6 cd icedtea6 # this next step wont be necessary once the pulse-java source code # is commited to icedtea6 hg clone http://icedtea.classpath.org/hg/pulseaudio patch -p1 < ../icedtea-pulseaudio.patch ./autogen.sh ./configure --enable-pulse-java make Please let me know if there are any concerns, comments or objections. Thanks, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-pulseaudio.patch Type: text/x-patch Size: 11859 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20081009/c37cfff0/attachment.bin From gbenson at redhat.com Thu Oct 9 08:25:27 2008 From: gbenson at redhat.com (Gary Benson) Date: Thu, 09 Oct 2008 15:25:27 +0000 Subject: changeset in /hg/icedtea6: 2008-10-09 Gary Benson changeset fa94fa7ac782 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=fa94fa7ac782 description: 2008-10-09 Gary Benson Andrew Haley * patches/icedtea-hotspot-citypeflow.patch: Reinstated. * Makefile.am (ZERO_PATCHES): Apply the above for HotSpot 7 builds. * ports/hotspot/build/linux/makefiles/shark.make: Remove workaround for the above. diffstat: 4 files changed, 22 insertions(+), 8 deletions(-) ChangeLog | 9 +++++++++ Makefile.am | 3 ++- patches/icedtea-hotspot-citypeflow.patch | 11 +++++++++++ ports/hotspot/build/linux/makefiles/shark.make | 7 ------- diffs (58 lines): diff -r 6790b974078e -r fa94fa7ac782 ChangeLog --- a/ChangeLog Thu Oct 09 13:35:37 2008 +0200 +++ b/ChangeLog Thu Oct 09 11:25:22 2008 -0400 @@ -1,3 +1,12 @@ 2008-10-09 Matthias Klose + Andrew Haley + + * patches/icedtea-hotspot-citypeflow.patch: Reinstated. + * Makefile.am (ZERO_PATCHES): Apply the above for HotSpot 7 builds. + + * ports/hotspot/build/linux/makefiles/shark.make: + Remove workaround for the above. + 2008-10-09 Matthias Klose * patches/icedtea-6open-6616825.patch: New. diff -r 6790b974078e -r fa94fa7ac782 Makefile.am --- a/Makefile.am Thu Oct 09 13:35:37 2008 +0200 +++ b/Makefile.am Thu Oct 09 11:25:22 2008 -0400 @@ -421,7 +421,8 @@ ZERO_PATCHES = \ patches/icedtea-signed-types.patch \ patches/icedtea-test-atomic-operations.patch \ patches/icedtea-zero.patch \ - patches/icedtea-ia64-bugfix.patch + patches/icedtea-ia64-bugfix.patch \ + patches/icedtea-hotspot-citypeflow.patch # Patches needed when not using the newer OpenJDK 7 HotSpot for zero. NON_ZERO_PATCHES = \ diff -r 6790b974078e -r fa94fa7ac782 patches/icedtea-hotspot-citypeflow.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-citypeflow.patch Thu Oct 09 11:25:22 2008 -0400 @@ -0,0 +1,11 @@ +--- openjdk/hotspot/src/share/vm/ci/ciTypeFlow.hpp~ 2008-07-10 22:04:30.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.hpp 2008-07-25 14:32:03.544802121 +0200 +@@ -130,7 +130,7 @@ + + // Used as a combined index for locals and temps + enum Cell { +- Cell_0 ++ Cell_0, Cell_max = UINT_MAX + }; + + // A StateVector summarizes the type information at some diff -r 6790b974078e -r fa94fa7ac782 ports/hotspot/build/linux/makefiles/shark.make --- a/ports/hotspot/build/linux/makefiles/shark.make Thu Oct 09 13:35:37 2008 +0200 +++ b/ports/hotspot/build/linux/makefiles/shark.make Thu Oct 09 11:25:22 2008 -0400 @@ -30,10 +30,3 @@ VM_SUBDIR = server VM_SUBDIR = server CFLAGS += -DSHARK - -# Something in this file fails with GCC at higher optimization levels. -# The part of ciTypeFlow::StateVector::meet_exception() that fills in -# local variables stops part way through leaving the rest set to T_TOP -# (ie uninitialized). The VM then aborts with a ShouldNotReachHere() -# in SharkPHIState::initialize(). Observed with 4.3.2. -OPT_CFLAGS/ciTypeFlow.o = -O1 From bugzilla-daemon at icedtea.classpath.org Thu Oct 9 10:22:58 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 09 Oct 2008 17:22:58 +0000 Subject: [Bug 207] Installation failure (eXist) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=207 p.bradley at dsl.pipex.com changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Installation failure |Installation failure (eXist) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Thu Oct 9 12:35:22 2008 From: omajid at redhat.com (Omair Majid) Date: Thu, 09 Oct 2008 19:35:22 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-09 Omair Majid changeset ea894778a6d0 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=ea894778a6d0 description: 2008-10-09 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java (getSupportedFormats): Moved stuff around. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java (PulseAudioPort): Open the port on construction. (open): Doesnt throw any exceptions, so no throws clause. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java (open): Let the mixer know that the line is open. (close): Let the mixer know the the line is closed. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java (open): Let the mixer know that the line is open. (close): Let the mixer konw that hte line is closed. diffstat: 4 files changed, 66 insertions(+), 18 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 33 +++++----- src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java | 15 +++- src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java | 19 +++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java | 17 +++++ diffs (172 lines): diff -r 5108fc37a890 -r ea894778a6d0 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Wed Oct 08 16:06:00 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Thu Oct 09 15:35:27 2008 -0400 @@ -136,22 +136,6 @@ public class PulseAudioMixer implements * */ int[] channelSizes = new int[] { 1, 2, 3, 4, 5, 6 }; - for (int channelSize : channelSizes) { - properties = new HashMap(); - properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_U8"); - - int sampleSize = 8; // in bits - AudioFormat PA_SAMPLE_U8 = new AudioFormat(Encoding.PCM_UNSIGNED, // encoding - AudioSystem.NOT_SPECIFIED, // sample rate - sampleSize, // sample size - channelSize, // channels - sampleSize / 8 * channelSize, // frame size in bytes - AudioSystem.NOT_SPECIFIED, // frame rate - false, // big endian? - properties); - - supportedFormats.add(PA_SAMPLE_U8); - } for (int channelSize : channelSizes) { properties = new HashMap(); @@ -257,6 +241,23 @@ public class PulseAudioMixer implements properties); supportedFormats.add(PA_SAMPLE_S32LE); + } + + for (int channelSize : channelSizes) { + properties = new HashMap(); + properties.put(PULSEAUDIO_FORMAT_KEY, "PA_SAMPLE_U8"); + + int sampleSize = 8; // in bits + AudioFormat PA_SAMPLE_U8 = new AudioFormat(Encoding.PCM_UNSIGNED, // encoding + AudioSystem.NOT_SPECIFIED, // sample rate + sampleSize, // sample size + channelSize, // channels + sampleSize / 8 * channelSize, // frame size in bytes + AudioSystem.NOT_SPECIFIED, // frame rate + false, // big endian? + properties); + + supportedFormats.add(PA_SAMPLE_U8); } return supportedFormats.toArray(new AudioFormat[0]); diff -r 5108fc37a890 -r ea894778a6d0 src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Wed Oct 08 16:06:00 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Thu Oct 09 15:35:27 2008 -0400 @@ -39,7 +39,6 @@ package org.classpath.icedtea.pulseaudio import javax.sound.sampled.AudioSystem; import javax.sound.sampled.LineEvent; -import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.Port; public abstract class PulseAudioPort extends PulseAudioLine implements Port, @@ -79,6 +78,16 @@ public abstract class PulseAudioPort ext controls.add(muteControl); isOpen = true; + /* + * unlike other lines, Ports must either be open or close + * + * close = no sound. open = sound + * + * so we set it to be open by default + */ + + open(); + // System.out.println("Opened Target Port " + name); } @@ -95,6 +104,8 @@ public abstract class PulseAudioPort ext } public float getVolume() { + + // FIXME need to query system for volume return this.volume; } @@ -130,7 +141,7 @@ public abstract class PulseAudioPort ext public abstract javax.sound.sampled.Line.Info getLineInfo(); @Override - public void open() throws LineUnavailableException { + public void open() { native_setVolume(volume); isOpen = true; fireLineEvent(new LineEvent(this, LineEvent.Type.OPEN, diff -r 5108fc37a890 -r ea894778a6d0 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Wed Oct 08 16:06:00 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Thu Oct 09 15:35:27 2008 -0400 @@ -41,6 +41,8 @@ import javax.sound.sampled.Port; public class PulseAudioSourcePort extends PulseAudioPort { + /* aka mic */ + static { System.loadLibrary("pulse-java"); } @@ -49,6 +51,21 @@ public class PulseAudioSourcePort extend super(name, eventLoop); } + public void open() { + super.open(); + + PulseAudioMixer parent = PulseAudioMixer.getInstance(); + parent.addSourceLine(this); + } + + public void close() { + + PulseAudioMixer parent = PulseAudioMixer.getInstance(); + parent.removeSourceLine(this); + + super.close(); + } + public native byte[] native_setVolume(float newValue); public synchronized native byte[] native_updateVolumeInfo(); @@ -57,5 +74,7 @@ public class PulseAudioSourcePort extend public javax.sound.sampled.Line.Info getLineInfo() { return new Port.Info(Port.class, getName(), false); } + + } diff -r 5108fc37a890 -r ea894778a6d0 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Wed Oct 08 16:06:00 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Thu Oct 09 15:35:27 2008 -0400 @@ -41,6 +41,8 @@ import javax.sound.sampled.Port; public class PulseAudioTargetPort extends PulseAudioPort { + /* aka speaker */ + static { System.loadLibrary("pulse-java"); } @@ -49,6 +51,21 @@ public class PulseAudioTargetPort extend super(name, eventLoop); } + public void open() { + super.open(); + + PulseAudioMixer parent = PulseAudioMixer.getInstance(); + parent.addTargetLine(this); + } + + public void close() { + + PulseAudioMixer parent = PulseAudioMixer.getInstance(); + parent.removeTargetLine(this); + + super.close(); + } + public native byte[] native_setVolume(float newValue); public synchronized native byte[] native_updateVolumeInfo(); From gnu_andrew at member.fsf.org Thu Oct 9 13:47:23 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Thu, 9 Oct 2008 21:47:23 +0100 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <48EE1885.9050005@redhat.com> References: <48EE1885.9050005@redhat.com> Message-ID: <17c6771e0810091347ka76a7bev7e9c3ead3f0b070c@mail.gmail.com> 2008/10/9 Omair Majid : > Hi, > > Ioana and I have been working on creating a PulseAudio based Mixer and we > believe that it has become stable enough to include it as an optional build > in icedtea6. To do that, the pulseaudio source code needs to be put in the > pulseaudio folder in icedtea and the attached patch needs to be applied. > > The configure option --enable-pulse-java is used to enable building the > PulseAudio based mixer. > > To compile icedtea with the pulseaudio-based mixer : > (assuming the icedtea-pulseaudio.patch file is in the current directory) > > hg clone http://icedtea.classpath.org/hg/icedtea6 > cd icedtea6 > # this next step wont be necessary once the pulse-java source code > # is commited to icedtea6 > hg clone http://icedtea.classpath.org/hg/pulseaudio > patch -p1 < ../icedtea-pulseaudio.patch > ./autogen.sh > ./configure --enable-pulse-java > make > > Please let me know if there are any concerns, comments or objections. > > Thanks, > > Omair > Is the intention for this patch to represent how PulseAudio will be integrated? If so, I assume it won't be part of IcedTea but just an optional dependency? Comments: * PULSE_JAVA_DIR should be configurable by a --with-pulse-java-dir option. * I assume CC is called explicitly rather than using the usual automake rules (pulseaudio_SOURCES and the like) is because IcedTea itself is a bit non-standard. * The continued use of the test + if ! test -d $(ICEDTEA_BOOT_DIR) ; is worrying. I was already concerned about this from the current ecj invocations. Can we not just depend on the creation of the boot directory for targets that need it? Users tend to find this confusing as it is unclear at runtime which javac/jar/javah is being used and the duplication can lead to inaccuracies. Thanks for the contribution! -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From mark at klomp.org Fri Oct 10 01:20:45 2008 From: mark at klomp.org (Mark Wielaard) Date: Fri, 10 Oct 2008 10:20:45 +0200 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <17c6771e0810091347ka76a7bev7e9c3ead3f0b070c@mail.gmail.com> References: <48EE1885.9050005@redhat.com> <17c6771e0810091347ka76a7bev7e9c3ead3f0b070c@mail.gmail.com> Message-ID: <1223626845.4349.5.camel@dijkstra.wildebeest.org> Hi, On Thu, 2008-10-09 at 21:47 +0100, Andrew John Hughes wrote: > 2008/10/9 Omair Majid : > > Ioana and I have been working on creating a PulseAudio based Mixer and we > > believe that it has become stable enough to include it as an optional build > > in icedtea6. To do that, the pulseaudio source code needs to be put in the > > pulseaudio folder in icedtea and the attached patch needs to be applied. > > > > The configure option --enable-pulse-java is used to enable building the > > PulseAudio based mixer. > > > > To compile icedtea with the pulseaudio-based mixer : > > (assuming the icedtea-pulseaudio.patch file is in the current directory) > > > > hg clone http://icedtea.classpath.org/hg/icedtea6 > > cd icedtea6 > > # this next step wont be necessary once the pulse-java source code > > # is commited to icedtea6 > > hg clone http://icedtea.classpath.org/hg/pulseaudio > > patch -p1 < ../icedtea-pulseaudio.patch > > ./autogen.sh > > ./configure --enable-pulse-java > > make > > > > Please let me know if there are any concerns, comments or objections. > > Is the intention for this patch to represent how PulseAudio will be integrated? > If so, I assume it won't be part of IcedTea but just an optional dependency? No, my impression was that we wanted the pulseaudio directory directly into the icedtea repo. That would certainly be my preference. The only thing we need to think about is whether we also want to carry over the revision history or that we keep around the pulseaudio repo for historical reasons. I don't immediately know how easy it is to carry over the changesets from one repo to a completely separate one. Omair, Ioana, what do you want? > Comments: > > * PULSE_JAVA_DIR should be configurable by a --with-pulse-java-dir option. But not if we just add the directory to the repo. > * I assume CC is called explicitly rather than using the usual automake rules > (pulseaudio_SOURCES and the like) is because IcedTea itself is a bit > non-standard. > * The continued use of the test + if ! test -d $(ICEDTEA_BOOT_DIR) ; > is worrying. > I was already concerned about this from the current ecj invocations. > Can we not just > depend on the creation of the boot directory for targets that need it? > Users tend to find > this confusing as it is unclear at runtime which javac/jar/javah is > being used and the duplication > can lead to inaccuracies. What would the "correct" way be to express this in the Makefile.am? > Thanks for the contribution! Yes, I like to see this go in. I already tested it a bit and it seems to work nicely. Cheers, Mark From bugzilla-daemon at icedtea.classpath.org Fri Oct 10 01:23:38 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 10 Oct 2008 08:23:38 +0000 Subject: [Bug 207] Installation failure (eXist) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=207 ------- Comment #1 from mark at klomp.org 2008-10-10 08:23 ------- Yes, attaching the error log to the bug might help. But note that icedtea based on openjdk7-b24 is now 6 months old. A lot of fixes were made since then. Would it be possible to try with a more recent version? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From doko at ubuntu.com Fri Oct 10 03:46:49 2008 From: doko at ubuntu.com (Matthias Klose) Date: Fri, 10 Oct 2008 12:46:49 +0200 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <1223626845.4349.5.camel@dijkstra.wildebeest.org> References: <48EE1885.9050005@redhat.com> <17c6771e0810091347ka76a7bev7e9c3ead3f0b070c@mail.gmail.com> <1223626845.4349.5.camel@dijkstra.wildebeest.org> Message-ID: <48EF3299.3040202@ubuntu.com> Mark Wielaard schrieb: >>> Please let me know if there are any concerns, comments or objections. >> Is the intention for this patch to represent how PulseAudio will be integrated? >> If so, I assume it won't be part of IcedTea but just an optional dependency? > > No, my impression was that we wanted the pulseaudio directory directly > into the icedtea repo. That would certainly be my preference. please don't follow the style bundling and building everything in one source. the jar should be picked up like the rhino jar, or are there problems with this approach? why not make separate pulseaudio release? Matthias From doko at ubuntu.com Fri Oct 10 03:53:13 2008 From: doko at ubuntu.com (Matthias Klose) Date: Fri, 10 Oct 2008 12:53:13 +0200 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <48EE1885.9050005@redhat.com> References: <48EE1885.9050005@redhat.com> Message-ID: <48EF3419.40800@ubuntu.com> Omair Majid schrieb: > Please let me know if there are any concerns, comments or objections. - pulseaudio 0.9.11 is checked in the configure script; is this necessary, or is 0.9.10 sufficient? asking because both Debian and Ubuntu only have 0.9.10. Or are single patches needed in 0.9.10? - -fpic: not sure if this is necessary for the bindings, but some platforms require -fPIC (s390, mips, powerpc?, arm?) Matthias From mark at klomp.org Fri Oct 10 03:55:56 2008 From: mark at klomp.org (Mark Wielaard) Date: Fri, 10 Oct 2008 12:55:56 +0200 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <48EF3299.3040202@ubuntu.com> References: <48EE1885.9050005@redhat.com> <17c6771e0810091347ka76a7bev7e9c3ead3f0b070c@mail.gmail.com> <1223626845.4349.5.camel@dijkstra.wildebeest.org> <48EF3299.3040202@ubuntu.com> Message-ID: <1223636157.4349.12.camel@dijkstra.wildebeest.org> Hi Matthias, On Fri, 2008-10-10 at 12:46 +0200, Matthias Klose wrote: > Mark Wielaard schrieb: > >>> Please let me know if there are any concerns, comments or objections. > >> Is the intention for this patch to represent how PulseAudio will be integrated? > >> If so, I assume it won't be part of IcedTea but just an optional dependency? > > > > No, my impression was that we wanted the pulseaudio directory directly > > into the icedtea repo. That would certainly be my preference. > > please don't follow the style bundling and building everything in one source. the jar should be > picked up like the rhino jar, or are there problems with this approach? > > why not make separate pulseaudio release? Basically because it is intended to become the core sound sampled provider. Also optional/separate parts become less tested than integrated parts. Rhino is different because it is completely maintained upstream. Splitting our core sources into separate repos isn't really helping integration. If however Omair and Ioana want to maintain it separately and do releases separately from the rest of IcedTea then of course they may do so and then we can treat it like we treat rhino for example as a completely separate thing. Cheers, Mark From iivan at redhat.com Fri Oct 10 06:29:04 2008 From: iivan at redhat.com (Ioana Ivan) Date: Fri, 10 Oct 2008 09:29:04 -0400 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <1223626845.4349.5.camel@dijkstra.wildebeest.org> References: <48EE1885.9050005@redhat.com> <17c6771e0810091347ka76a7bev7e9c3ead3f0b070c@mail.gmail.com> <1223626845.4349.5.camel@dijkstra.wildebeest.org> Message-ID: <48EF58A0.1020200@redhat.com> Mark Wielaard wrote: > Hi, > > On Thu, 2008-10-09 at 21:47 +0100, Andrew John Hughes wrote: > >> 2008/10/9 Omair Majid : >> >>> Ioana and I have been working on creating a PulseAudio based Mixer and we >>> believe that it has become stable enough to include it as an optional build >>> in icedtea6. To do that, the pulseaudio source code needs to be put in the >>> pulseaudio folder in icedtea and the attached patch needs to be applied. >>> >>> The configure option --enable-pulse-java is used to enable building the >>> PulseAudio based mixer. >>> >>> To compile icedtea with the pulseaudio-based mixer : >>> (assuming the icedtea-pulseaudio.patch file is in the current directory) >>> >>> hg clone http://icedtea.classpath.org/hg/icedtea6 >>> cd icedtea6 >>> # this next step wont be necessary once the pulse-java source code >>> # is commited to icedtea6 >>> hg clone http://icedtea.classpath.org/hg/pulseaudio >>> patch -p1 < ../icedtea-pulseaudio.patch >>> ./autogen.sh >>> ./configure --enable-pulse-java >>> make >>> >>> Please let me know if there are any concerns, comments or objections. >>> >> Is the intention for this patch to represent how PulseAudio will be integrated? >> If so, I assume it won't be part of IcedTea but just an optional dependency? >> > > No, my impression was that we wanted the pulseaudio directory directly > into the icedtea repo. That would certainly be my preference. > > The only thing we need to think about is whether we also want to carry > over the revision history or that we keep around the pulseaudio repo for > historical reasons. I don't immediately know how easy it is to carry > over the changesets from one repo to a completely separate one. > Omair, Ioana, what do you want? > I think it would be better to carry over the revision history to the icedtea repository, but it doesn't really matter to me. If that's difficult to do, keeping the pulseaudio repo is fine too. Thanks for helping us integrate the pulseaudio spi in icedtea :) > >> Comments: >> >> * PULSE_JAVA_DIR should be configurable by a --with-pulse-java-dir option. >> > > But not if we just add the directory to the repo. > > >> * I assume CC is called explicitly rather than using the usual automake rules >> (pulseaudio_SOURCES and the like) is because IcedTea itself is a bit >> non-standard. >> * The continued use of the test + if ! test -d $(ICEDTEA_BOOT_DIR) ; >> is worrying. >> I was already concerned about this from the current ecj invocations. >> Can we not just >> depend on the creation of the boot directory for targets that need it? >> Users tend to find >> this confusing as it is unclear at runtime which javac/jar/javah is >> being used and the duplication >> can lead to inaccuracies. >> > > What would the "correct" way be to express this in the Makefile.am? > > >> Thanks for the contribution! >> > > Yes, I like to see this go in. I already tested it a bit and it seems to > work nicely. > > Cheers, > > Mark > > From omajid at redhat.com Fri Oct 10 06:37:45 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 10 Oct 2008 09:37:45 -0400 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <48EF3419.40800@ubuntu.com> References: <48EE1885.9050005@redhat.com> <48EF3419.40800@ubuntu.com> Message-ID: <48EF5AA9.5000709@redhat.com> Matthias Klose wrote: > - pulseaudio 0.9.11 is checked in the configure script; is this necessary, > or is 0.9.10 sufficient? asking because both Debian and Ubuntu only have > 0.9.10. Or are single patches needed in 0.9.10? PulseAudio >= 0.9.11 provides a callback which is used in implementing LineEvent.START (and possibly other things). So PulseAudio >= 0.9.11 is required for pulse-java to work correctly. Omair From iivan at redhat.com Fri Oct 10 06:36:03 2008 From: iivan at redhat.com (Ioana Ivan) Date: Fri, 10 Oct 2008 09:36:03 -0400 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <48EF3419.40800@ubuntu.com> References: <48EE1885.9050005@redhat.com> <48EF3419.40800@ubuntu.com> Message-ID: <48EF5A43.5000000@redhat.com> Matthias Klose wrote: > Omair Majid schrieb: > >> Please let me know if there are any concerns, comments or objections. >> > > - pulseaudio 0.9.11 is checked in the configure script; is this necessary, > or is 0.9.10 sufficient? asking because both Debian and Ubuntu only have > 0.9.10. Or are single patches needed in 0.9.10? > 0.9.11 is needed for START/STOP events to be sent to the line listeners. There is actually a bug in pulseaudio that causes the start callback to not be called sometimes that's been fixed in 9.13, so it's better to have that version, but we have added some checks in java so 9.11 and 9.12 should work as well. We can write a patch so that it compiles and runs with 9.10, but the events won't work. Mark, I remember you were saying you had a patch for that. Is it working? > - -fpic: not sure if this is necessary for the bindings, but some platforms > require -fPIC (s390, mips, powerpc?, arm?) > > Matthias > From aph at redhat.com Fri Oct 10 07:00:00 2008 From: aph at redhat.com (Andrew Haley) Date: Fri, 10 Oct 2008 15:00:00 +0100 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <48EF3419.40800@ubuntu.com> References: <48EE1885.9050005@redhat.com> <48EF3419.40800@ubuntu.com> Message-ID: <18671.24544.415608.224435@zebedee.pink> Matthias Klose writes: > Omair Majid schrieb: > > Please let me know if there are any concerns, comments or objections. > > - pulseaudio 0.9.11 is checked in the configure script; is this necessary, > or is 0.9.10 sufficient? asking because both Debian and Ubuntu only have > 0.9.10. Or are single patches needed in 0.9.10? > > - -fpic: not sure if this is necessary for the bindings, but some platforms > require -fPIC (s390, mips, powerpc?, arm?) -fpic must always be used when building a shared lib. No exceptions. It might seem to work on a 32-bit x86, but it doesn't really. -fPIC doesn't seem to have much (any?) effect on x86, and helps on other arches. You might as well use it. Andrew. From mark at klomp.org Fri Oct 10 07:31:27 2008 From: mark at klomp.org (Mark Wielaard) Date: Fri, 10 Oct 2008 16:31:27 +0200 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <48EF5A43.5000000@redhat.com> References: <48EE1885.9050005@redhat.com> <48EF3419.40800@ubuntu.com> <48EF5A43.5000000@redhat.com> Message-ID: <1223649087.4349.25.camel@dijkstra.wildebeest.org> Hi Ioana, On Fri, 2008-10-10 at 09:36 -0400, Ioana Ivan wrote: > 0.9.11 is needed for START/STOP events to be sent to the line listeners. > There is actually a bug in pulseaudio that causes the start callback to > not be called sometimes that's been fixed in 9.13, so it's better to > have that version, but we have added some checks in java so 9.11 and > 9.12 should work as well. We can write a patch so that it compiles and > runs with 9.10, but the events won't work. Mark, I remember you were > saying you had a patch for that. Is it working? It is more like a quick and dirty hack. It makes it possible to compile against 0.9.10, but by completely eliminating the stream_started_callback(), which means LineListeners don't work. Cheers, Mark diff -r 5108fc37a890 src/native/org_classpath_icedtea_pulseaudio_Stream.c --- a/src/native/org_classpath_icedtea_pulseaudio_Stream.c Wed Oct 08 16:06:00 2008 -0400 +++ b/src/native/org_classpath_icedtea_pulseaudio_Stream.c Fri Oct 10 16:28:20 2008 +0200 @@ -170,6 +170,7 @@ // requires pulseaudio 0.9.11 :( +/* static void stream_started_callback(pa_stream *stream, void *userdata) { // printf("stream_started_callback called\n"); java_context* context = userdata; @@ -187,6 +188,7 @@ } } +*/ static void stream_latency_update_callback(pa_stream *stream, void *userdata) { // printf("stream_latency_update_callback called\n"); @@ -308,7 +310,7 @@ pa_stream_set_read_callback (stream, stream_read_callback, j_context); pa_stream_set_overflow_callback (stream, stream_overflow_callback, j_context); pa_stream_set_underflow_callback (stream, stream_underflow_callback, j_context); - pa_stream_set_started_callback (stream, stream_started_callback, j_context); + // pa_stream_set_started_callback (stream, stream_started_callback, j_context); pa_stream_set_latency_update_callback (stream, stream_latency_update_callback, j_context); pa_stream_set_moved_callback (stream, stream_moved_callback, j_context); pa_stream_set_suspended_callback (stream, stream_suspended_callback, j_context); From omajid at redhat.com Fri Oct 10 08:10:37 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 10 Oct 2008 15:10:37 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-09 Omair Majid changeset d4676ea1be88 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=d4676ea1be88 description: 2008-10-09 Omair Majid Added FIXMEs for places where permissions should be checked diffstat: 9 files changed, 46 insertions(+), 2 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 4 +++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 4 +++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioLine.java | 2 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 12 ++++++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java | 8 ++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 4 +++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java | 3 ++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 4 +++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java | 7 +++++ diffs (219 lines): diff -r ea894778a6d0 -r d4676ea1be88 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Thu Oct 09 15:35:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Thu Oct 09 17:28:36 2008 -0400 @@ -233,6 +233,8 @@ public class PulseAudioClip extends Puls throw new IllegalStateException("line already closed"); } + // FIXME security + clipThread.interrupt(); try { @@ -390,6 +392,8 @@ public class PulseAudioClip extends Puls public void open(AudioFormat format, byte[] data, int offset, int bufferSize) throws LineUnavailableException { + // FIXME security + super.open(format); this.data = new byte[bufferSize]; System.arraycopy(data, offset, this.data, 0, bufferSize); diff -r ea894778a6d0 -r d4676ea1be88 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Thu Oct 09 15:35:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Thu Oct 09 17:28:36 2008 -0400 @@ -84,6 +84,8 @@ public abstract class PulseAudioDataLine if (isOpen) { throw new IllegalStateException("Line is already open"); } + + // FIXME security createStream(format); addStreamListeners(); @@ -288,6 +290,8 @@ public abstract class PulseAudioDataLine "Line must be open for close() to work"); } + // FIXME security + synchronized (eventLoop.threadLock) { stream.disconnect(); } diff -r ea894778a6d0 -r d4676ea1be88 src/java/org/classpath/icedtea/pulseaudio/PulseAudioLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioLine.java Thu Oct 09 15:35:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioLine.java Thu Oct 09 17:28:36 2008 -0400 @@ -111,8 +111,6 @@ abstract class PulseAudioLine implements return isOpen; } - - public void removeLineListener(LineListener listener) { lineListeners.remove(listener); } diff -r ea894778a6d0 -r d4676ea1be88 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Thu Oct 09 15:35:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Thu Oct 09 17:28:36 2008 -0400 @@ -266,6 +266,8 @@ public class PulseAudioMixer implements @Override public Line getLine(Line.Info info) throws LineUnavailableException { + // FIXME security! + if (!isLineSupported(info)) { throw new IllegalArgumentException("Line unsupported: " + info); } @@ -363,6 +365,9 @@ public class PulseAudioMixer implements @Override public Line[] getSourceLines() { + + // FIXME security + return (Line[]) sourceLines.toArray(new Line[0]); } @@ -387,6 +392,9 @@ public class PulseAudioMixer implements @Override public Line[] getTargetLines() { + + // FIXME security + return (Line[]) targetLines.toArray(new TargetDataLine[0]); } @@ -473,6 +481,8 @@ public class PulseAudioMixer implements throw new IllegalStateException("Mixer is not open; cant close"); } + // FIXME security + eventLoopThread.interrupt(); try { @@ -567,6 +577,8 @@ public class PulseAudioMixer implements throw new IllegalStateException("Mixer is already open"); } + // FIXME security + InetAddress addr = InetAddress.getAllByName(host)[0]; if (port != null) { diff -r ea894778a6d0 -r d4676ea1be88 src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Thu Oct 09 15:35:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Thu Oct 09 17:28:36 2008 -0400 @@ -86,6 +86,8 @@ public abstract class PulseAudioPort ext * so we set it to be open by default */ + + // TODO what to do if a security exception is thrown? open(); // System.out.println("Opened Target Port " + name); @@ -131,6 +133,9 @@ public abstract class PulseAudioPort ext @Override public void close() { + + // FIXME security + native_setVolume((float) 0); isOpen = false; fireLineEvent(new LineEvent(this, LineEvent.Type.CLOSE, @@ -142,6 +147,9 @@ public abstract class PulseAudioPort ext @Override public void open() { + + // FIXME security + native_setVolume(volume); isOpen = true; fireLineEvent(new LineEvent(this, LineEvent.Type.OPEN, diff -r ea894778a6d0 -r d4676ea1be88 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Thu Oct 09 15:35:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Thu Oct 09 17:28:36 2008 -0400 @@ -67,6 +67,8 @@ public class PulseAudioSourceDataLine ex synchronized public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { + // FIXME security + super.open(format, bufferSize); volumeControl = new PulseAudioVolumeControl(this, eventLoop); @@ -312,6 +314,8 @@ public class PulseAudioSourceDataLine ex throw new IllegalStateException("not open so cant close"); } + // FIXME security + writeInterrupted = true; PulseAudioMixer parent = PulseAudioMixer.getInstance(); diff -r ea894778a6d0 -r d4676ea1be88 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Thu Oct 09 15:35:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Thu Oct 09 17:28:36 2008 -0400 @@ -52,6 +52,9 @@ public class PulseAudioSourcePort extend } public void open() { + + + super.open(); PulseAudioMixer parent = PulseAudioMixer.getInstance(); diff -r ea894778a6d0 -r d4676ea1be88 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Thu Oct 09 15:35:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Thu Oct 09 17:28:36 2008 -0400 @@ -75,6 +75,8 @@ public class PulseAudioTargetDataLine ex "Line cant be closed if it isnt open"); } + // FIXME security + PulseAudioMixer parentMixer = PulseAudioMixer.getInstance(); parentMixer.removeTargetLine(this); @@ -88,6 +90,8 @@ public class PulseAudioTargetDataLine ex throw new IllegalStateException("already open"); } + // FIXME security + super.open(format, bufferSize); /* initialize all the member variables */ diff -r ea894778a6d0 -r d4676ea1be88 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Thu Oct 09 15:35:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Thu Oct 09 17:28:36 2008 -0400 @@ -48,10 +48,15 @@ public class PulseAudioTargetPort extend } public PulseAudioTargetPort(String name, EventLoop eventLoop) { + super(name, eventLoop); + } public void open() { + + // FIXME security + super.open(); PulseAudioMixer parent = PulseAudioMixer.getInstance(); @@ -59,6 +64,8 @@ public class PulseAudioTargetPort extend } public void close() { + + // FIXME PulseAudioMixer parent = PulseAudioMixer.getInstance(); parent.removeTargetLine(this); From omajid at redhat.com Fri Oct 10 08:10:37 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 10 Oct 2008 15:10:37 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-10 Omair Majid changeset 63fe20298326 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=63fe20298326 description: 2008-10-10 Omair Majid * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java (close): Check for audio permissions. (open): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java (open): Removed FIXME for security. (close): Likewise. * src/java/org/classpath/icedtea/pulseaudio/Mixer.java (getLine): Check for permissions before returning a line. (getSourceLines): Check for permissions. (getTargetLines): Likewise. (close): Likewise. (openRemote): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java (PulseAudioPort): Dont open the port by default. (open): Removed FIXME. (close): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAUdioSourceDataLine.j.ava (open): Check for permissions. (close): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java (open): Likewise. (close): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java (open): Likewise. (close): Likewise. * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java (open): Likewise. (close): Likewise. * unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourcePortTest.java (testControls): Open and close the ports. * unittests/org/classpath/icedtea/pulseaudio/PulseAUdioTargetPortTest.java (testControls): Likewise. diffstat: 10 files changed, 132 insertions(+), 59 deletions(-) src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 23 ++- src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 7 - src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 65 ++++++++-- src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java | 14 -- src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 12 + src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java | 13 +- src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 16 +- src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java | 33 +++-- unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourcePortTest.java | 4 unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetPortTest.java | 4 diffs (truncated from 510 to 500 lines): diff -r d4676ea1be88 -r 63fe20298326 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Thu Oct 09 17:28:36 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Fri Oct 10 11:10:27 2008 -0400 @@ -41,6 +41,7 @@ import java.io.IOException; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; +import javax.sound.sampled.AudioPermission; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import javax.sound.sampled.LineUnavailableException; @@ -229,12 +230,15 @@ public class PulseAudioClip extends Puls @Override public void close() { + + /* check for permission to play audio */ + AudioPermission perm = new AudioPermission("play", null); + perm.checkGuard(null); + if (!isOpen) { throw new IllegalStateException("line already closed"); } - // FIXME security - clipThread.interrupt(); try { @@ -358,10 +362,11 @@ public class PulseAudioClip extends Puls throw new IllegalStateException("Line not open"); } - if ( count < 0 && count != LOOP_CONTINUOUSLY) { - throw new IllegalArgumentException("invalid value for count:" + count); - } - + if (count < 0 && count != LOOP_CONTINUOUSLY) { + throw new IllegalArgumentException("invalid value for count:" + + count); + } + if (clipThread.isAlive() && count != 0) { // Do nothing; behavior not specified by the Java API return; @@ -392,8 +397,10 @@ public class PulseAudioClip extends Puls public void open(AudioFormat format, byte[] data, int offset, int bufferSize) throws LineUnavailableException { - // FIXME security - + /* check for permission to play audio */ + AudioPermission perm = new AudioPermission("play", null); + perm.checkGuard(null); + super.open(format); this.data = new byte[bufferSize]; System.arraycopy(data, offset, this.data, 0, bufferSize); diff -r d4676ea1be88 -r 63fe20298326 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Thu Oct 09 17:28:36 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Fri Oct 10 11:10:27 2008 -0400 @@ -84,8 +84,6 @@ public abstract class PulseAudioDataLine if (isOpen) { throw new IllegalStateException("Line is already open"); } - - // FIXME security createStream(format); addStreamListeners(); @@ -290,8 +288,6 @@ public abstract class PulseAudioDataLine "Line must be open for close() to work"); } - // FIXME security - synchronized (eventLoop.threadLock) { stream.disconnect(); } @@ -310,7 +306,7 @@ public abstract class PulseAudioDataLine isStarted = false; } - + public void reconnectforSynchronization(Stream masterStream) throws LineUnavailableException { sendEvents = false; @@ -353,7 +349,6 @@ public abstract class PulseAudioDataLine isStarted = true; } - public synchronized void stop() { if (!isOpen) { diff -r d4676ea1be88 -r 63fe20298326 src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Thu Oct 09 17:28:36 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Oct 10 11:10:27 2008 -0400 @@ -49,6 +49,7 @@ import java.util.concurrent.Semaphore; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; +import javax.sound.sampled.AudioPermission; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import javax.sound.sampled.Control; @@ -266,8 +267,6 @@ public class PulseAudioMixer implements @Override public Line getLine(Line.Info info) throws LineUnavailableException { - // FIXME security! - if (!isLineSupported(info)) { throw new IllegalArgumentException("Line unsupported: " + info); } @@ -302,16 +301,28 @@ public class PulseAudioMixer implements } if ((info.getLineClass() == SourceDataLine.class)) { + /* check for permission to play audio */ + AudioPermission perm = new AudioPermission("play", null); + perm.checkGuard(null); + return new PulseAudioSourceDataLine(eventLoop, formats, defaultFormat); } if ((info.getLineClass() == TargetDataLine.class)) { + /* check for permission to play audio */ + AudioPermission perm = new AudioPermission("record", null); + perm.checkGuard(null); + return new PulseAudioTargetDataLine(eventLoop, formats, defaultFormat); } if ((info.getLineClass() == Clip.class)) { + /* check for permission to play audio */ + AudioPermission perm = new AudioPermission("play", null); + perm.checkGuard(null); + return new PulseAudioClip(eventLoop, formats, defaultFormat); } @@ -365,9 +376,11 @@ public class PulseAudioMixer implements @Override public Line[] getSourceLines() { - - // FIXME security - + + /* check for permmission to play audio */ + AudioPermission perm = new AudioPermission("play", null); + perm.checkGuard(null); + return (Line[]) sourceLines.toArray(new Line[0]); } @@ -392,9 +405,11 @@ public class PulseAudioMixer implements @Override public Line[] getTargetLines() { - - // FIXME security - + + /* check for permission to play audio */ + AudioPermission perm = new AudioPermission("record", null); + perm.checkGuard(null); + return (Line[]) targetLines.toArray(new TargetDataLine[0]); } @@ -477,12 +492,25 @@ public class PulseAudioMixer implements @Override synchronized public void close() { + /* + * only allow the mixer to be controlled if either playback or recording + * is allowed + */ + + try { + /* check for permission to play audio */ + AudioPermission perm = new AudioPermission("play", null); + perm.checkGuard(null); + } catch (SecurityException e) { + /* check for permission to record audio */ + AudioPermission perm = new AudioPermission("record", null); + perm.checkGuard(null); + } + if (!this.isOpen) { throw new IllegalStateException("Mixer is not open; cant close"); } - // FIXME security - eventLoopThread.interrupt(); try { @@ -573,12 +601,25 @@ public class PulseAudioMixer implements synchronized public void openRemote(String appName, String host, Integer port) throws UnknownHostException, LineUnavailableException { + /* + * only allow the mixer to be controlled if either playback or recording + * is allowed + */ + + try { + /* check for permission to play audio */ + AudioPermission perm = new AudioPermission("play", null); + perm.checkGuard(null); + } catch (SecurityException e) { + /* check for permission to record audio */ + AudioPermission perm = new AudioPermission("record", null); + perm.checkGuard(null); + } + if (isOpen) { throw new IllegalStateException("Mixer is already open"); } - // FIXME security - InetAddress addr = InetAddress.getAllByName(host)[0]; if (port != null) { diff -r d4676ea1be88 -r 63fe20298326 src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Thu Oct 09 17:28:36 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Fri Oct 10 11:10:27 2008 -0400 @@ -83,12 +83,8 @@ public abstract class PulseAudioPort ext * * close = no sound. open = sound * - * so we set it to be open by default */ - - - // TODO what to do if a security exception is thrown? - open(); + // FIXME open(); // System.out.println("Opened Target Port " + name); } @@ -133,9 +129,7 @@ public abstract class PulseAudioPort ext @Override public void close() { - - // FIXME security - + native_setVolume((float) 0); isOpen = false; fireLineEvent(new LineEvent(this, LineEvent.Type.CLOSE, @@ -147,9 +141,7 @@ public abstract class PulseAudioPort ext @Override public void open() { - - // FIXME security - + native_setVolume(volume); isOpen = true; fireLineEvent(new LineEvent(this, LineEvent.Type.OPEN, diff -r d4676ea1be88 -r 63fe20298326 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Thu Oct 09 17:28:36 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Oct 10 11:10:27 2008 -0400 @@ -40,6 +40,7 @@ import java.util.ArrayList; import java.util.ArrayList; import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioPermission; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.SourceDataLine; @@ -67,7 +68,9 @@ public class PulseAudioSourceDataLine ex synchronized public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { - // FIXME security + /* check for permmission to play audio */ + AudioPermission perm = new AudioPermission("play", null); + perm.checkGuard(null); super.open(format, bufferSize); @@ -310,11 +313,14 @@ public class PulseAudioSourceDataLine ex @Override synchronized public void close() { + + /* check for permmission to play audio */ + AudioPermission perm = new AudioPermission("play", null); + perm.checkGuard(null); + if (!isOpen) { throw new IllegalStateException("not open so cant close"); } - - // FIXME security writeInterrupted = true; diff -r d4676ea1be88 -r 63fe20298326 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Thu Oct 09 17:28:36 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Fri Oct 10 11:10:27 2008 -0400 @@ -37,6 +37,7 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; +import javax.sound.sampled.AudioPermission; import javax.sound.sampled.Port; public class PulseAudioSourcePort extends PulseAudioPort { @@ -53,7 +54,9 @@ public class PulseAudioSourcePort extend public void open() { - + /* check for permission to record audio */ + AudioPermission perm = new AudioPermission("record", null); + perm.checkGuard(null); super.open(); @@ -62,6 +65,14 @@ public class PulseAudioSourcePort extend } public void close() { + + /* check for permission to record audio */ + AudioPermission perm = new AudioPermission("record", null); + perm.checkGuard(null); + + if (!isOpen) { + throw new IllegalStateException("Port is not open; so cant close"); + } PulseAudioMixer parent = PulseAudioMixer.getInstance(); parent.removeSourceLine(this); diff -r d4676ea1be88 -r 63fe20298326 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Thu Oct 09 17:28:36 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Oct 10 11:10:27 2008 -0400 @@ -38,6 +38,7 @@ package org.classpath.icedtea.pulseaudio package org.classpath.icedtea.pulseaudio; import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioPermission; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.TargetDataLine; @@ -70,13 +71,15 @@ public class PulseAudioTargetDataLine ex @Override synchronized public void close() { + /* check for permission to record audio */ + AudioPermission perm = new AudioPermission("record", null); + perm.checkGuard(null); + if (!isOpen) { throw new IllegalStateException( "Line cant be closed if it isnt open"); } - // FIXME security - PulseAudioMixer parentMixer = PulseAudioMixer.getInstance(); parentMixer.removeTargetLine(this); @@ -86,12 +89,13 @@ public class PulseAudioTargetDataLine ex @Override synchronized public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { + /* check for permission to record audio */ + AudioPermission perm = new AudioPermission("record", null); + perm.checkGuard(null); + if (isOpen) { throw new IllegalStateException("already open"); } - - // FIXME security - super.open(format, bufferSize); /* initialize all the member variables */ @@ -223,7 +227,7 @@ public class PulseAudioTargetDataLine ex /* read a fragment, and drop it from the server */ currentFragment = stream.peek(); - + stream.drop(); if (currentFragment == null) { System.out diff -r d4676ea1be88 -r 63fe20298326 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Thu Oct 09 17:28:36 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Fri Oct 10 11:10:27 2008 -0400 @@ -37,42 +37,51 @@ exception statement from your version. package org.classpath.icedtea.pulseaudio; +import javax.sound.sampled.AudioPermission; import javax.sound.sampled.Port; public class PulseAudioTargetPort extends PulseAudioPort { /* aka speaker */ - + static { System.loadLibrary("pulse-java"); } public PulseAudioTargetPort(String name, EventLoop eventLoop) { - + super(name, eventLoop); - + } public void open() { - - // FIXME security - + + /* check for permission to play audio */ + AudioPermission perm = new AudioPermission("play", null); + perm.checkGuard(null); + super.open(); - + PulseAudioMixer parent = PulseAudioMixer.getInstance(); parent.addTargetLine(this); } - + public void close() { + + /* check for permission to play audio */ + AudioPermission perm = new AudioPermission("play", null); + perm.checkGuard(null); - // FIXME + if (!isOpen) { + throw new IllegalStateException("not open, so cant close Port"); + } PulseAudioMixer parent = PulseAudioMixer.getInstance(); parent.removeTargetLine(this); - - super.close(); + + super.close(); } - + public native byte[] native_setVolume(float newValue); public synchronized native byte[] native_updateVolumeInfo(); diff -r d4676ea1be88 -r 63fe20298326 unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourcePortTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourcePortTest.java Thu Oct 09 17:28:36 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourcePortTest.java Fri Oct 10 11:10:27 2008 -0400 @@ -97,6 +97,9 @@ public class PulseAudioSourcePortTest { if (info.getLineClass() == Port.class) { System.out.println(info.toString()); Port port = (Port) mixer.getLine(info); + if (!port.isOpen()) { + port.open(); + } FloatControl volumeControl = (FloatControl) port .getControl(FloatControl.Type.VOLUME); volumeControl.setValue(60000); @@ -104,6 +107,7 @@ public class PulseAudioSourcePortTest { .getControl(BooleanControl.Type.MUTE); muteControl.setValue(true); muteControl.setValue(false); + port.close(); } } } diff -r d4676ea1be88 -r 63fe20298326 unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetPortTest.java --- a/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetPortTest.java Thu Oct 09 17:28:36 2008 -0400 +++ b/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetPortTest.java Fri Oct 10 11:10:27 2008 -0400 @@ -97,6 +97,9 @@ public class PulseAudioTargetPortTest { if (info.getLineClass() == Port.class) { System.out.println(info.toString()); Port port = (Port) mixer.getLine(info); + if (!port.isOpen()) { + port.open(); + } FloatControl volumeControl = (FloatControl) port From bugzilla-daemon at icedtea.classpath.org Fri Oct 10 09:16:42 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 10 Oct 2008 16:16:42 +0000 Subject: [Bug 210] New: Eclipse IDE for C/C++ crashes while running code Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=210 Summary: Eclipse IDE for C/C++ crashes while running code Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: t.m.nixstuff at gmail.com Eclipse IDE sometimes crashes while trying to run executable. I'll upload the log file. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Fri Oct 10 09:17:41 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 10 Oct 2008 16:17:41 +0000 Subject: [Bug 210] Eclipse IDE for C/C++ crashes while running code Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=210 ------- Comment #1 from t.m.nixstuff at gmail.com 2008-10-10 16:17 ------- Created an attachment (id=108) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=108&action=view) Log dumped after eclipse crash -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From iivan at redhat.com Fri Oct 10 09:40:12 2008 From: iivan at redhat.com (Ioana Ivan) Date: Fri, 10 Oct 2008 16:40:12 +0000 Subject: changeset in /hg/pulseaudio: 2008-10-10 Ioana Ivan changeset 095b46980d97 in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=095b46980d97 description: 2008-10-10 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java (getLineInfo): removed method, moved to each subclass * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (getLineInfo): new method * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java (getLineInfo): new method * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java getLineInfo): new method diffstat: 6 files changed, 33 insertions(+), 6 deletions(-) .classpath | 1 ChangeLog | 11 ++++++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 7 ++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 6 ----- src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 7 ++++++ src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 7 ++++++ diffs (114 lines): diff -r 63fe20298326 -r 095b46980d97 .classpath --- a/.classpath Fri Oct 10 11:10:27 2008 -0400 +++ b/.classpath Fri Oct 10 12:32:00 2008 -0400 @@ -3,6 +3,7 @@ + diff -r 63fe20298326 -r 095b46980d97 ChangeLog --- a/ChangeLog Fri Oct 10 11:10:27 2008 -0400 +++ b/ChangeLog Fri Oct 10 12:32:00 2008 -0400 @@ -1,3 +1,14 @@ 2008-10-08 Ioana Ivan +2008-10-10 Ioana Ivan + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java + (getLineInfo): removed method, moved to each subclass + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java + (getLineInfo): new method + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java + (getLineInfo): new method + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java + getLineInfo): new method + + 2008-10-08 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java (addStreamListener): startedListener always fires a START event diff -r 63fe20298326 -r 095b46980d97 src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Fri Oct 10 11:10:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Fri Oct 10 12:32:00 2008 -0400 @@ -44,6 +44,7 @@ import javax.sound.sampled.AudioPermissi import javax.sound.sampled.AudioPermission; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; +import javax.sound.sampled.DataLine; import javax.sound.sampled.LineUnavailableException; import org.classpath.icedtea.pulseaudio.Stream.WriteListener; @@ -557,5 +558,11 @@ public class PulseAudioClip extends Puls super.stop(); } + + public javax.sound.sampled.Line.Info getLineInfo() { + return new DataLine.Info(Clip.class, supportedFormats, + StreamBufferAttributes.MIN_VALUE, + StreamBufferAttributes.MAX_VALUE); + } } diff -r 63fe20298326 -r 095b46980d97 src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Fri Oct 10 11:10:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Fri Oct 10 12:32:00 2008 -0400 @@ -426,12 +426,6 @@ public abstract class PulseAudioDataLine return bufferSize; } - public javax.sound.sampled.Line.Info getLineInfo() { - return new DataLine.Info(this.getClass(), supportedFormats, - StreamBufferAttributes.MIN_VALUE, - StreamBufferAttributes.MAX_VALUE); - } - @Override public AudioFormat getFormat() { if (!isOpen) { diff -r 63fe20298326 -r 095b46980d97 src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Oct 10 11:10:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Fri Oct 10 12:32:00 2008 -0400 @@ -40,6 +40,7 @@ import java.util.ArrayList; import java.util.ArrayList; import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.DataLine; import javax.sound.sampled.AudioPermission; import javax.sound.sampled.LineListener; import javax.sound.sampled.LineUnavailableException; @@ -329,5 +330,11 @@ public class PulseAudioSourceDataLine ex super.close(); } + + public javax.sound.sampled.Line.Info getLineInfo() { + return new DataLine.Info(SourceDataLine.class, supportedFormats, + StreamBufferAttributes.MIN_VALUE, + StreamBufferAttributes.MAX_VALUE); + } } diff -r 63fe20298326 -r 095b46980d97 src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Oct 10 11:10:27 2008 -0400 +++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Fri Oct 10 12:32:00 2008 -0400 @@ -38,6 +38,7 @@ package org.classpath.icedtea.pulseaudio package org.classpath.icedtea.pulseaudio; import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.DataLine; import javax.sound.sampled.AudioPermission; import javax.sound.sampled.LineEvent; import javax.sound.sampled.LineUnavailableException; @@ -362,5 +363,11 @@ public class PulseAudioTargetDataLine ex fireLineEvent(new LineEvent(this, LineEvent.Type.STOP, framesSinceOpen)); } + + public javax.sound.sampled.Line.Info getLineInfo() { + return new DataLine.Info(TargetDataLine.class, supportedFormats, + StreamBufferAttributes.MIN_VALUE, + StreamBufferAttributes.MAX_VALUE); + } } From bugzilla-daemon at icedtea.classpath.org Fri Oct 10 09:54:46 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 10 Oct 2008 16:54:46 +0000 Subject: [Bug 207] Installation failure (eXist) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=207 ------- Comment #2 from p.bradley at dsl.pipex.com 2008-10-10 16:54 ------- Created an attachment (id=109) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=109&action=view) Error log Log now attached. Stupidly I didn't see you could attach a file when I did the original report (D'oh!). As for the icedtea version, I'll check the openSUSE repositories for a more recent version and install it if there is one. Whether there is or not, I'll post here to say what progress I have or haven't made. Cheers -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Fri Oct 10 10:21:24 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 10 Oct 2008 17:21:24 +0000 Subject: [Bug 207] Installation failure (eXist) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=207 mark at klomp.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #3 from mark at klomp.org 2008-10-10 17:21 ------- Thanks for the error log. This is indeed an old bug since fixed. *** This bug has been marked as a duplicate of bug 114 *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Fri Oct 10 10:21:26 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 10 Oct 2008 17:21:26 +0000 Subject: [Bug 114] sun.awt.image.JPEGImageDecoder.initIDs crash Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=114 mark at klomp.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |p.bradley at dsl.pipex.com ------- Comment #8 from mark at klomp.org 2008-10-10 17:21 ------- *** Bug 207 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Fri Oct 10 13:03:08 2008 From: omajid at redhat.com (Omair Majid) Date: Fri, 10 Oct 2008 20:03:08 +0000 Subject: changeset in /hg/icedtea6: 2008-10-10 Ioana Ivan Message-ID: changeset 8b85ec866923 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=8b85ec866923 description: 2008-10-10 Ioana Ivan Omair Majid * INSTALL: Updated to reflect requirements for pulse-java. * Makefile.am (distclean-local): Clean up pulse-java. (EXTRA_DIST): Add pulseaudio folder. (stamps/icedtea.stamp): Added dependency on stamps/pulse-java.stamp. Also copy generated .jar and .so files to the jre images. (stamps/icedtea-debug.stamp): Likewise. (stamps/pulse-java.stamp): New target. (stamps/pulse-java-jar.stamp): Likewise. (stamps/pulse-java-class.stamp): Likewise. (stamps/pulse-java-headers.stamp): Likewise. (clean-pulse-java): Likewise. * README: Added note for PulseAudio based mixer. * acinclude.m4 (FIND_PULSEAUDIO): Find the pulseaudio binary. * configure.ac: Check for pulseaudio server and header files being installed. * patches/icedtea-pulse-soundproperties.patch: Dont use pulse-java as the default Mixer. * pulseaudio/: Copied over sources from pulseaudio repository. diffstat: 52 files changed, 11603 insertions(+), 4 deletions(-) ChangeLog | 24 INSTALL | 4 Makefile.am | 134 README | 8 acinclude.m4 | 9 configure.ac | 25 patches/icedtea-pulse-soundproperties.patch | 16 pulseaudio/AUTHORS | 5 pulseaudio/COPYING | 340 ++ pulseaudio/README | 28 pulseaudio/src/java/META-INF/services/javax.sound.sampled.spi.MixerProvider | 3 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/ContextEvent.java | 56 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/ContextListener.java | 44 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 280 ++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Operation.java | 147 + pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 568 ++++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 471 +++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioLine.java | 118 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 881 ++++++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerInfo.java | 62 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixerProvider.java | 63 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMuteControl.java | 78 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java | 54 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java | 155 + pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 340 ++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java | 94 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 373 ++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java | 94 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioVolumeControl.java | 90 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java | 777 +++++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/StreamBufferAttributes.java | 84 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/StreamSampleSpecification.java | 70 pulseaudio/src/native/jni-common.c | 236 + pulseaudio/src/native/jni-common.h | 90 pulseaudio/src/native/org_classpath_icedtea_pulseaudio_EventLoop.c | 362 ++ pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Operation.c | 83 pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c | 102 pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioStreamVolumeControl.c | 67 pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c | 107 pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c | 1010 +++++++ pulseaudio/testsounds/README | 4 pulseaudio/unittests/org/classpath/icedtea/pulseaudio/OtherSoundProvidersAvailableTest.java | 114 pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 623 ++++ pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioEventLoopOverhead.java | 100 pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerProviderTest.java | 118 pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerRawTest.java | 120 pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioMixerTest.java | 434 +++ pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineRawTest.java | 305 ++ pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLineTest.java | 1345 ++++++++++ pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioSourcePortTest.java | 122 pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java | 648 ++++ pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetPortTest.java | 122 diffs (truncated from 11924 to 500 lines): diff -r fa94fa7ac782 -r 8b85ec866923 ChangeLog --- a/ChangeLog Thu Oct 09 11:25:22 2008 -0400 +++ b/ChangeLog Fri Oct 10 16:03:12 2008 -0400 @@ -1,3 +1,27 @@ 2008-10-09 Gary Benson + Omair Majid + + * INSTALL: Updated to reflect requirements for pulse-java. + * Makefile.am + (distclean-local): Clean up pulse-java. + (EXTRA_DIST): Add pulseaudio folder. + (stamps/icedtea.stamp): Added dependency on stamps/pulse-java.stamp. Also + copy generated .jar and .so files to the jre images. + (stamps/icedtea-debug.stamp): Likewise. + (stamps/pulse-java.stamp): New target. + (stamps/pulse-java-jar.stamp): Likewise. + (stamps/pulse-java-class.stamp): Likewise. + (stamps/pulse-java-headers.stamp): Likewise. + (clean-pulse-java): Likewise. + * README: Added note for PulseAudio based mixer. + * acinclude.m4 + (FIND_PULSEAUDIO): Find the pulseaudio binary. + * configure.ac: Check for pulseaudio server and header files being + installed. + * patches/icedtea-pulse-soundproperties.patch: Dont use pulse-java as the + default Mixer. + * pulseaudio/: Copied over sources from pulseaudio repository. + 2008-10-09 Gary Benson Andrew Haley diff -r fa94fa7ac782 -r 8b85ec866923 INSTALL --- a/INSTALL Thu Oct 09 11:25:22 2008 -0400 +++ b/INSTALL Fri Oct 10 16:03:12 2008 -0400 @@ -31,6 +31,10 @@ zlib-devel zlib-devel rhino netbeans (harness, platform8, apisupport1, java2, ide9) - for visualvm + +For builing the PulseAudio based mixer, you will need +pulseaudio-libs-devel >= 0.9.11 +pulseaudio >= 0.9.11 For building the zero-assembler port (see below), you will need libffi. diff -r fa94fa7ac782 -r 8b85ec866923 Makefile.am --- a/Makefile.am Thu Oct 09 11:25:22 2008 -0400 +++ b/Makefile.am Fri Oct 10 16:03:12 2008 -0400 @@ -28,6 +28,19 @@ endif endif endif +if ENABLE_PULSE_JAVA +# include the makefile in pulseaudio subdir +PULSE_JAVA_DIR = pulseaudio +PULSE_JAVA_NATIVE_SRCDIR = $(PULSE_JAVA_DIR)/src/native +PULSE_JAVA_JAVA_SRCDIR = $(PULSE_JAVA_DIR)/src/java +PULSE_JAVA_CLASS_DIR = $(PULSE_JAVA_DIR)/bin +else +PULSE_JAVA_DIR = +PULSE_JAVA_NATIVE_SRCDIR = +PULSE_JAVA_JAVA_SRCDIR = +PULSE_JAVA_CLASS_DIR = +endif + if WITH_VISUALVM VISUALVM_PATCH = patches/icedtea-visualvm.patch else @@ -39,7 +52,7 @@ endif all-local: icedtea-against-icedtea -distclean-local: clean-copy clean-jtreg clean-jtreg-reports +distclean-local: clean-copy clean-jtreg clean-jtreg-reports clean-pulse-java rm -rf stamps rm -f rt-source-files.txt \ hotspot-tools-source-files.txt \ @@ -83,7 +96,7 @@ EXTRA_DIST = rt generated $(ICEDTEA_PATC overlays extra jconsole.desktop policytool.desktop \ test/jtreg patches/icedtea-plugin.patch \ patches/icedtea-liveconnect.patch IcedTeaPlugin.cc \ - HACKING patches/icedtea-visualvm.patch + HACKING patches/icedtea-visualvm.patch pulseaudio # The Binary plugs directory is called jdk1.7.0 for historical reasons. The # name is completely irrelevant; only contains the plugs to build IcedTea. @@ -520,6 +533,11 @@ ICEDTEA_PATCHES += \ patches/icedtea-cacao.patch endif +if ENABLE_PULSE_JAVA +ICEDTEA_PATCHES += \ + patches/icedtea-pulse-soundproperties.patch +endif + ICEDTEA_PATCHES += \ $(DISTRIBUTION_PATCHES) @@ -923,7 +941,8 @@ stamps/icedtea.stamp: stamps/bootstrap-d stamps/hotspot-tools.stamp stamps/plugs.stamp \ stamps/ports.stamp stamps/patch.stamp stamps/overlay.stamp \ $(GCJWEBPLUGIN_TARGET) $(ICEDTEAPLUGIN_TARGET) \ - extra-lib/about.jar stamps/cacao.stamp stamps/visualvm.stamp + extra-lib/about.jar stamps/cacao.stamp stamps/visualvm.stamp \ + stamps/pulse-java.stamp $(MAKE) \ $(ICEDTEA_ENV) \ -C openjdk/control/make/ \ @@ -940,6 +959,16 @@ if ENABLE_PLUGIN cp -pPRf gcjwebplugin.so \ $(BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR) endif +endif +if ENABLE_PULSE_JAVA + cp -pPRf libpulse-java.so \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) + cp -pPRf libpulse-java.so \ + $(BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR) + cp -pPRf pulse-java.jar \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/ext + cp -pPRf pulse-java.jar \ + $(BUILD_OUTPUT_DIR)/j2re-image/lib/ext endif if WITH_VISUALVM mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \ @@ -975,7 +1004,8 @@ stamps/icedtea-debug.stamp: stamps/boots stamps/hotspot-tools.stamp stamps/plugs.stamp \ stamps/ports.stamp stamps/patch.stamp stamps/overlay.stamp \ $(GCJWEBPLUGIN_TARGET) $(ICEDTEAPLUGIN_TARGET) \ - extra-lib/about.jar stamps/cacao.stamp + extra-lib/about.jar stamps/cacao.stamp \ + stamps/pulse-java.stamp $(MAKE) \ $(ICEDTEA_ENV) \ -C openjdk/control/make \ @@ -992,6 +1022,16 @@ if ENABLE_PLUGIN cp -pPRf gcjwebplugin.so \ $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib/$(INSTALL_ARCH_DIR) endif +endif +if ENABLE_PULSE_JAVA + cp -pPRf libpulse-java.so \ + $(BUILD_OUTPUT_DIR)-debug/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) + cp -pPRf libpulse-java.so \ + $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib/$(INSTALL_ARCH_DIR) + cp -pPRf pulse-java.jar \ + $(BUILD_OUTPUT_DIR)-debug/j2sdk-image/jre/lib/ext + cp -pPRf pulse-java.jar \ + $(BUILD_OUTPUT_DIR)-debug/j2re-image/lib/ext endif if WITH_VISUALVM mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \ @@ -1374,6 +1414,92 @@ clean-gcjwebplugin: rm -f gcjwebplugin.so endif endif + + +# PulseAudio based mixer +# (pulse-java) + +stamps/pulse-java.stamp: stamps/pulse-java-jar.stamp stamps/pulse-java-headers.stamp +if ENABLE_PULSE_JAVA + $(CC) $(CFLAGS) -c $(PULSE_JAVA_NATIVE_SRCDIR)/jni-common.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fpic -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_EventLoop.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fpic -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Operation.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fpic -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Stream.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fpic -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fpic -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c + $(CC) $(LDFLAGS) -shared $(LIBPULSE_LIBS) -o libpulse-java.so org_*pulseaudio*.o jni-common.o + mv org_classpath_icedtea_pulseaudio_*.o $(PULSE_JAVA_CLASS_DIR) +endif + mkdir -p stamps + touch stamps/pulse-java.stamp + +stamps/pulse-java-jar.stamp: stamps/pulse-java-class.stamp +if ENABLE_PULSE_JAVA + mkdir -p $(PULSE_JAVA_CLASS_DIR); + if ! test -d $(ICEDTEA_BOOT_DIR) ; \ + then \ + $(JAR) cf pulse-java.jar -C $(PULSE_JAVA_CLASS_DIR) .; \ + else \ + $(ICEDTEA_BOOT_DIR)/bin/jar cf pulse-java.jar -C $(PULSE_JAVA_CLASS_DIR) .; \ + fi +endif + mkdir -p stamps + touch stamps/pulse-java-jar.stamp + +stamps/pulse-java-class.stamp: +if ENABLE_PULSE_JAVA + mkdir -p $(PULSE_JAVA_CLASS_DIR) + if ! test -d $(ICEDTEA_BOOT_DIR) ; \ + then \ + (cd $(PULSE_JAVA_JAVA_SRCDIR); \ + $(JAVAC) -d ../../../$(PULSE_JAVA_CLASS_DIR) \ + -bootclasspath \ + '$(OPENJDK_SOURCEPATH_DIRS):$(abs_top_builddir)/generated' \ + org/classpath/icedtea/pulseaudio/*.java\ + ) \ + else \ + (cd $(PULSE_JAVA_JAVA_SRCDIR); \ + $(ICEDTEA_BOOT_DIR)/bin/javac -d ../../../$(PULSE_JAVA_CLASS_DIR)\ + -bootclasspath \ + '$(ICEDTEA_BOOT_DIR)/jre/lib/rt.jar' \ + org/classpath/icedtea/pulseaudio/*.java\ + ) \ + fi + cp -r $(PULSE_JAVA_JAVA_SRCDIR)/META-INF $(PULSE_JAVA_CLASS_DIR) +endif + mkdir -p stamps + touch stamps/pulse-java-class.stamp + + +stamps/pulse-java-headers.stamp: stamps/pulse-java-class.stamp +if ENABLE_PULSE_JAVA + if ! test -d $(ICEDTEA_BOOT_DIR) ; \ + then \ + $(JAVAH) -d $(PULSE_JAVA_NATIVE_SRCDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.EventLoop ; \ + $(JAVAH) -d $(PULSE_JAVA_NATIVE_SRCDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.Stream ; \ + $(JAVAH) -d $(PULSE_JAVA_NATIVE_SRCDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.Operation; \ + $(JAVAH) -d $(PULSE_JAVA_NATIVE_SRCDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.PulseAudioSourcePort ; \ + $(JAVAH) -d $(PULSE_JAVA_NATIVE_SRCDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.PulseAudioTargetPort ; \ + else \ + $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_SRCDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.EventLoop ; \ + $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_SRCDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.Stream ; \ + $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_SRCDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.Operation; \ + $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_SRCDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.PulseAudioSourcePort ; \ + $(ICEDTEA_BOOT_DIR)/bin/javah -d $(PULSE_JAVA_NATIVE_SRCDIR) -classpath $(PULSE_JAVA_CLASS_DIR) org.classpath.icedtea.pulseaudio.PulseAudioTargetPort ; \ + fi +endif + mkdir -p stamps + touch stamps/pulse-java-headers.stamp + + +clean-pulse-java: + rm -rf $(PULSE_JAVA_CLASS_DIR)/* + rm -f $(PULSE_JAVA_NATIVE_SRCDIR)/org_*.h + rm -f stamps/pulse-java*.stamp + rm -f pulse-java.jar + rm -f libpulse-java.so + +# end of pulse-java # jtreg diff -r fa94fa7ac782 -r 8b85ec866923 README --- a/README Thu Oct 09 11:25:22 2008 -0400 +++ b/README Fri Oct 10 16:03:12 2008 -0400 @@ -159,3 +159,11 @@ and --with-netbeans-profiler-src-zip whi and --with-netbeans-profiler-src-zip which can be used to prevent re-downloading of the source zips. --with-netbeans-home can be used to specify where the Netbeans tools are installed (default /usr/share/netbeans). + + + +PulseAudio Mixer +================ + +Passing --enable-pulse-java to configure will build the PulseAudio Mixer for +java. This allows java programs to use PulseAudio as the sound backend. diff -r fa94fa7ac782 -r 8b85ec866923 acinclude.m4 --- a/acinclude.m4 Thu Oct 09 11:25:22 2008 -0400 +++ b/acinclude.m4 Fri Oct 10 16:03:12 2008 -0400 @@ -665,6 +665,15 @@ AC_DEFUN([FIND_RHINO_JAR], AC_SUBST(RHINO_JAR) ]) +AC_DEFUN([FIND_PULSEAUDIO], +[ + AC_PATH_PROG(PULSEAUDIO_BIN, "pulseaudio") + if test -z "${PULSEAUDIO_BIN}"; then + AC_MSG_ERROR("pulseaudio was not found.") + fi + AC_SUBST(PULSEAUDIO_BIN) +]) + AC_DEFUN([ENABLE_OPTIMIZATIONS], [ AC_MSG_CHECKING(whether to disable optimizations) diff -r fa94fa7ac782 -r 8b85ec866923 configure.ac --- a/configure.ac Thu Oct 09 11:25:22 2008 -0400 +++ b/configure.ac Fri Oct 10 16:03:12 2008 -0400 @@ -125,6 +125,12 @@ AC_ARG_ENABLE([liveconnect], [Enable experimental LiveConnect plugin])], [enable_liveconnect="yes"], [enable_liveconnect="no"]) AM_CONDITIONAL(ENABLE_LIVECONNECT, test "x${enable_liveconnect}" = "xyes") + +AC_ARG_ENABLE([pulse-java], + [AS_HELP_STRING([--enable-pulse-java], + [Enable pulse-java - an audio mixer spi that uses PulseAudio])], + [enable_pulse_java="yes"], [enable_pulse_java="no"]) +AM_CONDITIONAL(ENABLE_PULSE_JAVA, test "x${enable_pulse_java}" = "xyes") AC_ARG_ENABLE([docs], [AS_HELP_STRING([--disable-docs], @@ -247,6 +253,11 @@ ENABLE_ZERO_BUILD ENABLE_ZERO_BUILD SET_CORE_OR_SHARK_BUILD +if test "x${enable_pulse_java}" = "xyes" +then + FIND_PULSEAUDIO +fi + dnl pkgconfig cannot be used to finid these headers and libraries. AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[] ,[AC_MSG_ERROR("CUPS headers were not found - @@ -354,6 +365,20 @@ AC_SUBST(ALSA_CFLAGS) AC_SUBST(ALSA_CFLAGS) AC_SUBST(ALSA_LIBS) +if test "x${enable_pulse_java}" = "xyes" +then + dnl Check for pulseaudio libraries. + PKG_CHECK_MODULES(LIBPULSE,[libpulse >= 0.9.11],[LIBPULSE_FOUND=yes] + ,[LIBPULSE_FOUND=no]) + if test "x${LIBPULSE_FOUND}" = xno + then + AC_MSG_ERROR([Could not find pulseaudio>=0.9.11 libraries - \ + Try installing pulseaudio-libs-devel>=0.9.11.]) + fi + AC_SUBST(LIBPULSE_CFLAGS) + AC_SUBST(LIBPULSE_LIBS) +fi + dnl Check for plugin support headers and libraries. dnl FIXME: use unstable if test "x${enable_liveconnect}" = "xyes" diff -r fa94fa7ac782 -r 8b85ec866923 patches/icedtea-pulse-soundproperties.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-pulse-soundproperties.patch Fri Oct 10 16:03:12 2008 -0400 @@ -0,0 +1,16 @@ +--- openjdk/jdk/src/share/lib/sound.properties 2008-08-28 04:15:18.000000000 -0400 ++++ openjdk/jdk/src/share/lib/sound.properties 2008-10-03 16:59:21.000000000 -0400 +@@ -37,3 +37,13 @@ + # Specify the default Receiver by provider and name: + # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1 + # ++ ++# javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++# javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++# javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++# javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider ++ ++javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider ++javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider ++javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider ++javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider diff -r fa94fa7ac782 -r 8b85ec866923 pulseaudio/AUTHORS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pulseaudio/AUTHORS Fri Oct 10 16:03:12 2008 -0400 @@ -0,0 +1,5 @@ +Authors + +Ioana Iivan (iivan at redhat.com) + +Omair Majid (omajid at redhat.com) \ No newline at end of file diff -r fa94fa7ac782 -r 8b85ec866923 pulseaudio/COPYING --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pulseaudio/COPYING Fri Oct 10 16:03:12 2008 -0400 @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable From iivan at redhat.com Fri Oct 10 14:21:34 2008 From: iivan at redhat.com (Ioana Ivan) Date: Fri, 10 Oct 2008 21:21:34 +0000 Subject: changeset in /hg/icedtea6: 2008-10-10 Ioana Ivan Message-ID: changeset e7b6e8e732e4 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e7b6e8e732e4 description: 2008-10-10 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java (getLine): LineUnavailablException is no longer thrown if the mixer is not open (getTargetLines) : returns a Line[] array instead of a TargetDataLine[] array * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine (open(AudioFormat format, int bufferSize)): throws LineUnavailableException if the mixer is not open * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip (open()): throws LineUnavailableException if the mixer is not open * src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort (PulseAudioPort): calls open() diffstat: 6 files changed, 32 insertions(+), 10 deletions(-) ChangeLog | 17 ++++++++++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 5 ++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 5 ++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 6 --- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java | 8 ++-- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java | 1 diffs (120 lines): diff -r 8b85ec866923 -r e7b6e8e732e4 ChangeLog --- a/ChangeLog Fri Oct 10 16:03:12 2008 -0400 +++ b/ChangeLog Fri Oct 10 17:12:18 2008 -0400 @@ -1,3 +1,20 @@ 2008-10-10 Ioana Ivan +2008-10-10 Ioana Ivan + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java + (getLine): LineUnavailablException is no longer thrown if the mixer is + not open + (getTargetLines) : returns a Line[] array instead of a + TargetDataLine[] array + + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine + (open(AudioFormat format, int bufferSize)): throws + LineUnavailableException if the mixer is not open + + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip + (open()): throws LineUnavailableException if the mixer is not open + + * src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort + (PulseAudioPort): calls open() + 2008-10-10 Ioana Ivan Omair Majid diff -r 8b85ec866923 -r e7b6e8e732e4 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Fri Oct 10 16:03:12 2008 -0400 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Fri Oct 10 17:12:18 2008 -0400 @@ -398,6 +398,11 @@ public class PulseAudioClip extends Puls public void open(AudioFormat format, byte[] data, int offset, int bufferSize) throws LineUnavailableException { + if(!PulseAudioMixer.getInstance().isOpen()) { + throw new LineUnavailableException("The mixer needs to be opened before opening a line"); + } + + /* check for permission to play audio */ AudioPermission perm = new AudioPermission("play", null); perm.checkGuard(null); diff -r 8b85ec866923 -r e7b6e8e732e4 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Fri Oct 10 16:03:12 2008 -0400 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Fri Oct 10 17:12:18 2008 -0400 @@ -84,6 +84,10 @@ public abstract class PulseAudioDataLine if (isOpen) { throw new IllegalStateException("Line is already open"); } + if(!PulseAudioMixer.getInstance().isOpen()) { + throw new LineUnavailableException("The mixer needs to be opened before opening a line"); + } + createStream(format); addStreamListeners(); @@ -277,7 +281,6 @@ public abstract class PulseAudioDataLine public void open() throws LineUnavailableException { assert (defaultFormat != null); - open(defaultFormat, DEFAULT_BUFFER_SIZE); } diff -r 8b85ec866923 -r e7b6e8e732e4 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Oct 10 16:03:12 2008 -0400 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Fri Oct 10 17:12:18 2008 -0400 @@ -271,10 +271,6 @@ public class PulseAudioMixer implements throw new IllegalArgumentException("Line unsupported: " + info); } - if (!isOpen) { - throw new LineUnavailableException("The mixer isnt open"); - } - AudioFormat[] formats = null; AudioFormat defaultFormat = null; @@ -410,7 +406,7 @@ public class PulseAudioMixer implements AudioPermission perm = new AudioPermission("record", null); perm.checkGuard(null); - return (Line[]) targetLines.toArray(new TargetDataLine[0]); + return (Line[]) targetLines.toArray(new Line[0]); } @Override diff -r 8b85ec866923 -r e7b6e8e732e4 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Fri Oct 10 16:03:12 2008 -0400 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Fri Oct 10 17:12:18 2008 -0400 @@ -76,8 +76,8 @@ public abstract class PulseAudioPort ext controls.add(volumeControl); muteControl = new PulseAudioMuteControl(this, volumeControl); controls.add(muteControl); - isOpen = true; - + //isOpen = true; + open(); /* * unlike other lines, Ports must either be open or close * @@ -141,7 +141,9 @@ public abstract class PulseAudioPort ext @Override public void open() { - + if(isOpen) { + return; + } native_setVolume(volume); isOpen = true; fireLineEvent(new LineEvent(this, LineEvent.Type.OPEN, diff -r 8b85ec866923 -r e7b6e8e732e4 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Fri Oct 10 16:03:12 2008 -0400 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Fri Oct 10 17:12:18 2008 -0400 @@ -51,7 +51,6 @@ public class PulseAudioTargetPort extend public PulseAudioTargetPort(String name, EventLoop eventLoop) { super(name, eventLoop); - } public void open() { From bugzilla-daemon at icedtea.classpath.org Sat Oct 11 03:38:31 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 11 Oct 2008 10:38:31 +0000 Subject: [Bug 211] New: lines and points are not shown in the icedtea applet Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=211 Summary: lines and points are not shown in the icedtea applet Product: IcedTea Version: unspecified Platform: PC URL: http://descartes.cnice.mec.es/materiales_didacticos/Repr esentacion_numeros_en_recta/representa.htm OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: jredrejo at edu.juntaextremadura.net When using the icedtea plugin in firefox (using Debian lenny, but tested it on Ubuntu too), lines and points in geometric applets are not shown. I'm uploading too screenshots, one using sun java plugin (it works with versions 5 & 6 ) and another one using icedtea, for you to see the differences. Checking the applet messages at the terminal where I launched firefox, there were not warnings or error messages. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Sat Oct 11 03:39:14 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 11 Oct 2008 10:39:14 +0000 Subject: [Bug 211] lines and points are not shown in the icedtea applet Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=211 ------- Comment #1 from jredrejo at edu.juntaextremadura.net 2008-10-11 10:39 ------- Created an attachment (id=110) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=110&action=view) Points and lines are not shown using the icedtea plugin -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Sat Oct 11 03:39:44 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 11 Oct 2008 10:39:44 +0000 Subject: [Bug 211] lines and points are not shown in the icedtea applet Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=211 ------- Comment #2 from jredrejo at edu.juntaextremadura.net 2008-10-11 10:39 ------- Created an attachment (id=111) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=111&action=view) Points and lines are shown using sun java plugin -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From doko at ubuntu.com Sat Oct 11 07:26:52 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Sat, 11 Oct 2008 14:26:52 +0000 Subject: changeset in /hg/icedtea6: 2008-10-11 Matthias Klose changeset a0124c4addcd in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a0124c4addcd description: 2008-10-11 Matthias Klose * Makefile.am (clean-pulse-java): Don't rm -rf / if configuring without pulseaudio. diffstat: 2 files changed, 7 insertions(+) ChangeLog | 5 +++++ Makefile.am | 2 ++ diffs (29 lines): diff -r e7b6e8e732e4 -r a0124c4addcd ChangeLog --- a/ChangeLog Fri Oct 10 17:12:18 2008 -0400 +++ b/ChangeLog Sat Oct 11 16:26:33 2008 +0200 @@ -1,3 +1,8 @@ 2008-10-10 Ioana Ivan +2008-10-11 Matthias Klose + + * Makefile.am (clean-pulse-java): Don't rm -rf / if configuring + without pulseaudio. + 2008-10-10 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java (getLine): LineUnavailablException is no longer thrown if the mixer is diff -r e7b6e8e732e4 -r a0124c4addcd Makefile.am --- a/Makefile.am Fri Oct 10 17:12:18 2008 -0400 +++ b/Makefile.am Sat Oct 11 16:26:33 2008 +0200 @@ -1493,11 +1493,13 @@ endif clean-pulse-java: +if ENABLE_PULSE_JAVA rm -rf $(PULSE_JAVA_CLASS_DIR)/* rm -f $(PULSE_JAVA_NATIVE_SRCDIR)/org_*.h rm -f stamps/pulse-java*.stamp rm -f pulse-java.jar rm -f libpulse-java.so +endif # end of pulse-java From doko at ubuntu.com Sat Oct 11 08:28:30 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Sat, 11 Oct 2008 15:28:30 +0000 Subject: changeset in /hg/icedtea6: 2008-10-11 Matthias Klose changeset 72f37a7f8077 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=72f37a7f8077 description: 2008-10-11 Matthias Klose * Makefile.am (clean-pulse-java): Remove jni-common.o. diffstat: 2 files changed, 2 insertions(+), 1 deletion(-) ChangeLog | 2 +- Makefile.am | 1 + diffs (23 lines): diff -r a0124c4addcd -r 72f37a7f8077 ChangeLog --- a/ChangeLog Sat Oct 11 16:26:33 2008 +0200 +++ b/ChangeLog Sat Oct 11 17:28:17 2008 +0200 @@ -1,7 +1,7 @@ 2008-10-11 Matthias Klose * Makefile.am (clean-pulse-java): Don't rm -rf / if configuring - without pulseaudio. + without pulseaudio, remove jni-common.o. 2008-10-10 Ioana Ivan * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java diff -r a0124c4addcd -r 72f37a7f8077 Makefile.am --- a/Makefile.am Sat Oct 11 16:26:33 2008 +0200 +++ b/Makefile.am Sat Oct 11 17:28:17 2008 +0200 @@ -1499,6 +1499,7 @@ if ENABLE_PULSE_JAVA rm -f stamps/pulse-java*.stamp rm -f pulse-java.jar rm -f libpulse-java.so + rm -f jni-common.o endif # end of pulse-java From doko at ubuntu.com Sat Oct 11 08:54:41 2008 From: doko at ubuntu.com (Matthias Klose) Date: Sat, 11 Oct 2008 17:54:41 +0200 Subject: WARNING: Don't run "make clean" in an icedtea6 checkout (rev 1080 or 1081) Message-ID: <48F0CC41.4040706@ubuntu.com> Please don't run "make clean" in an icedtea6 checkout (rev 1080 or 1081), if the build is configured without --enable-pulse-java, it will run "rm -rf /". Fixed in rev 1082. Matthias From doko at ubuntu.com Sat Oct 11 09:34:55 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Sat, 11 Oct 2008 16:34:55 +0000 Subject: changeset in /hg/icedtea6: 2008-10-11 Matthias Klose changeset 64f23360289f in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=64f23360289f description: 2008-10-11 Matthias Klose * Makefile.am (stamps/pulse-java.stamp): Remove -fpic flag, add -fPIC to build jni-common.c. (gcjwebplugin.so): Use -fPIC. diffstat: 2 files changed, 10 insertions(+), 7 deletions(-) ChangeLog | 3 +++ Makefile.am | 14 +++++++------- diffs (44 lines): diff -r 72f37a7f8077 -r 64f23360289f ChangeLog --- a/ChangeLog Sat Oct 11 17:28:17 2008 +0200 +++ b/ChangeLog Sat Oct 11 18:34:47 2008 +0200 @@ -2,6 +2,9 @@ 2008-10-11 Matthias Klose * src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java diff -r 72f37a7f8077 -r 64f23360289f Makefile.am --- a/Makefile.am Sat Oct 11 17:28:17 2008 +0200 +++ b/Makefile.am Sat Oct 11 18:34:47 2008 +0200 @@ -1408,7 +1408,7 @@ gcjwebplugin.so: gcjwebplugin.cc $(MOZILLA_LIBS) $(GLIB_CFLAGS) $(GLIB_LIBS) \ $(GTK_CFLAGS) $(GTK_LIBS) \ -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \ - -fpic -shared -o $@ $< + -fPIC -shared -o $@ $< clean-gcjwebplugin: rm -f gcjwebplugin.so @@ -1421,12 +1421,12 @@ endif stamps/pulse-java.stamp: stamps/pulse-java-jar.stamp stamps/pulse-java-headers.stamp if ENABLE_PULSE_JAVA - $(CC) $(CFLAGS) -c $(PULSE_JAVA_NATIVE_SRCDIR)/jni-common.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fpic -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_EventLoop.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fpic -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Operation.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fpic -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Stream.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fpic -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fpic -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c + $(CC) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/jni-common.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_EventLoop.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Operation.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Stream.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c $(CC) $(LDFLAGS) -shared $(LIBPULSE_LIBS) -o libpulse-java.so org_*pulseaudio*.o jni-common.o mv org_classpath_icedtea_pulseaudio_*.o $(PULSE_JAVA_CLASS_DIR) endif From doko at ubuntu.com Sun Oct 12 06:46:09 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Sun, 12 Oct 2008 13:46:09 +0000 Subject: changeset in /hg/icedtea6: 2008-10-12 Matthias Klose changeset df8d2a8c69c8 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=df8d2a8c69c8 description: 2008-10-12 Matthias Klose * Makefile.am (stamps/pulse-java.stamp): Add -I$(ICEDTEA_BOOT_DIR)/include to build jni-common.c. diffstat: 2 files changed, 6 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ Makefile.am | 2 +- diffs (24 lines): diff -r 64f23360289f -r df8d2a8c69c8 ChangeLog --- a/ChangeLog Sat Oct 11 18:34:47 2008 +0200 +++ b/ChangeLog Sun Oct 12 15:45:59 2008 +0200 @@ -1,3 +1,8 @@ 2008-10-11 Matthias Klose + + * Makefile.am (stamps/pulse-java.stamp): Add -I$(ICEDTEA_BOOT_DIR)/include + to build jni-common.c. + 2008-10-11 Matthias Klose * Makefile.am (clean-pulse-java): Don't rm -rf / if configuring diff -r 64f23360289f -r df8d2a8c69c8 Makefile.am --- a/Makefile.am Sat Oct 11 18:34:47 2008 +0200 +++ b/Makefile.am Sun Oct 12 15:45:59 2008 +0200 @@ -1421,7 +1421,7 @@ endif stamps/pulse-java.stamp: stamps/pulse-java-jar.stamp stamps/pulse-java-headers.stamp if ENABLE_PULSE_JAVA - $(CC) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/jni-common.c + $(CC) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/jni-common.c $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_EventLoop.c $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Operation.c $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Stream.c From twisti at complang.tuwien.ac.at Sun Oct 12 06:58:34 2008 From: twisti at complang.tuwien.ac.at (Christian Thalinger) Date: Sun, 12 Oct 2008 15:58:34 +0200 Subject: escape bootclasspath single quotes Message-ID: <1223819914.8743.7.camel@workstation.chello.at> Hi! The following patch seems to fix my problems with undefined SNMP stuff, like: incorrect classpath: /export/home/twisti/projects/openjdk/icedtea6/build-hotspot/../rt/com/sun/jmx/snmp/SnmpDataTypeEnums.java ---------- 1. ERROR in /export/home/twisti/projects/openjdk/icedtea6/build-hotspot/../rt/com/sun/jmx/snmp/SnmpOid.java (at line 40) public class SnmpOid extends SnmpValue { ^^^^^^^ The hierarchy of the type SnmpOid is inconsistent ---------- I think it's related to this "incorrect classpath" thing. Are there any reasons to not commit this patch? - Christian --- icedtea6.64f23360289f/Makefile.am 2008-10-12 15:54:24.158071013 +0200 +++ /export/home/twisti/projects/openjdk/icedtea6/Makefile.am 2008-10-12 15:50:15.095452724 +0200 @@ -1235,14 +1235,14 @@ stamps/hotspot-tools-class-files.stamp: -source 1.5 \ -sourcepath \ 'hotspot-tools:$(OPENJDK_SOURCEPATH_DIRS):$(ABS_SOURCE_DIRS)' \ - -bootclasspath '' @$< ; \ + -bootclasspath \'\' @$< ; \ else \ $(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) -g \ -d lib/hotspot-tools \ -source 1.5 \ -sourcepath \ 'hotspot-tools:$(OPENJDK_SOURCEPATH_DIRS):$(ABS_SOURCE_DIRS)' \ - -bootclasspath '' @$< ; \ + -bootclasspath \'\' @$< ; \ fi mkdir -p stamps touch stamps/hotspot-tools-class-files.stamp @@ -1287,13 +1287,13 @@ stamps/rt-class-files.stamp: rt-source-f -source 1.5 \ -sourcepath \ '$(OPENJDK_SOURCEPATH_DIRS):$(abs_top_builddir)/generated' \ - -bootclasspath '' @$< ; \ + -bootclasspath \'\' @$< ; \ else \ $(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) -g -d lib/rt \ -source 1.5 \ -sourcepath \ '$(OPENJDK_SOURCEPATH_DIRS):$(abs_top_builddir)/generated' \ - -bootclasspath '' @$< ; \ + -bootclasspath \'\' @$< ; \ fi cp -r $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources \ lib/rt/net/sourceforge/jnlp/ @@ -1334,12 +1334,12 @@ stamps/extra-class-files.stamp: extra-so $(JAVAC) $(MEMORY_LIMIT) -g -d extra-lib \ -source 1.5 \ -sourcepath extra -cp bootstrap/jdk1.7.0/jre/lib/rt-closed.jar \ - -bootclasspath '' @extra-source-files.txt ; \ + -bootclasspath \'\' @extra-source-files.txt ; \ else \ $(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) -g -d extra-lib \ -source 1.5 \ -sourcepath extra -cp bootstrap/jdk1.7.0/jre/lib/rt-closed.jar \ - -bootclasspath '' @extra-source-files.txt ; \ + -bootclasspath \'\' @extra-source-files.txt ; \ fi cp -r $(abs_top_srcdir)/extra/net/sourceforge/jnlp/about/resources \ extra-lib/net/sourceforge/jnlp/about From doko at ubuntu.com Sun Oct 12 07:32:07 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Sun, 12 Oct 2008 14:32:07 +0000 Subject: changeset in /hg/icedtea6: 2008-10-12 Matthias Klose changeset 9032c6fda5c2 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=9032c6fda5c2 description: 2008-10-12 Matthias Klose * Makefile.am (stamps/pulse-java.stamp): Add -I$(ICEDTEA_BOOT_DIR)/include to build the source files. diffstat: 2 files changed, 6 insertions(+), 6 deletions(-) ChangeLog | 2 +- Makefile.am | 10 +++++----- diffs (32 lines): diff -r df8d2a8c69c8 -r 9032c6fda5c2 ChangeLog --- a/ChangeLog Sun Oct 12 15:45:59 2008 +0200 +++ b/ChangeLog Sun Oct 12 16:31:50 2008 +0200 @@ -1,7 +1,7 @@ 2008-10-12 Matthias Klose * Makefile.am (stamps/pulse-java.stamp): Add -I$(ICEDTEA_BOOT_DIR)/include - to build jni-common.c. + to build the source files. 2008-10-11 Matthias Klose diff -r df8d2a8c69c8 -r 9032c6fda5c2 Makefile.am --- a/Makefile.am Sun Oct 12 15:45:59 2008 +0200 +++ b/Makefile.am Sun Oct 12 16:31:50 2008 +0200 @@ -1422,11 +1422,11 @@ stamps/pulse-java.stamp: stamps/pulse-ja stamps/pulse-java.stamp: stamps/pulse-java-jar.stamp stamps/pulse-java-headers.stamp if ENABLE_PULSE_JAVA $(CC) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/jni-common.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_EventLoop.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Operation.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Stream.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_EventLoop.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Operation.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Stream.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c $(CC) $(LDFLAGS) -shared $(LIBPULSE_LIBS) -o libpulse-java.so org_*pulseaudio*.o jni-common.o mv org_classpath_icedtea_pulseaudio_*.o $(PULSE_JAVA_CLASS_DIR) endif From gnu_andrew at member.fsf.org Sun Oct 12 19:51:14 2008 From: gnu_andrew at member.fsf.org (Andrew John Hughes) Date: Mon, 13 Oct 2008 03:51:14 +0100 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <1223626845.4349.5.camel@dijkstra.wildebeest.org> References: <48EE1885.9050005@redhat.com> <17c6771e0810091347ka76a7bev7e9c3ead3f0b070c@mail.gmail.com> <1223626845.4349.5.camel@dijkstra.wildebeest.org> Message-ID: <17c6771e0810121951s3f1ac819o8265df88e65c55ab@mail.gmail.com> 2008/10/10 Mark Wielaard : > Hi, > > On Thu, 2008-10-09 at 21:47 +0100, Andrew John Hughes wrote: >> 2008/10/9 Omair Majid : >> > Ioana and I have been working on creating a PulseAudio based Mixer and we >> > believe that it has become stable enough to include it as an optional build >> > in icedtea6. To do that, the pulseaudio source code needs to be put in the >> > pulseaudio folder in icedtea and the attached patch needs to be applied. >> > >> > The configure option --enable-pulse-java is used to enable building the >> > PulseAudio based mixer. >> > >> > To compile icedtea with the pulseaudio-based mixer : >> > (assuming the icedtea-pulseaudio.patch file is in the current directory) >> > >> > hg clone http://icedtea.classpath.org/hg/icedtea6 >> > cd icedtea6 >> > # this next step wont be necessary once the pulse-java source code >> > # is commited to icedtea6 >> > hg clone http://icedtea.classpath.org/hg/pulseaudio >> > patch -p1 < ../icedtea-pulseaudio.patch >> > ./autogen.sh >> > ./configure --enable-pulse-java >> > make >> > >> > Please let me know if there are any concerns, comments or objections. >> >> Is the intention for this patch to represent how PulseAudio will be integrated? >> If so, I assume it won't be part of IcedTea but just an optional dependency? > > No, my impression was that we wanted the pulseaudio directory directly > into the icedtea repo. That would certainly be my preference. > Well, I don't really mind either way. If you want to have separate releases, it needs to be outside the IcedTea repository though. I expect we'll always be able to turn it off. > The only thing we need to think about is whether we also want to carry > over the revision history or that we keep around the pulseaudio repo for > historical reasons. I don't immediately know how easy it is to carry > over the changesets from one repo to a completely separate one. > Omair, Ioana, what do you want? > hg pull would do the job presumably. >> Comments: >> >> * PULSE_JAVA_DIR should be configurable by a --with-pulse-java-dir option. > > But not if we just add the directory to the repo. Indeed. > >> * I assume CC is called explicitly rather than using the usual automake rules >> (pulseaudio_SOURCES and the like) is because IcedTea itself is a bit >> non-standard. >> * The continued use of the test + if ! test -d $(ICEDTEA_BOOT_DIR) ; >> is worrying. >> I was already concerned about this from the current ecj invocations. >> Can we not just >> depend on the creation of the boot directory for targets that need it? >> Users tend to find >> this confusing as it is unclear at runtime which javac/jar/javah is >> being used and the duplication >> can lead to inaccuracies. > > What would the "correct" way be to express this in the Makefile.am? > Depend on $(BOOTSTRAP_DIRECTORY_STAMP) as visualvm does. >> Thanks for the contribution! > > Yes, I like to see this go in. I already tested it a bit and it seems to > work nicely. > > Cheers, > > Mark > > -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 02:08:20 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 09:08:20 +0000 Subject: [Bug 212] New: [plugin] applet at jigzone.com not working Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=212 Summary: [plugin] applet at jigzone.com not working Product: IcedTea Version: unspecified Platform: PC URL: https://bugs.launchpad.net/bugs/282570 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com Still fails (http://www.jigzone.com/puzzles/daily-jigsaw). applet loads forever, then redericts to an error page. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 02:44:58 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 09:44:58 +0000 Subject: [Bug 213] New: OpenJDK-6-jre freezes on simple midi app, sun JRE does not Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=213 Summary: OpenJDK-6-jre freezes on simple midi app, sun JRE does not Product: IcedTea Version: unspecified Platform: PC URL: https://bugs.launchpad.net/bugs/275672 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com Independent auf pulseaudio When running a simple app that gets a Sequencer object and exits, OpenJDK will create the object and not exit while sun-java6-jre (version 6-07-4ubuntu2) creates the object and properly exits. The proper behavior is the one Sun's java exhibits. Sample program (also attached): import javax.sound.midi.*; public class MusicTest1 { public void play() { try { Sequencer sequencer = MidiSystem.getSequencer(); System.out.println("Successfully got a sequencer"); } catch(MidiUnavailableException ex) { System.out.println("Bummer"); } } public static void main(String[] args) { MusicTest1 mt = new MusicTest1(); mt.play(); System.out.println("After play"); } } -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 02:52:10 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 09:52:10 +0000 Subject: [Bug 214] New: Unparseable date with OpenJDK6, works with SunJava6 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=214 Summary: Unparseable date with OpenJDK6, works with SunJava6 Product: IcedTea Version: unspecified Platform: PC URL: https://bugs.launchpad.net/bugs/275654 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com import java.util.*; DateFormat dp = new SimpleDateFormat("yyyyMMddHHmmss z"); Date start = dp.parse("20081001175000 CET"); returns "Unparseable date" on OpenJDK 6 on Ubuntu 8.04.1 server, but works with Sun Java 6 on Gentoo. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 02:52:41 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 09:52:41 +0000 Subject: [Bug 214] Unparseable date with OpenJDK6, works with SunJava6 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=214 ------- Comment #1 from doko at ubuntu.com 2008-10-13 09:52 ------- Created an attachment (id=112) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=112&action=view) test case -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 02:53:40 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 09:53:40 +0000 Subject: [Bug 213] OpenJDK-6-jre freezes on simple midi app, sun JRE does not Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=213 ------- Comment #1 from doko at ubuntu.com 2008-10-13 09:53 ------- Created an attachment (id=113) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=113&action=view) test case -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 03:55:21 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 10:55:21 +0000 Subject: [Bug 215] New: Java Applet Window cannot be closed Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=215 Summary: Java Applet Window cannot be closed Product: IcedTea Version: unspecified Platform: PC URL: https://bugs.launchpad.net/bugs/37330 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com Any implementation of Java (be it Sun's or the OpenJDK) suffers from this bug. Some Java Applet Windows cannot be closed when clicking on the close button (X) on the Window Manager title bar. This bug only affects Linux distributions. On MS Windows, the Applets work normally and they can be closed at will as any other window. Sites where this bug happens: http://www.chat-avenue.com/ http://www.elchat.com ...and pretty much any Applets that do not have an explicit close function within themselves. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 04:12:20 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 11:12:20 +0000 Subject: [Bug 216] New: OpenJDK java web start fails to open jnlp files version 1.5 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=216 Summary: OpenJDK java web start fails to open jnlp files version 1.5 Product: IcedTea Version: unspecified Platform: PC URL: https://bugs.launchpad.net/bugs/224800 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com When OpenJDK java web start is used, it can not open some jnlp files. For example, you can try the following ones : http://www.spark-angels.com/telecharger-1/ http://sweethome3d.sourceforge.net/SweetHome3D.jnlp If you open them through firefox, it downloads the necessary jars, but does not open the application. If you download the jnlp files and launch them whith javaws, you get the following error : netx: Spec version not supported (supports 1.0) These application work if you launch them with Sun Java 6 Web start. Netx seems to be the library used by openjdk to handle jnlp files. I checked the source code and it only supports 1.0 version of jnlp (see file Parser.java in package netx.jnlp). The examples above use version 1.5 of jnlp. What is annoying is that the upgrade from gutsy to hardy makes openjdk the default java alternative, even if Sun java 6 was installed. Thus, the jnlp files that were working under gusty do not work anymore under hardy. The workaround I currently use is to choose another location when firefox prompts me which application to use for jnlp files : I specify /usr/lib/jvm/java-6-sun/bin/javaws instead of "OpenJDK Java Web Start". So the jnlp files are opened with Sun Java instead of openjdk : I still need to keep Sun java. The solution would be, I guess, to make netx support 1.5 jnlp files. But this project doesn't seem to be updated for years... -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 04:51:33 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 11:51:33 +0000 Subject: [Bug 213] OpenJDK-6-jre freezes on simple midi app, sun JRE does not Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=213 ------- Comment #2 from kalli at bigfoot.com 2008-10-13 11:51 ------- The fault is in Gervill synthesizer. It created two non-daemon threads which prevented the VM to exit when the synthesizer was open. And MidiSystem.getSequencer() causes the synthesizer to be open, regardless if you don't call open() on the sequencer object. This has been fixed in Gervill CVS. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 09:24:09 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 16:24:09 +0000 Subject: [Bug 217] New: LiveConnect applet to JS communication does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 Summary: LiveConnect applet to JS communication does not work Product: IcedTea Version: unspecified Platform: PC URL: https://bugs.launchpad.net/bugs/282762 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com JS to Applet communication work but applet to JS communication does not work. You can verify this with the apple liveconnect test at http://developer.apple.com/internet/safari/samples/ColorBlockApplet.html You'll see the color change when you click on the buttons but when you double click the applet there is no alert message. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 12:59:21 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 19:59:21 +0000 Subject: [Bug 217] LiveConnect applet to JS communication does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 dbhole at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from dbhole at redhat.com 2008-10-13 19:59 ------- This is a bug in the applet page. Liveconnect specifications state that MAYSCRIPT must be specified for Java->JS to work[1]. The ColorBlockApplet does not set this. 1. http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/java_js.html#enabling -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 13:07:49 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 20:07:49 +0000 Subject: [Bug 215] Java Applet Window cannot be closed Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=215 ------- Comment #1 from matthew.flaschen at gatech.edu 2008-10-13 20:07 ------- If Sun Java has the problem too, it should be reported to bugs.sun.com not here. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 13:37:24 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 20:37:24 +0000 Subject: [Bug 218] New: eclipse ganimede crash with open jdk 1.6 on fedora 9 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=218 Summary: eclipse ganimede crash with open jdk 1.6 on fedora 9 Product: IcedTea Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: blocker Priority: P5 Component: IcedTea AssignedTo: unassigned at icedtea.classpath.org ReportedBy: nessuno.itaca at gmail.com # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00f6736e, pid=3315, tid=5790608 # # Java VM: OpenJDK Client VM (1.6.0-b09 mixed mode linux-x86) # Problematic frame: # V [libjvm.so+0x16a36e] # # If you would like to submit a bug report, please visit: # http://icedtea.classpath.org/bugzilla # --------------- T H R E A D --------------- Current thread (0x09575800): VMThread [stack: 0x00505000,0x00586000] [id=3325] siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x00000004 Registers: EAX=0x00000004, EBX=0x0118ccd8, ECX=0xa92ec12c, EDX=0xa92ec12c ESP=0x00584ca0, EBP=0x00584cb8, ESI=0x9a402a90, EDI=0x9a402aa4 EIP=0x00f6736e, CR2=0x00000004, EFLAGS=0x00010202 Top of Stack: (sp=0x00584ca0) 0x00584ca0: 09575ee0 a92ec12c a92ec130 0118ccd8 0x00584cb0: 011a4884 00000001 00584cd8 0104597a 0x00584cc0: a92ebf90 9a402a68 00584cf8 0104594a 0x00584cd0: 0118ccd8 a7caa2d0 00584cf8 010462ec 0x00584ce0: 0075bff4 00003e80 00003e80 0118ccd8 0x00584cf0: 011a48ac 09523c40 00584d18 0104643c 0x00584d00: 011ad17c 015b7249 015b7188 00000000 0x00584d10: 0075d4f8 0118ccd8 00584d48 010d7a64 Instructions: (pc=0x00f6736e) 0x00f6735e: ff 00 00 8d 3c 86 39 f7 76 23 8b 06 85 c0 74 16 0x00f6736e: 8b 00 83 e0 03 83 f8 03 74 0c 83 ec 0c 56 e8 5f Stack: [0x00505000,0x00586000], sp=0x00584ca0, free space=511k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x16a36e] V [libjvm.so+0x24897a] V [libjvm.so+0x2492ec] V [libjvm.so+0x24943c] V [libjvm.so+0x2daa64] V [libjvm.so+0x306ee4] V [libjvm.so+0x2ab022] V [libjvm.so+0x155ac6] V [libjvm.so+0x158414] V [libjvm.so+0x1588db] V [libjvm.so+0x15f090] V [libjvm.so+0x2f594e] V [libjvm.so+0x1576bd] V [libjvm.so+0x157c94] V [libjvm.so+0x328064] V [libjvm.so+0x32dfc1] V [libjvm.so+0x32cb6a] V [libjvm.so+0x32d151] V [libjvm.so+0x32d515] V [libjvm.so+0x271b49] C [libpthread.so.0+0x632f] VM_Operation (0x038238cc): GenCollectFull, mode: safepoint, requested by thread 0x9703c000 --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x9703c000 JavaThread "Compiler Processing Task" daemon [_thread_blocked, id=3345, stack(0x037d4000,0x03825000)] 0x097df400 JavaThread "Thread-2" [_thread_blocked, id=3340, stack(0x03783000,0x037d4000)] 0x097a9800 JavaThread "Worker-2" [_thread_blocked, id=3339, stack(0x03732000,0x03783000)] 0x0a0c8800 JavaThread "Java indexing" daemon [_thread_blocked, id=3338, stack(0x036e1000,0x03732000)] 0x0a085c00 JavaThread "Thread-1" [_thread_blocked, id=3337, stack(0x05325000,0x05376000)] 0x09d3d400 JavaThread "Worker-1" [_thread_blocked, id=3336, stack(0x05193000,0x051e4000)] 0x09d9b000 JavaThread "Worker-0" [_thread_blocked, id=3335, stack(0x03690000,0x036e1000)] 0x097ec000 JavaThread "Start Level Event Dispatcher" daemon [_thread_blocked, id=3334, stack(0x0483f000,0x04890000)] 0x09828800 JavaThread "Framework Event Dispatcher" daemon [_thread_blocked, id=3333, stack(0x00d79000,0x00dca000)] 0x0981b800 JavaThread "State Data Manager" daemon [_thread_blocked, id=3332, stack(0x00b48000,0x00b99000)] 0x09591c00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3330, stack(0x00aa9000,0x00afa000)] 0x0958f000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3329, stack(0x00cf8000,0x00d79000)] 0x0958dc00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3328, stack(0x00a58000,0x00aa9000)] 0x09579c00 JavaThread "Finalizer" daemon [_thread_blocked, id=3327, stack(0x00a07000,0x00a58000)] 0x09578c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=3326, stack(0x00301000,0x00352000)] 0x0951fc00 JavaThread "main" [_thread_blocked, id=3315, stack(0xbf910000,0xbf960000)] ... -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 16:50:05 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 13 Oct 2008 23:50:05 +0000 Subject: [Bug 217] LiveConnect applet to JS communication does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 mubashir at kazia.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | ------- Comment #2 from mubashir at kazia.com 2008-10-13 23:50 ------- (In reply to comment #1) > This is a bug in the applet page. Liveconnect specifications state that > MAYSCRIPT must be specified for Java->JS to work[1]. The ColorBlockApplet does > not set this. > > 1. > http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/java_js.html#enabling > I tested after adding MAYSCRIPT tag it still does not work. It cannot find netscape.javascript.JSObject class. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Mon Oct 13 20:39:46 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 14 Oct 2008 03:39:46 +0000 Subject: [Bug 217] LiveConnect applet to JS communication does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 ------- Comment #3 from dbhole at redhat.com 2008-10-14 03:39 ------- Did you try it it with the new plugin (IcedTeaPlugin.so, built with --enable-liveconnect), or the old one? The old one (gcjwebplugin) is expected to throw that exception... -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Oct 14 07:47:36 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 14 Oct 2008 14:47:36 +0000 Subject: [Bug 217] LiveConnect applet to JS communication does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 ------- Comment #5 from dbhole at redhat.com 2008-10-14 14:47 ------- Assuming you are using the tip, the classes should be in rt.jar -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Oct 14 07:46:42 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 14 Oct 2008 14:46:42 +0000 Subject: [Bug 21] DataBuffers not compatible Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=21 ------- Comment #7 from dbhole at redhat.com 2008-10-14 14:46 ------- Assuming you are using the tip, the classes should be in rt.jar -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Oct 14 07:47:16 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 14 Oct 2008 14:47:16 +0000 Subject: [Bug 21] DataBuffers not compatible Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=21 ------- Comment #8 from dbhole at redhat.com 2008-10-14 14:47 ------- Pops, wrong bug. Ignore the message above please. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Oct 14 06:47:50 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 14 Oct 2008 13:47:50 +0000 Subject: [Bug 217] LiveConnect applet to JS communication does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 ------- Comment #4 from mubashir at kazia.com 2008-10-14 13:47 ------- Yes I can confirm that IcedTeaPlugin.so is used from Firefox3 in about:plugins. I also looked at the output when firefox is launched from command prompt. Can you tell me in which jar file netscape classes are supposed to be packaged? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From Dalibor.Topic at Sun.COM Tue Oct 14 08:40:40 2008 From: Dalibor.Topic at Sun.COM (Dalibor Topic) Date: Tue, 14 Oct 2008 17:40:40 +0200 Subject: Public open specs In-Reply-To: <1223541805.3958.3.camel@dijkstra.wildebeest.org> References: <20080917084136.GA10250@bamboo.destinee.acro.gen.nz> <48D0C79F.1080909@redhat.com> <20080917235155.GA10355@rivendell.middle-earth.co.uk> <20080918010821.GD10250@bamboo.destinee.acro.gen.nz> <17c6771e0809180328s3aeacca4m8a3969ba2abf4c84@mail.gmail.com> <1221735243.3256.14.camel@dijkstra.wildebeest.org> <48D25FA3.1010101@sun.com> <1221748023.3256.55.camel@dijkstra.wildebeest.org> <48D3779C.4090503@sun.com> <1221819427.3288.2.camel@dijkstra.wildebeest.org> <48D38203.8040609@sun.com> <1221821605.3288.10.camel@dijkstra.wildebeest.org> <48D38A0B.8070305@sun.com> <1222347445.3266.72.camel@dijkstra.wildebeest.org> <48DB92FC.3060100@sun.com> <1222940811.3265.12.camel@dijkstra.wildebeest.org> <1223541805.3958.3.camel@dijkstra.wildebeest.org> Message-ID: <48F4BD78.1060704@sun.com> Mark Wielaard wrote: > Got anything yet? Identified the process bottleneck, trying to figure out a fix. > Can Sun can publish the core Class File Specifications > under terms that are acceptable to the community, so that getting access > to the document doesn't take away any rights of publishing an > independent or openjdk based implementation under the GPL without the > restrictions on scope that the current terms 2 (a - c) inflict upon us > hackers? > Something like http://java.sun.com/docs/books/jvms/second_edition/ClassFileFormat-Java5.pdf ? cheers, dalibor topic -- ******************************************************************* Dalibor Topic Tel: (+49 40) 23 646 738 Java F/OSS Ambassador AIM: robiladonaim Sun Microsystems GmbH Mobile: (+49 177) 2664 192 Nagelsweg 55 http://openjdk.java.net D-20097 Hamburg mailto:Dalibor.Topic at sun.com Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht M?nchen: HRB 161028 Gesch?ftsf?hrer: Thomas Schr?der, Wolfgang Engels, Dr. Roland B?mer Vorsitzender des Aufsichtsrates: Martin H?ring From mark at klomp.org Tue Oct 14 08:46:13 2008 From: mark at klomp.org (Mark Wielaard) Date: Tue, 14 Oct 2008 17:46:13 +0200 Subject: Public open specs In-Reply-To: <48F4BD78.1060704@sun.com> References: <20080917084136.GA10250@bamboo.destinee.acro.gen.nz> <48D0C79F.1080909@redhat.com> <20080917235155.GA10355@rivendell.middle-earth.co.uk> <20080918010821.GD10250@bamboo.destinee.acro.gen.nz> <17c6771e0809180328s3aeacca4m8a3969ba2abf4c84@mail.gmail.com> <1221735243.3256.14.camel@dijkstra.wildebeest.org> <48D25FA3.1010101@sun.com> <1221748023.3256.55.camel@dijkstra.wildebeest.org> <48D3779C.4090503@sun.com> <1221819427.3288.2.camel@dijkstra.wildebeest.org> <48D38203.8040609@sun.com> <1221821605.3288.10.camel@dijkstra.wildebeest.org> <48D38A0B.8070305@sun.com> <1222347445.3266.72.camel@dijkstra.wildebeest.org> <48DB92FC.3060100@sun.com> <1222940811.3265.12.camel@dijkstra.wildebeest.org> <1223541805.3958.3.camel@dijkstra.wildebeest.org> <48F4BD78.1060704@sun.com> Message-ID: <1223999173.3470.11.camel@hermans.wildebeest.org> Hi Dalibor, On Tue, 2008-10-14 at 17:40 +0200, Dalibor Topic wrote: > Mark Wielaard wrote: > > Got anything yet? > Identified the process bottleneck, trying to figure out a fix. > > Can Sun can publish the core Class File Specifications > > under terms that are acceptable to the community, so that getting access > > to the document doesn't take away any rights of publishing an > > independent or openjdk based implementation under the GPL without the > > restrictions on scope that the current terms 2 (a - c) inflict upon us > > hackers? > > > Something like > http://java.sun.com/docs/books/jvms/second_edition/ClassFileFormat-Java5.pdf > ? Yes indeed, something like that also for the Java6 version would be ideal. Is that available? Thanks, Mark From bugzilla-daemon at icedtea.classpath.org Tue Oct 14 09:33:28 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 14 Oct 2008 16:33:28 +0000 Subject: [Bug 217] LiveConnect applet to JS communication does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 ------- Comment #6 from mubashir at kazia.com 2008-10-14 16:33 ------- I'm using ubuntu intrepid compiled package version 6b12-pre2-0ubuntu2 and the only Netscape class that is in rt.jar is sun.security.x509.NetscapeCertTypeExtention. There are no netscape JS classes. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Oct 14 09:47:56 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 14 Oct 2008 16:47:56 +0000 Subject: [Bug 217] LiveConnect applet to JS communication does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 ------- Comment #7 from dbhole at redhat.com 2008-10-14 16:47 ------- Hmm, AFAIK Ubuntu does not compile with liveconnect support. And if it did, it should have had the classes in rt.jar. Can you post the output of about:plugins? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Tue Oct 14 10:30:02 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 14 Oct 2008 17:30:02 +0000 Subject: changeset in /hg/icedtea6: 2008-10-14 Omair Majid changeset a28576af0d10 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a28576af0d10 description: 2008-10-14 Omair Majid * .hgignore: Added generated files to ignore list. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java (EventLoop): Initialize eventLoop object on construction. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java (PulseAudioClip): Removed the parameter eventLoop. (getMicrosecondLength): Return time in microseconds. (getMicrosecondPosition): Likewise. (open): Dont throw an exception if Mixer is not open. Let super handle it. (setFramePosition): Check frame position for being positive. (setLoopPoints): Check that the starting frame is valid. (setMicrosecondPosition): Deal with negative value and values over the maximum. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java (open): Open the mixer if it isnt open. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java (getLine): Dont pass eventLoop as a paramter. (close): Close all open lines on exit. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java (PulseAudioPort): Modified to not take an EventLoop paramter. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (PulseAudioSourceDataLine): Likewise. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java (PulseAudioSourcePort): Likewise. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java (PulseAudioTargetDataLine): Likewise. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java (PulseAudioTargetPort): Likewise. * pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java (testMixerKnowsAboutOpenLines): Work even if mixer has some lines initially open. diffstat: 12 files changed, 135 insertions(+), 74 deletions(-) .hgignore | 4 ChangeLog | 36 ++++++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java | 2 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 33 +++--- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 11 +- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java | 55 ++++++---- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java | 12 +- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 5 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java | 28 ++--- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 5 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java | 8 - pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java | 10 - diffs (495 lines): diff -r 9032c6fda5c2 -r a28576af0d10 .hgignore --- a/.hgignore Sun Oct 12 16:31:50 2008 +0200 +++ b/.hgignore Tue Oct 14 13:26:35 2008 -0400 @@ -441,3 +441,7 @@ rt/java/io/ rt/java/io/ rt/sun/awt generated/sun/awt/X11/generator/sizer.32.orig +pulseaudio/bin +pulseaudio/.*\.o +pulseaudio/src/native/org_.*.h +pulseaudio/.*jar diff -r 9032c6fda5c2 -r a28576af0d10 ChangeLog --- a/ChangeLog Sun Oct 12 16:31:50 2008 +0200 +++ b/ChangeLog Tue Oct 14 13:26:35 2008 -0400 @@ -1,3 +1,39 @@ 2008-10-12 Matthias Klose + + * .hgignore: Added generated files to ignore list. + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java + (EventLoop): Initialize eventLoop object on construction. + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java + (PulseAudioClip): Removed the parameter eventLoop. + (getMicrosecondLength): Return time in microseconds. + (getMicrosecondPosition): Likewise. + (open): Dont throw an exception if Mixer is not open. Let super handle it. + (setFramePosition): Check frame position for being positive. + (setLoopPoints): Check that the starting frame is valid. + (setMicrosecondPosition): Deal with negative value and values over the + maximum. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java + (open): Open the mixer if it isnt open. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java + (getLine): Dont pass eventLoop as a paramter. + (close): Close all open lines on exit. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java + (PulseAudioPort): Modified to not take an EventLoop paramter. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java + (PulseAudioSourceDataLine): Likewise. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java + (PulseAudioSourcePort): Likewise. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java + (PulseAudioTargetDataLine): Likewise. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java + (PulseAudioTargetPort): Likewise. + + * pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java + (testMixerKnowsAboutOpenLines): Work even if mixer has some lines + initially open. + 2008-10-12 Matthias Klose * Makefile.am (stamps/pulse-java.stamp): Add -I$(ICEDTEA_BOOT_DIR)/include diff -r 9032c6fda5c2 -r a28576af0d10 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Sun Oct 12 16:31:50 2008 +0200 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java Tue Oct 14 13:26:35 2008 -0400 @@ -110,7 +110,7 @@ public class EventLoop implements Runnab private EventLoop() { contextListeners = new ArrayList(); - + threadLock = new Object(); } synchronized public static EventLoop getEventLoop() { diff -r 9032c6fda5c2 -r a28576af0d10 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Sun Oct 12 16:31:50 2008 +0200 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Tue Oct 14 13:26:35 2008 -0400 @@ -194,10 +194,8 @@ public class PulseAudioClip extends Puls stream.removeWriteListener(writeListener); } - public PulseAudioClip(EventLoop eventLoop, AudioFormat[] formats, - AudioFormat defaultFormat) { + public PulseAudioClip(AudioFormat[] formats, AudioFormat defaultFormat) { supportedFormats = formats; - this.eventLoop = eventLoop; this.defaultFormat = defaultFormat; this.currentFormat = defaultFormat; this.volume = PulseAudioVolumeControl.MAX_VOLUME; @@ -342,7 +340,7 @@ public class PulseAudioClip extends Puls return AudioSystem.NOT_SPECIFIED; } synchronized (clipLock) { - return frameCount / currentFormat.getFrameSize(); + return (long) (frameCount / currentFormat.getFrameRate() * 1000); } } @@ -353,7 +351,7 @@ public class PulseAudioClip extends Puls } synchronized (clipLock) { - return framesSinceOpen / currentFormat.getFrameSize(); + return (long) (framesSinceOpen / currentFormat.getFrameRate() * 1000); } } @@ -397,11 +395,6 @@ public class PulseAudioClip extends Puls @Override public void open(AudioFormat format, byte[] data, int offset, int bufferSize) throws LineUnavailableException { - - if(!PulseAudioMixer.getInstance().isOpen()) { - throw new LineUnavailableException("The mixer needs to be opened before opening a line"); - } - /* check for permission to play audio */ AudioPermission perm = new AudioPermission("play", null); @@ -472,7 +465,7 @@ public class PulseAudioClip extends Puls throw new IllegalStateException("Line not open"); } - if (frames > frameCount) { + if (frames < 0 || frames > frameCount) { throw new IllegalArgumentException("incorreft frame value"); } @@ -497,6 +490,11 @@ public class PulseAudioClip extends Puls "ending point must be greater than or equal to the starting point"); } + if (start < 0) { + throw new IllegalArgumentException( + "starting point must be greater than or equal to 0"); + } + synchronized (clipLock) { startFrame = start; endFrame = end; @@ -510,7 +508,16 @@ public class PulseAudioClip extends Puls throw new IllegalStateException("Line not open"); } - float frameIndex = microseconds * currentFormat.getFrameRate(); + float frameIndex = microseconds * currentFormat.getFrameRate() / 1000; + + /* make frameIndex positive */ + while (frameIndex < 0) { + frameIndex += frameCount; + } + + /* frameIndex is in the range [0, frameCount-1], inclusive */ + frameIndex = frameIndex % frameCount; + synchronized (clipLock) { currentFrame = (int) frameIndex; } @@ -563,7 +570,7 @@ public class PulseAudioClip extends Puls super.stop(); } - + public javax.sound.sampled.Line.Info getLineInfo() { return new DataLine.Info(Clip.class, supportedFormats, StreamBufferAttributes.MIN_VALUE, diff -r 9032c6fda5c2 -r a28576af0d10 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Sun Oct 12 16:31:50 2008 +0200 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Tue Oct 14 13:26:35 2008 -0400 @@ -84,10 +84,13 @@ public abstract class PulseAudioDataLine if (isOpen) { throw new IllegalStateException("Line is already open"); } - if(!PulseAudioMixer.getInstance().isOpen()) { - throw new LineUnavailableException("The mixer needs to be opened before opening a line"); - } - + + PulseAudioMixer mixer = PulseAudioMixer.getInstance(); + if(!mixer.isOpen()) { + mixer.open(); + } + + eventLoop = EventLoop.getEventLoop(); createStream(format); addStreamListeners(); diff -r 9032c6fda5c2 -r a28576af0d10 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Sun Oct 12 16:31:50 2008 +0200 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioMixer.java Tue Oct 14 13:26:35 2008 -0400 @@ -43,6 +43,7 @@ import java.net.UnknownHostException; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.concurrent.Semaphore; @@ -301,8 +302,7 @@ public class PulseAudioMixer implements AudioPermission perm = new AudioPermission("play", null); perm.checkGuard(null); - return new PulseAudioSourceDataLine(eventLoop, formats, - defaultFormat); + return new PulseAudioSourceDataLine(formats, defaultFormat); } if ((info.getLineClass() == TargetDataLine.class)) { @@ -310,8 +310,7 @@ public class PulseAudioMixer implements AudioPermission perm = new AudioPermission("record", null); perm.checkGuard(null); - return new PulseAudioTargetDataLine(eventLoop, formats, - defaultFormat); + return new PulseAudioTargetDataLine(formats, defaultFormat); } if ((info.getLineClass() == Clip.class)) { @@ -319,15 +318,15 @@ public class PulseAudioMixer implements AudioPermission perm = new AudioPermission("play", null); perm.checkGuard(null); - return new PulseAudioClip(eventLoop, formats, defaultFormat); + return new PulseAudioClip(formats, defaultFormat); } if (Port.Info.class.isInstance(info)) { Port.Info portInfo = (Port.Info) info; if (portInfo.isSource()) { - return new PulseAudioSourcePort(portInfo.getName(), eventLoop); + return new PulseAudioSourcePort(portInfo.getName()); } else { - return new PulseAudioTargetPort(portInfo.getName(), eventLoop); + return new PulseAudioTargetPort(portInfo.getName()); } } @@ -507,6 +506,35 @@ public class PulseAudioMixer implements throw new IllegalStateException("Mixer is not open; cant close"); } + List linesToClose = new LinkedList(); + linesToClose.addAll(sourceLines); + if (sourceLines.size() > 0) { + linesToClose.addAll(sourceLines); + for (Line line : linesToClose) { + if (line.isOpen()) { + System.out + .println("PulseAudioMixer: DEBUG: some source lines have not been closed"); + line.close(); + } + } + } + linesToClose.clear(); + + if (targetLines.size() > 0) { + linesToClose.addAll(targetLines); + for (Line line : linesToClose) { + if (line.isOpen()) { + System.out + .println("PulseAudioMixer: DEBUG: some target lines have not been closed"); + line.close(); + } + } + } + + synchronized (lineListeners) { + lineListeners.clear(); + } + eventLoopThread.interrupt(); try { @@ -519,19 +547,6 @@ public class PulseAudioMixer implements // System.out.println(this.getClass().getName() + ": closed"); isOpen = false; - - if (sourceLines.size() > 0) { - System.out.println("DEBUG: some source lines have not been closed"); - assert (sourceLines.size() < 0); // always fail - } - if (targetLines.size() > 0) { - System.out.println("DEBUG: some target lines have not been closed"); - assert (targetLines.size() < 0); // always fail - } - - synchronized (lineListeners) { - lineListeners.clear(); - } refreshSourceAndTargetLines(); diff -r 9032c6fda5c2 -r a28576af0d10 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Sun Oct 12 16:31:50 2008 +0200 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPort.java Tue Oct 14 13:26:35 2008 -0400 @@ -66,25 +66,25 @@ public abstract class PulseAudioPort ext System.loadLibrary("pulse-java"); } - public PulseAudioPort(String name, EventLoop eventLoop) { + public PulseAudioPort(String name) { this.name = name; + this.eventLoop = EventLoop.getEventLoop(); this.contextPointer = eventLoop.getContextPointer(); - this.eventLoop = eventLoop; + updateVolumeInfo(); volumeControl = new PulseAudioVolumeControl(this, eventLoop); controls.add(volumeControl); muteControl = new PulseAudioMuteControl(this, volumeControl); controls.add(muteControl); - //isOpen = true; - open(); + /* * unlike other lines, Ports must either be open or close * * close = no sound. open = sound * */ - // FIXME open(); + open(); // System.out.println("Opened Target Port " + name); } @@ -141,7 +141,7 @@ public abstract class PulseAudioPort ext @Override public void open() { - if(isOpen) { + if (isOpen) { return; } native_setVolume(volume); diff -r 9032c6fda5c2 -r a28576af0d10 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Sun Oct 12 16:31:50 2008 +0200 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java Tue Oct 14 13:26:35 2008 -0400 @@ -54,11 +54,10 @@ public class PulseAudioSourceDataLine ex private boolean muted; private float volume; - public PulseAudioSourceDataLine(EventLoop eventLoop, AudioFormat[] formats, + public PulseAudioSourceDataLine(AudioFormat[] formats, AudioFormat defaultFormat) { this.supportedFormats = formats; - this.eventLoop = eventLoop; this.lineListeners = new ArrayList(); this.defaultFormat = defaultFormat; this.currentFormat = defaultFormat; @@ -69,7 +68,7 @@ public class PulseAudioSourceDataLine ex synchronized public void open(AudioFormat format, int bufferSize) throws LineUnavailableException { - /* check for permmission to play audio */ + /* check for permission to play audio */ AudioPermission perm = new AudioPermission("play", null); perm.checkGuard(null); diff -r 9032c6fda5c2 -r a28576af0d10 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Sun Oct 12 16:31:50 2008 +0200 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java Tue Oct 14 13:26:35 2008 -0400 @@ -43,43 +43,43 @@ public class PulseAudioSourcePort extend public class PulseAudioSourcePort extends PulseAudioPort { /* aka mic */ - + static { System.loadLibrary("pulse-java"); } - public PulseAudioSourcePort(String name, EventLoop eventLoop) { - super(name, eventLoop); + public PulseAudioSourcePort(String name) { + super(name); } public void open() { - + /* check for permission to record audio */ AudioPermission perm = new AudioPermission("record", null); perm.checkGuard(null); - + super.open(); - + PulseAudioMixer parent = PulseAudioMixer.getInstance(); parent.addSourceLine(this); } - + public void close() { - + /* check for permission to record audio */ AudioPermission perm = new AudioPermission("record", null); perm.checkGuard(null); - + if (!isOpen) { throw new IllegalStateException("Port is not open; so cant close"); } - + PulseAudioMixer parent = PulseAudioMixer.getInstance(); parent.removeSourceLine(this); - - super.close(); + + super.close(); } - + public native byte[] native_setVolume(float newValue); public synchronized native byte[] native_updateVolumeInfo(); @@ -88,7 +88,5 @@ public class PulseAudioSourcePort extend public javax.sound.sampled.Line.Info getLineInfo() { return new Port.Info(Port.class, getName(), false); } - - } diff -r 9032c6fda5c2 -r a28576af0d10 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Sun Oct 12 16:31:50 2008 +0200 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Tue Oct 14 13:26:35 2008 -0400 @@ -61,10 +61,9 @@ public class PulseAudioTargetDataLine ex boolean flushed = false; boolean drained = false; - public PulseAudioTargetDataLine(EventLoop eventLoop, AudioFormat[] formats, + public PulseAudioTargetDataLine(AudioFormat[] formats, AudioFormat defaultFormat) { supportedFormats = formats; - this.eventLoop = eventLoop; this.defaultFormat = defaultFormat; this.currentFormat = defaultFormat; @@ -363,7 +362,7 @@ public class PulseAudioTargetDataLine ex fireLineEvent(new LineEvent(this, LineEvent.Type.STOP, framesSinceOpen)); } - + public javax.sound.sampled.Line.Info getLineInfo() { return new DataLine.Info(TargetDataLine.class, supportedFormats, StreamBufferAttributes.MIN_VALUE, diff -r 9032c6fda5c2 -r a28576af0d10 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Sun Oct 12 16:31:50 2008 +0200 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java Tue Oct 14 13:26:35 2008 -0400 @@ -48,9 +48,9 @@ public class PulseAudioTargetPort extend System.loadLibrary("pulse-java"); } - public PulseAudioTargetPort(String name, EventLoop eventLoop) { + public PulseAudioTargetPort(String name) { - super(name, eventLoop); + super(name); } public void open() { @@ -70,11 +70,11 @@ public class PulseAudioTargetPort extend /* check for permission to play audio */ AudioPermission perm = new AudioPermission("play", null); perm.checkGuard(null); - + if (!isOpen) { throw new IllegalStateException("not open, so cant close Port"); } - + PulseAudioMixer parent = PulseAudioMixer.getInstance(); parent.removeTargetLine(this); diff -r 9032c6fda5c2 -r a28576af0d10 pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java --- a/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java Sun Oct 12 16:31:50 2008 +0200 +++ b/pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLineTest.java Tue Oct 14 13:26:35 2008 -0400 @@ -536,11 +536,11 @@ public class PulseAudioTargetDataLineTes targetDataLine = (TargetDataLine) mixer.getLine(new Line.Info( TargetDataLine.class)); - Assert.assertEquals(0, mixer.getTargetLines().length); - targetDataLine.open(); - Assert.assertEquals(1, mixer.getTargetLines().length); - targetDataLine.close(); - Assert.assertEquals(0, mixer.getTargetLines().length); + int initiallyOpen = mixer.getTargetLines().length; + targetDataLine.open(); + Assert.assertEquals(initiallyOpen+1, mixer.getTargetLines().length); + targetDataLine.close(); + Assert.assertEquals(initiallyOpen, mixer.getTargetLines().length); } From omajid at redhat.com Tue Oct 14 10:30:02 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 14 Oct 2008 17:30:02 +0000 Subject: changeset in /hg/icedtea6: 2008-10-14 Omair Majid changeset 81e9c55169c4 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=81e9c55169c4 description: 2008-10-14 Omair Majid * Makefile.am (stamps/pulse-java.stamp): Added -I$(ICEDTEA_BOOT_DIR)/include/linux. diffstat: 2 files changed, 12 insertions(+), 6 deletions(-) ChangeLog | 6 ++++++ Makefile.am | 12 ++++++------ diffs (35 lines): diff -r a28576af0d10 -r 81e9c55169c4 ChangeLog --- a/ChangeLog Tue Oct 14 13:26:35 2008 -0400 +++ b/ChangeLog Tue Oct 14 13:29:55 2008 -0400 @@ -1,3 +1,9 @@ 2008-10-14 Omair Majid + + * Makefile.am (stamps/pulse-java.stamp): Added + -I$(ICEDTEA_BOOT_DIR)/include/linux. + + 2008-10-14 Omair Majid * .hgignore: Added generated files to ignore list. diff -r a28576af0d10 -r 81e9c55169c4 Makefile.am --- a/Makefile.am Tue Oct 14 13:26:35 2008 -0400 +++ b/Makefile.am Tue Oct 14 13:29:55 2008 -0400 @@ -1421,12 +1421,12 @@ endif stamps/pulse-java.stamp: stamps/pulse-java-jar.stamp stamps/pulse-java-headers.stamp if ENABLE_PULSE_JAVA - $(CC) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/jni-common.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_EventLoop.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Operation.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Stream.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c - $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c + $(CC) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/jni-common.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_EventLoop.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Operation.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Stream.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c + $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c $(CC) $(LDFLAGS) -shared $(LIBPULSE_LIBS) -o libpulse-java.so org_*pulseaudio*.o jni-common.o mv org_classpath_icedtea_pulseaudio_*.o $(PULSE_JAVA_CLASS_DIR) endif From Dalibor.Topic at Sun.COM Tue Oct 14 10:55:42 2008 From: Dalibor.Topic at Sun.COM (Dalibor Topic) Date: Tue, 14 Oct 2008 19:55:42 +0200 Subject: Public open specs In-Reply-To: <1223999173.3470.11.camel@hermans.wildebeest.org> References: <20080917084136.GA10250@bamboo.destinee.acro.gen.nz> <48D0C79F.1080909@redhat.com> <20080917235155.GA10355@rivendell.middle-earth.co.uk> <20080918010821.GD10250@bamboo.destinee.acro.gen.nz> <17c6771e0809180328s3aeacca4m8a3969ba2abf4c84@mail.gmail.com> <1221735243.3256.14.camel@dijkstra.wildebeest.org> <48D25FA3.1010101@sun.com> <1221748023.3256.55.camel@dijkstra.wildebeest.org> <48D3779C.4090503@sun.com> <1221819427.3288.2.camel@dijkstra.wildebeest.org> <48D38203.8040609@sun.com> <1221821605.3288.10.camel@dijkstra.wildebeest.org> <48D38A0B.8070305@sun.com> <1222347445.3266.72.camel@dijkstra.wildebeest.org> <48DB92FC.3060100@sun.com> <1222940811.3265.12.camel@dijkstra.wildebeest.org> <1223541805.3958.3.camel@dijkstra.wildebeest.org> <48F4BD78.1060704@sun.com> <1223999173.3470.11.camel@hermans.wildebeest.org> Message-ID: <48F4DD1E.6000106@sun.com> Mark Wielaard wrote: >> Something like >> http://java.sun.com/docs/books/jvms/second_edition/ClassFileFormat-Java5.pdf >> ? >> > > Yes indeed, something like that also for the Java6 version would be > ideal. Is that available? > Not yet (outside the JSR spec document). The process bottleneck is identified, working on a fix. cheers, dalibor topic ******************************************************************* Dalibor Topic Tel: (+49 40) 23 646 738 Java F/OSS Ambassador AIM: robiladonaim Sun Microsystems GmbH Mobile: (+49 177) 2664 192 Nagelsweg 55 http://openjdk.java.net D-20097 Hamburg mailto:Dalibor.Topic at sun.com Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht M?nchen: HRB 161028 Gesch?ftsf?hrer: Thomas Schr?der, Wolfgang Engels, Dr. Roland B?mer Vorsitzender des Aufsichtsrates: Martin H?ring From omajid at redhat.com Tue Oct 14 12:10:37 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 14 Oct 2008 19:10:37 +0000 Subject: changeset in /hg/icedtea6: 2008-10-14 Omair Majid changeset d5201ed0410a in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d5201ed0410a description: 2008-10-14 Omair Majid * .hgignore: Added pulse-java.jar to ignore list. * Makefile.am: Move jni-common.o out of the way when done. diffstat: 3 files changed, 7 insertions(+) .hgignore | 1 + ChangeLog | 5 +++++ Makefile.am | 1 + diffs (31 lines): diff -r 81e9c55169c4 -r d5201ed0410a .hgignore --- a/.hgignore Tue Oct 14 13:29:55 2008 -0400 +++ b/.hgignore Tue Oct 14 15:08:24 2008 -0400 @@ -445,3 +445,4 @@ pulseaudio/.*\.o pulseaudio/.*\.o pulseaudio/src/native/org_.*.h pulseaudio/.*jar +pulse-java.jar diff -r 81e9c55169c4 -r d5201ed0410a ChangeLog --- a/ChangeLog Tue Oct 14 13:29:55 2008 -0400 +++ b/ChangeLog Tue Oct 14 15:08:24 2008 -0400 @@ -1,3 +1,8 @@ 2008-10-14 Omair Majid + + * .hgignore: Added pulse-java.jar to ignore list. + * Makefile.am: Move jni-common.o out of the way when done. + 2008-10-14 Omair Majid * Makefile.am (stamps/pulse-java.stamp): Added diff -r 81e9c55169c4 -r d5201ed0410a Makefile.am --- a/Makefile.am Tue Oct 14 13:29:55 2008 -0400 +++ b/Makefile.am Tue Oct 14 15:08:24 2008 -0400 @@ -1429,6 +1429,7 @@ if ENABLE_PULSE_JAVA $(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c $(CC) $(LDFLAGS) -shared $(LIBPULSE_LIBS) -o libpulse-java.so org_*pulseaudio*.o jni-common.o mv org_classpath_icedtea_pulseaudio_*.o $(PULSE_JAVA_CLASS_DIR) + mv jni-common.o $(PULSE_JAVA_CLASS_DIR) endif mkdir -p stamps touch stamps/pulse-java.stamp From omajid at redhat.com Tue Oct 14 12:10:38 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 14 Oct 2008 19:10:38 +0000 Subject: changeset in /hg/icedtea6: merged changes Message-ID: changeset 1a6322fdedc7 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1a6322fdedc7 description: merged changes diffstat: 2 files changed, 5 insertions(+) ChangeLog | 4 ++++ INSTALL | 1 + diffs (25 lines): diff -r d5201ed0410a -r 1a6322fdedc7 ChangeLog --- a/ChangeLog Tue Oct 14 15:08:24 2008 -0400 +++ b/ChangeLog Tue Oct 14 15:10:15 2008 -0400 @@ -2,6 +2,10 @@ 2008-10-14 Omair Majid + + * INSTALL: Updated requirements. 2008-10-14 Omair Majid diff -r d5201ed0410a -r 1a6322fdedc7 INSTALL --- a/INSTALL Tue Oct 14 15:08:24 2008 -0400 +++ b/INSTALL Tue Oct 14 15:10:15 2008 -0400 @@ -31,6 +31,7 @@ zlib-devel zlib-devel rhino netbeans (harness, platform8, apisupport1, java2, ide9) - for visualvm +jakarta-commons-logging - for visualvm For builing the PulseAudio based mixer, you will need pulseaudio-libs-devel >= 0.9.11 From langel at towel.yyz.redhat.com Tue Oct 14 11:51:06 2008 From: langel at towel.yyz.redhat.com (langel at towel.yyz.redhat.com) Date: Tue, 14 Oct 2008 18:51:06 +0000 Subject: changeset in /hg/icedtea6: Updated build req Message-ID: changeset d4d94a0dc23c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d4d94a0dc23c description: Updated build req diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 5 ++++- INSTALL | 1 + diffs (27 lines): diff -r 81e9c55169c4 -r d4d94a0dc23c ChangeLog --- a/ChangeLog Tue Oct 14 13:29:55 2008 -0400 +++ b/ChangeLog Tue Oct 14 14:50:57 2008 -0400 @@ -1,8 +1,11 @@ 2008-10-14 Omair Majid + + * INSTALL: Updated requirements. + 2008-10-14 Omair Majid * Makefile.am (stamps/pulse-java.stamp): Added -I$(ICEDTEA_BOOT_DIR)/include/linux. - 2008-10-14 Omair Majid diff -r 81e9c55169c4 -r d4d94a0dc23c INSTALL --- a/INSTALL Tue Oct 14 13:29:55 2008 -0400 +++ b/INSTALL Tue Oct 14 14:50:57 2008 -0400 @@ -31,6 +31,7 @@ zlib-devel zlib-devel rhino netbeans (harness, platform8, apisupport1, java2, ide9) - for visualvm +jakarta-commons-logging - for visualvm For builing the PulseAudio based mixer, you will need pulseaudio-libs-devel >= 0.9.11 From omajid at redhat.com Tue Oct 14 12:14:32 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 14 Oct 2008 19:14:32 +0000 Subject: changeset in /hg/icedtea6: 2008-10-14 Omair Majid changeset 3bd6f023d027 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=3bd6f023d027 description: 2008-10-14 Omair Majid * Makefile.am (clean-pulse-java): Dont attempt to remove jni-common.o current directory. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ Makefile.am | 1 - diffs (23 lines): diff -r 1a6322fdedc7 -r 3bd6f023d027 ChangeLog --- a/ChangeLog Tue Oct 14 15:10:15 2008 -0400 +++ b/ChangeLog Tue Oct 14 15:14:09 2008 -0400 @@ -1,3 +1,8 @@ 2008-10-14 Omair Majid + + * Makefile.am (clean-pulse-java): Dont attempt to remove jni-common.o from + current directory. + 2008-10-14 Omair Majid * .hgignore: Added pulse-java.jar to ignore list. diff -r 1a6322fdedc7 -r 3bd6f023d027 Makefile.am --- a/Makefile.am Tue Oct 14 15:10:15 2008 -0400 +++ b/Makefile.am Tue Oct 14 15:14:09 2008 -0400 @@ -1500,7 +1500,6 @@ if ENABLE_PULSE_JAVA rm -f stamps/pulse-java*.stamp rm -f pulse-java.jar rm -f libpulse-java.so - rm -f jni-common.o endif # end of pulse-java From langel at towel.yyz.redhat.com Tue Oct 14 13:34:16 2008 From: langel at towel.yyz.redhat.com (langel at towel.yyz.redhat.com) Date: Tue, 14 Oct 2008 20:34:16 +0000 Subject: changeset in /hg/icedtea6: Updated .hgignore Message-ID: changeset 57849268c9e4 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=57849268c9e4 description: Updated .hgignore diffstat: 1 file changed, 6 insertions(+) .hgignore | 6 ++++++ diffs (23 lines): diff -r 3bd6f023d027 -r 57849268c9e4 .hgignore --- a/.hgignore Tue Oct 14 15:14:09 2008 -0400 +++ b/.hgignore Tue Oct 14 16:34:12 2008 -0400 @@ -23,6 +23,7 @@ javac javac javap gcjwebplugin.so +jni-common.o IcedTeaPlugin.o IcedTeaPlugin.so extra-source-files.txt @@ -440,6 +441,11 @@ rt/javax/net/ssl/X509TrustManager.java rt/javax/net/ssl/X509TrustManager.java rt/java/io/ rt/sun/awt +rt/netscape/javascript/JSException.java +rt/netscape/javascript/JSObject.java +rt/netscape/javascript/JSProxy.java +rt/netscape/javascript/JSRunnable.java +rt/netscape/javascript/JSUtil.java generated/sun/awt/X11/generator/sizer.32.orig pulseaudio/bin pulseaudio/.*\.o From omajid at redhat.com Tue Oct 14 13:50:57 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 14 Oct 2008 20:50:57 +0000 Subject: changeset in /hg/icedtea6: 2008-10-14 Omair Majid changeset 6864d36c44dd in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6864d36c44dd description: 2008-10-14 Omair Majid * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java (read): Commented out debug output. diffstat: 2 files changed, 8 insertions(+), 2 deletions(-) ChangeLog | 5 +++++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java | 5 +++-- diffs (27 lines): diff -r 3bd6f023d027 -r 6864d36c44dd ChangeLog --- a/ChangeLog Tue Oct 14 15:14:09 2008 -0400 +++ b/ChangeLog Tue Oct 14 16:49:14 2008 -0400 @@ -1,3 +1,8 @@ 2008-10-14 Omair Majid + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java + (read): Commented out debug output. + 2008-10-14 Omair Majid * Makefile.am (clean-pulse-java): Dont attempt to remove jni-common.o from diff -r 3bd6f023d027 -r 6864d36c44dd pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Tue Oct 14 15:14:09 2008 -0400 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java Tue Oct 14 16:49:14 2008 -0400 @@ -230,8 +230,9 @@ public class PulseAudioTargetDataLine ex stream.drop(); if (currentFragment == null) { - System.out - .println("DEBUG: PulseAudioTargetDataLine:read(): error in stream.peek()"); + // System.out + // .println("DEBUG: PulseAudioTargetDataLine:read(): + // error in stream.peek()"); continue; } From omajid at redhat.com Tue Oct 14 13:50:58 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 14 Oct 2008 20:50:58 +0000 Subject: changeset in /hg/icedtea6: merged changes Message-ID: changeset 1280e56de291 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1280e56de291 description: merged changes diffstat: 1 file changed, 6 insertions(+) .hgignore | 6 ++++++ diffs (23 lines): diff -r 6864d36c44dd -r 1280e56de291 .hgignore --- a/.hgignore Tue Oct 14 16:49:14 2008 -0400 +++ b/.hgignore Tue Oct 14 16:50:34 2008 -0400 @@ -23,6 +23,7 @@ javac javac javap gcjwebplugin.so +jni-common.o IcedTeaPlugin.o IcedTeaPlugin.so extra-source-files.txt @@ -440,6 +441,11 @@ rt/javax/net/ssl/X509TrustManager.java rt/javax/net/ssl/X509TrustManager.java rt/java/io/ rt/sun/awt +rt/netscape/javascript/JSException.java +rt/netscape/javascript/JSObject.java +rt/netscape/javascript/JSProxy.java +rt/netscape/javascript/JSRunnable.java +rt/netscape/javascript/JSUtil.java generated/sun/awt/X11/generator/sizer.32.orig pulseaudio/bin pulseaudio/.*\.o From omajid at redhat.com Tue Oct 14 13:58:21 2008 From: omajid at redhat.com (Omair Majid) Date: Tue, 14 Oct 2008 20:58:21 +0000 Subject: changeset in /hg/icedtea6: 2008-10-14 Omair Majid changeset 53383766dc24 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=53383766dc24 description: 2008-10-14 Omair Majid * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java (connect): Removed debug output. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 1 - diffs (23 lines): diff -r 1280e56de291 -r 53383766dc24 ChangeLog --- a/ChangeLog Tue Oct 14 16:50:34 2008 -0400 +++ b/ChangeLog Tue Oct 14 16:58:03 2008 -0400 @@ -1,3 +1,8 @@ 2008-10-14 Omair Majid + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java + (connect): Removed debug output. + 2008-10-14 Omair Majid * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetDataLine.java diff -r 1280e56de291 -r 53383766dc24 pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Tue Oct 14 16:50:34 2008 -0400 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Tue Oct 14 16:58:03 2008 -0400 @@ -265,7 +265,6 @@ public abstract class PulseAudioDataLine semaphore.acquire(); synchronized (eventLoop.threadLock) { if (stream.getState() != Stream.State.READY) { - System.out.println(stream.getState()); stream.disconnect(); stream.free(); throw new LineUnavailableException( From iivan at town.yyz.redhat.com Tue Oct 14 14:10:28 2008 From: iivan at town.yyz.redhat.com (iivan at town.yyz.redhat.com) Date: Tue, 14 Oct 2008 21:10:28 +0000 Subject: changeset in /hg/icedtea6: 2008-10-14 Ioana Ivan Message-ID: changeset 17eedb3bbfbd in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=17eedb3bbfbd description: 2008-10-14 Ioana Ivan * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java (connectLine): changed bufferAttributes to fix crackling in the clip tests diffstat: 2 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 6 ++++++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 3 ++- diffs (26 lines): diff -r 53383766dc24 -r 17eedb3bbfbd ChangeLog --- a/ChangeLog Tue Oct 14 16:58:03 2008 -0400 +++ b/ChangeLog Tue Oct 14 17:08:32 2008 -0400 @@ -1,3 +1,9 @@ 2008-10-14 Omair Majid + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java + (connectLine): changed bufferAttributes to fix crackling in the clip tests + + 2008-10-14 Omair Majid * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java diff -r 53383766dc24 -r 17eedb3bbfbd pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Tue Oct 14 16:58:03 2008 -0400 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java Tue Oct 14 17:08:32 2008 -0400 @@ -207,7 +207,8 @@ public class PulseAudioClip extends Puls protected void connectLine(int bufferSize, Stream masterStream) throws LineUnavailableException { StreamBufferAttributes bufferAttributes = new StreamBufferAttributes( - bufferSize, bufferSize / 2, bufferSize / 2, bufferSize / 2, 0); + bufferSize, bufferSize / 4, bufferSize / 8, + ((bufferSize / 10) > 100 ? bufferSize / 10 : 100), 0); if (masterStream != null) { synchronized (eventLoop.threadLock) { From bugzilla-daemon at icedtea.classpath.org Tue Oct 14 15:14:12 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 14 Oct 2008 22:14:12 +0000 Subject: [Bug 217] LiveConnect applet to JS communication does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 ------- Comment #8 from mubashir at kazia.com 2008-10-14 22:14 ------- Created an attachment (id=116) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=116&action=view) Output of about:plugins -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Oct 14 15:19:09 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 14 Oct 2008 22:19:09 +0000 Subject: [Bug 217] LiveConnect applet to JS communication does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 mubashir at kazia.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #116 is|0 |1 obsolete| | -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Oct 14 15:20:20 2008 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 14 Oct 2008 22:20:20 +0000 Subject: [Bug 217] LiveConnect applet to JS communication does not work Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=217 ------- Comment #9 from mubashir at kazia.com 2008-10-14 22:20 ------- Created an attachment (id=117) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=117&action=view) Output of about:plugins -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From iivan at redhat.com Tue Oct 14 22:44:24 2008 From: iivan at redhat.com (Ioana Ivan) Date: Wed, 15 Oct 2008 05:44:24 +0000 Subject: changeset in /hg/icedtea6: 2008-10-14 Ioana Ivan changeset 654694c101ad in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=654694c101ad description: 2008-10-14 Ioana Ivan * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java (open): startedListener only sends a START event when playback first starts and after an underflow (start): sends a START event if there's data on the line diffstat: 2 files changed, 24 insertions(+), 9 deletions(-) ChangeLog | 9 +++ pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java | 24 ++++++---- diffs (80 lines): diff -r 17eedb3bbfbd -r 654694c101ad ChangeLog --- a/ChangeLog Tue Oct 14 17:08:32 2008 -0400 +++ b/ChangeLog Wed Oct 15 01:36:05 2008 -0400 @@ -1,3 +1,10 @@ 2008-10-14 Ioana Ivan +2008-10-14 Ioana Ivan + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java + (open): startedListener only sends a START event when playback first + starts and after an underflow + (start): sends a START event if there's data on the line + 2008-10-14 Ioana Ivan * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java @@ -6,7 +13,7 @@ 2008-10-14 Ioana Ivan 2008-10-14 Omair Majid - * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java + * pulseaudio/src/java/org/classpat/icedtea/pulseaudio/PulseAudioDataLine.java (connect): Removed debug output. 2008-10-14 Omair Majid diff -r 17eedb3bbfbd -r 654694c101ad pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java --- a/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Tue Oct 14 17:08:32 2008 -0400 +++ b/pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java Wed Oct 15 01:36:05 2008 -0400 @@ -84,9 +84,9 @@ public abstract class PulseAudioDataLine if (isOpen) { throw new IllegalStateException("Line is already open"); } - + PulseAudioMixer mixer = PulseAudioMixer.getInstance(); - if(!mixer.isOpen()) { + if (!mixer.isOpen()) { mixer.open(); } @@ -205,13 +205,14 @@ public abstract class PulseAudioDataLine Stream.PlaybackStartedListener startedListener = new Stream.PlaybackStartedListener() { @Override public void update() { - fireLineEvent(new LineEvent(PulseAudioDataLine.this, - LineEvent.Type.START, framesSinceOpen)); - + if (!dataWritten) { + fireLineEvent(new LineEvent(PulseAudioDataLine.this, + LineEvent.Type.START, framesSinceOpen)); + synchronized (this) { + this.notifyAll(); + } + } dataWritten = true; - synchronized (this) { - this.notifyAll(); - } } }; @@ -343,6 +344,10 @@ public abstract class PulseAudioDataLine return; } + if (dataWritten && (!isStarted)) { + fireLineEvent(new LineEvent(PulseAudioDataLine.this, + LineEvent.Type.START, framesSinceOpen)); + } Operation op; synchronized (eventLoop.threadLock) { @@ -351,6 +356,9 @@ public abstract class PulseAudioDataLine op.waitForCompletion(); op.releaseReference(); + synchronized (this) { + this.notifyAll(); + } isStarted = true; } From doko at ubuntu.com Wed Oct 15 02:12:02 2008 From: doko at ubuntu.com (doko at ubuntu.com) Date: Wed, 15 Oct 2008 09:12:02 +0000 Subject: changeset in /hg/icedtea6: 2008-10-15 Matthias Klose changeset bcb125b39f86 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=bcb125b39f86 description: 2008-10-15 Matthias Klose * patches/icedtea-hotspot-6b11-7b24.patch: Remove. diffstat: 2 files changed, 4 insertions(+), 56973 deletions(-) ChangeLog | 4 patches/icedtea-hotspot-6b11-7b24.patch |56973 ------------------------------- diffs (truncated from 56988 to 500 lines): diff -r 654694c101ad -r bcb125b39f86 ChangeLog --- a/ChangeLog Wed Oct 15 01:36:05 2008 -0400 +++ b/ChangeLog Wed Oct 15 11:10:08 2008 +0200 @@ -1,3 +1,7 @@ 2008-10-14 Ioana Ivan + + * patches/icedtea-hotspot-6b11-7b24.patch: Remove. + 2008-10-14 Ioana Ivan * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java diff -r 654694c101ad -r bcb125b39f86 patches/icedtea-hotspot-6b11-7b24.patch --- a/patches/icedtea-hotspot-6b11-7b24.patch Wed Oct 15 01:36:05 2008 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56973 +0,0 @@ -diff -ruNb openjdk{6,}/hotspot/src/share -diff -ruNb openjdk{6,}/hotspot/src/os/linux - -diff -ruNb openjdk6/hotspot/src/share/tools/MakeDeps/BuildConfig.java openjdk/hotspot/src/share/tools/MakeDeps/BuildConfig.java ---- openjdk6/hotspot/src/share/tools/MakeDeps/BuildConfig.java 2008-07-10 22:04:28.000000000 +0200 -+++ openjdk/hotspot/src/share/tools/MakeDeps/BuildConfig.java 2007-12-14 08:57:02.000000000 +0100 -@@ -704,6 +704,3 @@ - receiver.add(attr); receiver.add(value); - } - } -- -- -- -diff -ruNb openjdk6/hotspot/src/share/tools/MakeDeps/Macro.java openjdk/hotspot/src/share/tools/MakeDeps/Macro.java ---- openjdk6/hotspot/src/share/tools/MakeDeps/Macro.java 2008-07-10 22:04:28.000000000 +0200 -+++ openjdk/hotspot/src/share/tools/MakeDeps/Macro.java 2007-12-14 08:57:02.000000000 +0100 -@@ -26,4 +26,3 @@ - public String name; - public String contents; - } -- -diff -ruNb openjdk6/hotspot/src/share/tools/MakeDeps/Platform.java openjdk/hotspot/src/share/tools/MakeDeps/Platform.java ---- openjdk6/hotspot/src/share/tools/MakeDeps/Platform.java 2008-07-10 22:04:28.000000000 +0200 -+++ openjdk/hotspot/src/share/tools/MakeDeps/Platform.java 2007-12-14 08:57:02.000000000 +0100 -@@ -169,7 +169,7 @@ - - /** max is 31 on mac, so warn */ - public int fileNameLengthLimit() { -- return 40; -+ return 45; - } - - public int defaultGrandIncludeThreshold() { -diff -ruNb openjdk6/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC6.java openjdk/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC6.java ---- openjdk6/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC6.java 2008-07-10 22:04:28.000000000 +0200 -+++ openjdk/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC6.java 2007-12-14 08:57:02.000000000 +0100 -@@ -236,7 +236,7 @@ - " /nologo /base:\"0x8000000\" /subsystem:windows /dll" + - " /export:JNI_GetDefaultJavaVMInitArgs /export:JNI_CreateJavaVM /export:JNI_GetCreatedJavaVMs "+ - " /export:jio_snprintf /export:jio_printf /export:jio_fprintf /export:jio_vfprintf "+ -- " /export:jio_vsnprintf /export:JVM_EnqueueOperation "); -+ " /export:jio_vsnprintf "); - rv.add("SUBTRACT LINK32 /pdb:none /map"); - - return rv; -diff -ruNb openjdk6/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java openjdk/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java ---- openjdk6/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java 2008-07-10 22:04:28.000000000 +0200 -+++ openjdk/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java 2007-12-14 08:57:02.000000000 +0100 -@@ -262,6 +262,8 @@ - - rv.add(new SpecificNameFilter("JVMTI Generated", new String[] {"^jvmti.+"})); - -+ rv.add(new SpecificNameFilter("C++ Interpreter Generated", new String[] {"^bytecodeInterpreterWithChecks.+"})); -+ - rv.add(new SpecificNameFilter("Include DBs", new String[] {"^includeDB_.+"})); - - // this one is to catch files not caught by other filters -@@ -574,8 +576,7 @@ - "/export:JNI_GetCreatedJavaVMs "+ - "/export:jio_snprintf /export:jio_printf "+ - "/export:jio_fprintf /export:jio_vfprintf "+ -- "/export:jio_vsnprintf "+ -- "/export:JVM_EnqueueOperation "); -+ "/export:jio_vsnprintf "); - addAttr(rv, "AdditionalDependencies", "Wsock32.lib winmm.lib"); - addAttr(rv, "OutputFile", outDll); - addAttr(rv, "LinkIncremental", "1"); -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/adlc.hpp openjdk/hotspot/src/share/vm/adlc/adlc.hpp ---- openjdk6/hotspot/src/share/vm/adlc/adlc.hpp 2008-07-10 22:04:28.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/adlc.hpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_HDR --#pragma ident "@(#)adlc.hpp 1.28 07/05/05 17:04:59 JVM" --#endif - /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/adlparse.cpp openjdk/hotspot/src/share/vm/adlc/adlparse.cpp ---- openjdk6/hotspot/src/share/vm/adlc/adlparse.cpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/adlparse.cpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_SRC --#pragma ident "@(#)adlparse.cpp 1.205 07/05/05 17:05:00 JVM" --#endif - /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/adlparse.hpp openjdk/hotspot/src/share/vm/adlc/adlparse.hpp ---- openjdk6/hotspot/src/share/vm/adlc/adlparse.hpp 2008-07-10 22:04:28.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/adlparse.hpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_HDR --#pragma ident "@(#)adlparse.hpp 1.79 07/05/05 17:05:00 JVM" --#endif - /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -273,5 +270,3 @@ - static bool is_int_token(const char* token, int& intval); - static void trim(char* &token); // trim leading & trailing spaces - }; -- -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/archDesc.cpp openjdk/hotspot/src/share/vm/adlc/archDesc.cpp ---- openjdk6/hotspot/src/share/vm/adlc/archDesc.cpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/archDesc.cpp 2007-12-14 08:57:02.000000000 +0100 -@@ -22,6 +22,7 @@ - // - // - -+ - // archDesc.cpp - Internal format for architecture definition - #include "adlc.hpp" - -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/arena.cpp openjdk/hotspot/src/share/vm/adlc/arena.cpp ---- openjdk6/hotspot/src/share/vm/adlc/arena.cpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/arena.cpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_SRC --#pragma ident "@(#)arena.cpp 1.16 07/05/05 17:05:00 JVM" --#endif - /* - * Copyright 1998-2002 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -173,4 +170,3 @@ - void CHeapObj::operator delete(void* p){ - free(p); - } -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/arena.hpp openjdk/hotspot/src/share/vm/adlc/arena.hpp ---- openjdk6/hotspot/src/share/vm/adlc/arena.hpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/arena.hpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_HDR --#pragma ident "@(#)arena.hpp 1.17 07/05/05 17:05:00 JVM" --#endif - /* - * Copyright 1998-2002 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -158,4 +155,3 @@ - size_t size_in_bytes() const { return _size_in_bytes; } - void set_size_in_bytes(size_t size) { _size_in_bytes = size; } - }; -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/dfa.cpp openjdk/hotspot/src/share/vm/adlc/dfa.cpp ---- openjdk6/hotspot/src/share/vm/adlc/dfa.cpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/dfa.cpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_SRC --#pragma ident "@(#)dfa.cpp 1.83 07/05/05 17:04:59 JVM" --#endif - /* - * Copyright 1997-2004 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -1022,4 +1019,3 @@ - void ProductionState::print() { - _production.print(print_key, print_production); - } -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/dict2.cpp openjdk/hotspot/src/share/vm/adlc/dict2.cpp ---- openjdk6/hotspot/src/share/vm/adlc/dict2.cpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/dict2.cpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_SRC --#pragma ident "@(#)dict2.cpp 1.19 07/05/05 17:04:59 JVM" --#endif - /* - * Copyright 1998-2002 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -354,5 +351,3 @@ - } - _key = _value = NULL; - } -- -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/dict2.hpp openjdk/hotspot/src/share/vm/adlc/dict2.hpp ---- openjdk6/hotspot/src/share/vm/adlc/dict2.hpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/dict2.hpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_HDR --#pragma ident "@(#)dict2.hpp 1.16 07/05/05 17:05:01 JVM" --#endif - /* - * Copyright 1998-2000 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -121,5 +118,3 @@ - }; - - #endif // _DICT_ -- -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/filebuff.cpp openjdk/hotspot/src/share/vm/adlc/filebuff.cpp ---- openjdk6/hotspot/src/share/vm/adlc/filebuff.cpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/filebuff.cpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_SRC --#pragma ident "@(#)filebuff.cpp 1.30 07/05/05 17:05:01 JVM" --#endif - /* - * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -297,4 +294,3 @@ - va_end(args); - _AD._no_output = 1; - } -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/filebuff.hpp openjdk/hotspot/src/share/vm/adlc/filebuff.hpp ---- openjdk6/hotspot/src/share/vm/adlc/filebuff.hpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/filebuff.hpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_HDR --#pragma ident "@(#)filebuff.hpp 1.27 07/05/05 17:05:01 JVM" --#endif - /* - * Copyright 1997-2004 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/forms.cpp openjdk/hotspot/src/share/vm/adlc/forms.cpp ---- openjdk6/hotspot/src/share/vm/adlc/forms.cpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/forms.cpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_SRC --#pragma ident "@(#)forms.cpp 1.161 07/05/05 17:04:59 JVM" --#endif - /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -386,4 +383,3 @@ - void SourceForm::output(FILE *fp) { - fprintf(fp,"\n//%s\n%s\n",classname(),(_code?_code:"")); - } -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/forms.hpp openjdk/hotspot/src/share/vm/adlc/forms.hpp ---- openjdk6/hotspot/src/share/vm/adlc/forms.hpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/forms.hpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_HDR --#pragma ident "@(#)forms.hpp 1.150 07/05/05 17:05:00 JVM" --#endif - /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -587,6 +584,3 @@ - void print_asserts(FILE *fp); - void dump(); - }; -- -- -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/formsopt.cpp openjdk/hotspot/src/share/vm/adlc/formsopt.cpp ---- openjdk6/hotspot/src/share/vm/adlc/formsopt.cpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/formsopt.cpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_SRC --#pragma ident "@(#)formsopt.cpp 1.53 07/05/05 17:05:01 JVM" --#endif - /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -725,4 +722,3 @@ - void PeepReplace::output(FILE *fp) { // Write info to output files - fprintf(fp,"PeepReplace:\n"); - } -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/formsopt.hpp openjdk/hotspot/src/share/vm/adlc/formsopt.hpp ---- openjdk6/hotspot/src/share/vm/adlc/formsopt.hpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/formsopt.hpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_HDR --#pragma ident "@(#)formsopt.hpp 1.54 07/05/05 17:05:01 JVM" --#endif - /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -549,4 +546,3 @@ - void dump(); - void output(FILE *fp); - }; -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/formssel.cpp openjdk/hotspot/src/share/vm/adlc/formssel.cpp ---- openjdk6/hotspot/src/share/vm/adlc/formssel.cpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/formssel.cpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_SRC --#pragma ident "@(#)formssel.cpp 1.183 07/09/06 15:24:29 JVM" --#endif - /* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -236,23 +233,58 @@ - return _matrule ? _matrule->is_ideal_copy() : 0; - } - --// Return 'true' if this instruction matches an ideal 'CosD' node -+// Return 'true' if this instruction is too complex to rematerialize. - int InstructForm::is_expensive() const { -- if (_matrule == NULL) return 0; - // We can prove it is cheap if it has an empty encoding. - // This helps with platform-specific nops like ThreadLocal and RoundFloat. -+ if (is_empty_encoding()) -+ return 0; -+ -+ if (is_tls_instruction()) -+ return 1; -+ -+ if (_matrule == NULL) return 0; -+ -+ return _matrule->is_expensive(); -+} -+ -+// Has an empty encoding if _size is a constant zero or there -+// are no ins_encode tokens. -+int InstructForm::is_empty_encoding() const { - if (_insencode != NULL) { - _insencode->reset(); - if (_insencode->encode_class_iter() == NULL) { -- return 0; -+ return 1; - } - } - if (_size != NULL && strcmp(_size, "0") == 0) { -+ return 1; -+ } - return 0; -+} -+ -+int InstructForm::is_tls_instruction() const { -+ if (_ident != NULL && -+ ( ! strcmp( _ident,"tlsLoadP") || -+ ! strncmp(_ident,"tlsLoadP_",9)) ) { -+ return 1; - } -- return _matrule->is_expensive(); -+ -+ if (_matrule != NULL && _insencode != NULL) { -+ const char* opType = _matrule->_opType; -+ if (strcmp(opType, "Set")==0) -+ opType = _matrule->_rChild->_opType; -+ if (strcmp(opType,"ThreadLocal")==0) { -+ fprintf(stderr, "Warning: ThreadLocal instruction %s should be named 'tlsLoadP_*'\n", -+ (_ident == NULL ? "NULL" : _ident)); -+ return 1; -+ } -+ } -+ -+ return 0; - } - -+ - // Return 'true' if this instruction matches an ideal 'Copy*' node - bool InstructForm::is_ideal_unlock() const { - return _matrule ? _matrule->is_ideal_unlock() : false; -@@ -492,6 +524,10 @@ - if( _components.count() == 1 && _components[0]->is(Component::USE_DEF) ) - rematerialize = true; - -+ // Pseudo-constants (values easily available to the runtime) -+ if (is_empty_encoding() && is_tls_instruction()) -+ rematerialize = true; -+ - // 1-input, 1-output, such as copies or increments. - if( _components.count() == 2 && - _components[0]->is(Component::DEF) && -@@ -1171,9 +1207,9 @@ - // Output the format call for this operand - fprintf(fp,"opnd_array(%d)->",idx); - if (idx == 0) -- fprintf(fp,"int_format(ra, this); // %s\n", rep_var); -+ fprintf(fp,"int_format(ra, this, st); // %s\n", rep_var); - else -- fprintf(fp,"ext_format(ra, this,idx%d); // %s\n", idx, rep_var ); -+ fprintf(fp,"ext_format(ra, this,idx%d, st); // %s\n", idx, rep_var ); - } - } - -@@ -2329,11 +2365,11 @@ - - void OperandForm::format_constant(FILE *fp, uint const_index, uint const_type) { - switch(const_type) { -- case Form::idealI: fprintf(fp,"tty->print(\"#%%d\", _c%d);\n", const_index); break; -- case Form::idealP: fprintf(fp,"_c%d->dump();\n", const_index); break; -- case Form::idealL: fprintf(fp,"tty->print(\"#%%lld\", _c%d);\n", const_index); break; -- case Form::idealF: fprintf(fp,"tty->print(\"#%%f\", _c%d);\n", const_index); break; -- case Form::idealD: fprintf(fp,"tty->print(\"#%%f\", _c%d);\n", const_index); break; -+ case Form::idealI: fprintf(fp,"st->print(\"#%%d\", _c%d);\n", const_index); break; -+ case Form::idealP: fprintf(fp,"_c%d->dump_on(st);\n", const_index); break; -+ case Form::idealL: fprintf(fp,"st->print(\"#%%lld\", _c%d);\n", const_index); break; -+ case Form::idealF: fprintf(fp,"st->print(\"#%%f\", _c%d);\n", const_index); break; -+ case Form::idealD: fprintf(fp,"st->print(\"#%%f\", _c%d);\n", const_index); break; - default: - assert( false, "ShouldNotReachHere()"); - } -@@ -3725,6 +3761,17 @@ - int MatchRule::is_ideal_copy() const { - if( _rChild ) { - const char *opType = _rChild->_opType; -+ if( strcmp(opType,"CastII")==0 ) -+ return 1; -+ // Do not treat *CastPP this way, because it -+ // may transfer a raw pointer to an oop. -+ // If the register allocator were to coalesce this -+ // into a single LRG, the GC maps would be incorrect. -+ //if( strcmp(opType,"CastPP")==0 ) -+ // return 1; -+ //if( strcmp(opType,"CheckCastPP")==0 ) -+ // return 1; -+ // - // Do not treat CastX2P or CastP2X this way, because - // raw pointers and int types are treated differently - // when saving local & stack info for safepoints in -@@ -3773,7 +3820,6 @@ - strcmp(opType,"ConvL2I")==0 || - strcmp(opType,"RoundDouble")==0 || - strcmp(opType,"RoundFloat")==0 || -- strcmp(opType,"ThreadLocal")==0 || - strcmp(opType,"ReverseBytesI")==0 || - strcmp(opType,"ReverseBytesL")==0 || - strcmp(opType,"Replicate16B")==0 || -@@ -3951,4 +3997,3 @@ - fprintf(fp,"\nFormat Rule: \n%s", (_temp?_temp:"")); - fprintf(fp,"\n"); - } -- -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/formssel.hpp openjdk/hotspot/src/share/vm/adlc/formssel.hpp ---- openjdk6/hotspot/src/share/vm/adlc/formssel.hpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/formssel.hpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_HDR --#pragma ident "@(#)formssel.hpp 1.76 07/05/17 15:49:19 JVM" --#endif - /* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -139,6 +136,8 @@ - // ideal opcode enumeration - virtual const char *ideal_Opcode(FormDict &globals) const; - virtual int is_expensive() const; // node matches ideal 'CosD' -+ virtual int is_empty_encoding() const; // _size=0 and/or _insencode empty -+ virtual int is_tls_instruction() const; // tlsLoadP rule or ideal ThreadLocal - virtual int is_ideal_copy() const; // node matches ideal 'Copy*' - virtual bool is_ideal_unlock() const; // node matches ideal 'Unlock' - virtual bool is_ideal_call_leaf() const; // node matches ideal 'CallLeaf' -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/output_c.cpp openjdk/hotspot/src/share/vm/adlc/output_c.cpp ---- openjdk6/hotspot/src/share/vm/adlc/output_c.cpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/output_c.cpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_SRC --#pragma ident "@(#)output_c.cpp 1.184 07/05/17 15:49:23 JVM" --#endif - /* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -2199,7 +2196,7 @@ - const char* reg_conversion(const char* rep_var) { - if (strcmp(rep_var,"$Register") == 0) return "as_Register"; - if (strcmp(rep_var,"$FloatRegister") == 0) return "as_FloatRegister"; --#if defined(IA32) -+#if defined(IA32) || defined(AMD64) - if (strcmp(rep_var,"$XMMRegister") == 0) return "as_XMMRegister"; - #endif - return NULL; -diff -ruNb openjdk6/hotspot/src/share/vm/adlc/output_h.cpp openjdk/hotspot/src/share/vm/adlc/output_h.cpp ---- openjdk6/hotspot/src/share/vm/adlc/output_h.cpp 2008-07-10 22:04:29.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/adlc/output_h.cpp 2007-12-14 08:57:02.000000000 +0100 -@@ -1,6 +1,3 @@ --#ifdef USE_PRAGMA_IDENT_SRC --#pragma ident "@(#)output_h.cpp 1.178 07/05/05 17:05:03 JVM" --#endif - /* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -@@ -345,34 +342,34 @@ - - // Generate the format rule for condition codes - static void defineCCodeDump(FILE *fp, int i) { -- fprintf(fp, " if( _c%d == BoolTest::eq ) tty->print(\"eq\");\n",i); -- fprintf(fp, " else if( _c%d == BoolTest::ne ) tty->print(\"ne\");\n",i); -- fprintf(fp, " else if( _c%d == BoolTest::le ) tty->print(\"le\");\n",i); -- fprintf(fp, " else if( _c%d == BoolTest::ge ) tty->print(\"ge\");\n",i); -- fprintf(fp, " else if( _c%d == BoolTest::lt ) tty->print(\"lt\");\n",i); -- fprintf(fp, " else if( _c%d == BoolTest::gt ) tty->print(\"gt\");\n",i); -+ fprintf(fp, " if( _c%d == BoolTest::eq ) st->print(\"eq\");\n",i); -+ fprintf(fp, " else if( _c%d == BoolTest::ne ) st->print(\"ne\");\n",i); -+ fprintf(fp, " else if( _c%d == BoolTest::le ) st->print(\"le\");\n",i); -+ fprintf(fp, " else if( _c%d == BoolTest::ge ) st->print(\"ge\");\n",i); -+ fprintf(fp, " else if( _c%d == BoolTest::lt ) st->print(\"lt\");\n",i); From langel at towel.yyz.redhat.com Wed Oct 15 06:43:06 2008 From: langel at towel.yyz.redhat.com (langel at towel.yyz.redhat.com) Date: Wed, 15 Oct 2008 13:43:06 +0000 Subject: changeset in /hg/icedtea6: Fixed whitespace Message-ID: changeset 5b3897cb5d41 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=5b3897cb5d41 description: Fixed whitespace diffstat: 1 file changed, 6 insertions(+), 6 deletions(-) ChangeLog | 12 ++++++------ diffs (25 lines): diff -r bcb125b39f86 -r 5b3897cb5d41 ChangeLog --- a/ChangeLog Wed Oct 15 11:10:08 2008 +0200 +++ b/ChangeLog Wed Oct 15 09:43:02 2008 -0400 @@ -4,15 +4,15 @@ 2008-10-15 Matthias Klose - * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java - (open): startedListener only sends a START event when playback first - starts and after an underflow - (start): sends a START event if there's data on the line + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioDataLine.java + (open): startedListener only sends a START event when playback first + starts and after an underflow + (start): sends a START event if there's data on the line 2008-10-14 Ioana Ivan - * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java - (connectLine): changed bufferAttributes to fix crackling in the clip tests + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java + (connectLine): changed bufferAttributes to fix crackling in the clip tests 2008-10-14 Omair Majid From mark at klomp.org Wed Oct 15 06:54:35 2008 From: mark at klomp.org (Mark Wielaard) Date: Wed, 15 Oct 2008 13:54:35 +0000 Subject: changeset in /hg/pulseaudio: Added tag icedtea-integrated for ch... Message-ID: changeset c84f9b9f70dc in /hg/pulseaudio details: http://icedtea.classpath.org/hg/pulseaudio?cmd=changeset;node=c84f9b9f70dc description: Added tag icedtea-integrated for changeset 095b46980d97 diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (5 lines): diff -r 095b46980d97 -r c84f9b9f70dc .hgtags --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgtags Wed Oct 15 15:54:07 2008 +0200 @@ -0,0 +1,1 @@ +095b46980d97c0213ca76bb981a2307857da0b1c icedtea-integrated From mark at klomp.org Wed Oct 15 06:55:05 2008 From: mark at klomp.org (Mark Wielaard) Date: Wed, 15 Oct 2008 15:55:05 +0200 Subject: [PATCH] Integrating a PulseAudio-based Java Mixer in icedtea6 In-Reply-To: <48EF58A0.1020200@redhat.com> References: <48EE1885.9050005@redhat.com> <17c6771e0810091347ka76a7bev7e9c3ead3f0b070c@mail.gmail.com> <1223626845.4349.5.camel@dijkstra.wildebeest.org> <48EF58A0.1020200@redhat.com> Message-ID: <1224078905.3470.23.camel@hermans.wildebeest.org> Hi Ioana, On Fri, 2008-10-10 at 09:29 -0400, Ioana Ivan wrote: > > The only thing we need to think about is whether we also want to carry > > over the revision history or that we keep around the pulseaudio repo for > > historical reasons. I don't immediately know how easy it is to carry > > over the changesets from one repo to a completely separate one. > > Omair, Ioana, what do you want? > > > I think it would be better to carry over the revision history to the > icedtea repository, but it doesn't really matter to me. If that's > difficult to do, keeping the pulseaudio repo is fine too. Thanks for > helping us integrate the pulseaudio spi in icedtea :) It isn't completely trivial (and I am recovering from a bit of a nasty bronchitis, which will take some days unfortunately), so for now I have just tagged the pulseaudio repository as 'icedtea-integrated' and people who want the earlier history will have to look at: http://icedtea.classpath.org/hg/pulseaudio Which we will keep around of course. Cheers, Mark From langel at towel.yyz.redhat.com Wed Oct 15 07:05:12 2008 From: langel at towel.yyz.redhat.com (langel at towel.yyz.redhat.com) Date: Wed, 15 Oct 2008 14:05:12 +0000 Subject: changeset in /hg/icedtea6: 2008-10-15 Lillian Angel changeset e9e4bd53935d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e9e4bd53935d description: 2008-10-15 Lillian Angel * NEWS: Updated for 1.3 release. diffstat: 2 files changed, 22 insertions(+), 8 deletions(-) ChangeLog | 18 +++++++++++------- NEWS | 12 +++++++++++- diffs (53 lines): diff -r 5b3897cb5d41 -r e9e4bd53935d ChangeLog --- a/ChangeLog Wed Oct 15 09:43:02 2008 -0400 +++ b/ChangeLog Wed Oct 15 10:04:57 2008 -0400 @@ -1,3 +1,7 @@ 2008-10-15 Matthias Klose + + * NEWS: Updated for 1.3 release. + 2008-10-15 Matthias Klose * patches/icedtea-hotspot-6b11-7b24.patch: Remove. @@ -407,13 +411,13 @@ 2008-09-23 Deepak Bhole - DJ Lucas - - * Makefile.am: Added new env var JAR_ACCEPTS_STDIN_LIST. - * acinclude.m4: Added check to determine whether jar supports - stdin file args. - * patches/icedtea-ecj.patch: Updated patch. - * AUTHORS: Added DJ Lucas. + DJ Lucas + + * Makefile.am: Added new env var JAR_ACCEPTS_STDIN_LIST. + * acinclude.m4: Added check to determine whether jar supports + stdin file args. + * patches/icedtea-ecj.patch: Updated patch. + * AUTHORS: Added DJ Lucas. 2008-09-18 Lillian Angel diff -r 5b3897cb5d41 -r e9e4bd53935d NEWS --- a/NEWS Wed Oct 15 09:43:02 2008 -0400 +++ b/NEWS Wed Oct 15 10:04:57 2008 -0400 @@ -1,6 +1,16 @@ New in release UNRELEASED (2008-xx-xx) -New in release UNRELEASED (2008-xx-xx) +New in release 1.3 (2008-10-15) - Updated to b12 build. +- Fixed to use new sound service, Gervill. +- Many Netx fixes and now built by default. +- LiveConnect support (--enable-liveconnect). +- Implemented JavaScript->Java security. +- PulseAudio integrated (--enable-pulse-java) +- VisualVM tool integrated (--enable-visualvm). +- Added out-of-the-box CACAO support (--with-cacao). +- Added the experimental Shark JIT for Zero. +- Various build fixes. +- Several bug and security fixes. New in release 1.2 (2008-05-28) From mark at klomp.org Wed Oct 15 07:26:27 2008 From: mark at klomp.org (Mark Wielaard) Date: Wed, 15 Oct 2008 14:26:27 +0000 Subject: changeset in /hg/icedtea6: * NEWS: Add Rhino javascript and clea... Message-ID: changeset 75e459eb91b1 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=75e459eb91b1 description: * NEWS: Add Rhino javascript and cleaned up crypto support. diffstat: 2 files changed, 8 insertions(+) ChangeLog | 4 ++++ NEWS | 4 ++++ diffs (25 lines): diff -r e9e4bd53935d -r 75e459eb91b1 ChangeLog --- a/ChangeLog Wed Oct 15 10:04:57 2008 -0400 +++ b/ChangeLog Wed Oct 15 16:26:20 2008 +0200 @@ -1,3 +1,7 @@ 2008-10-15 Lillian Angel + + * NEWS: Add Rhino javascript and cleaned up crypto support. + 2008-10-15 Lillian Angel * NEWS: Updated for 1.3 release. diff -r e9e4bd53935d -r 75e459eb91b1 NEWS --- a/NEWS Wed Oct 15 10:04:57 2008 -0400 +++ b/NEWS Wed Oct 15 16:26:20 2008 +0200 @@ -9,6 +9,10 @@ New in release 1.3 (2008-10-15) - VisualVM tool integrated (--enable-visualvm). - Added out-of-the-box CACAO support (--with-cacao). - Added the experimental Shark JIT for Zero. +- Cleaned up crypto support, all algorithms and key sizes are fully + supported now without any (regional) restrictions. No more need for + separate crypto policy jars. +- Integration of Mozilla Rhino javascript support for javax.script. - Various build fixes. - Several bug and security fixes. From doko at ubuntu.com Wed Oct 15 07:31:56 2008 From: doko at ubuntu.com (Matthias Klose) Date: Wed, 15 Oct 2008 16:31:56 +0200 Subject: changeset in /hg/icedtea6: * NEWS: Add Rhino javascript and clea... In-Reply-To: Ref