OpenJDK-6-jre freezes on simple midi app, sun JRE does not

Bug #275672 reported by George Dhoore
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenJDK
Fix Released
Medium
openjdk-6 (Ubuntu)
Fix Released
Medium
Unassigned
Hardy
Won't Fix
Medium
Unassigned
Intrepid
Invalid
Medium
Unassigned

Bug Description

Binary package hint: openjdk-6-jre

Ubuntu Intrepid Alpha6 8.10 updated as of Sunday, September 28th
OpenJDK version 6b12~pre1-0ubuntu3

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");
    }
}

Related branches

Revision history for this message
George Dhoore (georgiepoo) wrote :
Revision history for this message
In , Matthias Klose (doko) wrote :

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");
    }
}

Changed in openjdk-6:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
In , Matthias Klose (doko) wrote :

Created attachment 113
test case

Changed in openjdk:
status: Unknown → Confirmed
Revision history for this message
In , Kalli (kalli) wrote :

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.

Revision history for this message
In , Mark J. Wielaard (3y9m2vcw-ll9d-fkzsxrqg) wrote :

# HG changeset patch
# User Mark Wielaard <email address hidden>
# Date 1226317380 -3600
# Node ID cfe2c755ee47fb990a97c4d23691feb39d4a046d
# Parent 688efd12076603ef455dd2a0a70d3aecb3cfe589
Updated to new Gervill CVS.

- Fix: Throw IllegalArgumentException Exception on
       invalid soundbank to:
       SoftSynthesizer.unloadAllInstruments(Soundbank soundbank)
       SoftSynthesizer.unloadInstruments(Soundbank soundbank, Patch[] patchList)
       just like done in:
       SoftSynthesizer.unloadInstrument(Instrument instrument).
- Change: SoftMainMixer, SoftVoice optimized for mono voices.
- Change: SoftFilter optimized.
- Fix: Turn SoftJitterCorrector, SoftAudioPusher threads into a daemon threads.
       These threads prevented the VM to exit when synthesizer was open.
       See: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=213

2008-11-10 Mark Wielaard <email address hidden>

 * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/
 CHANGES.txt,SoftAudioPusher.java,SoftFilter.java,
 SoftJitterCorrector.java,SoftMainMixer.java,SoftVoice.java:
 Updated to new Gervill CVS.

Changed in openjdk:
status: Confirmed → Fix Released
Matthias Klose (doko)
Changed in openjdk-6:
status: New → In Progress
status: New → In Progress
importance: Undecided → Medium
Matthias Klose (doko)
Changed in openjdk-6:
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-6 - 6b13~pre1-0ubuntu1

---------------
openjdk-6 (6b13~pre1-0ubuntu1) jaunty; urgency=low

  * New code drop (b13).
    - In the langtools area, besides a few miscellaneous bug fixes (6760834,
      6725036, 6657499), all the langtools regression tests now pass out of
      the box (6728697, 6707027) and if using the most recent version of
      jtreg, the langtools regression tests can be run in the much faster
      "same vm" mode of jtreg, enabled with the -s option (6749967, 6748541,
      6748546, 6748601, 6759775, 6759795, 6759796, 6759996, 6760805, 6760930).
    - Gervill update, including applying a patch from IcedTea (6758986,
      6748247, 6748251).
    - Publishing a few dozen additional existing regression tests as open
      source (6601457, 6759433, 6740185).
    - JMX and monitoring fixes (6651382, 6616825, 6756202, 6754672).
    - Man page updates (6757036, 6392810, 6504867, 6326773).
    - Assorted other fixes (6746055, 6621697, 6756569, 6356642, 6761678).
  * Update IcedTea build infrastructure (20081111).
    - Fix freeze in midi app, LP: #275672.
    - Fixes in the IcedTeaPlugin: LP: #282570, LP: #282570, LP: #285729,
      LP: #291377, LP: #37330, LP: #239533.
    - Fix vertical text metrics with freetype scaler. LP: #289784.
  * Build-depend on ecj-gcj instead of ecj on architectures using
    gij/gcj as the bootstrap system.

 -- Matthias Klose <email address hidden> Tue, 11 Nov 2008 12:39:16 +0100

Changed in openjdk-6:
status: Triaged → Fix Released
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Intrepid Ibex reached end-of-life on 30 April 2010 so I am closing the report. The bug has been fixed in newer releases of Ubuntu.

Changed in openjdk-6 (Ubuntu Intrepid):
status: In Progress → Invalid
Revision history for this message
Jake Peck (gatesphere) wrote :

This bug still happens in 6b14-1.4.1-0ubuntu6 on an ARM platform (TonidoPlug).

Changed in openjdk:
importance: Unknown → Medium
Rolf Leggewie (r0lf)
Changed in openjdk-6 (Ubuntu Hardy):
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.