JDK-6792566 : kernel installer should install jre/lib/audio/soundbank.gm
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2009-01-12
  • Updated: 2011-02-16
  • Resolved: 2011-01-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7Resolved
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_07"
java version "1.6.0_10"
java version "1.6.0_11"


ADDITIONAL OS VERSION INFORMATION :
Windows XP SP3

EXTRA RELEVANT SYSTEM CONFIGURATION :
JMF 2.1.1e

A DESCRIPTION OF THE PROBLEM :
If I use version 1.6.0_11 or 1.6.0_10 MidiSequencer.getSequencer() throws an exception
If I rollback to version 1.6.0_07, everything works ok!
It is a definitive problem after updates ( 10 or 11 )

I report it because I cannot find this in your bugs database!

It also works good with java 1.5

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Very simple:
Sequencer seq = MidiSequencer.getSequencer();

using java 1.5 to .6.0_07 returns a correct sequencer

if we use 1.6.0_10 or 1.6.0_11 I just get an exception:
MIDI OUT Transmitter not available!


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
  To play my MIDI file again after update 1.6.0_10

ERROR MESSAGES/STACK TRACES THAT OCCUR :
04-Jan-2009 11:46:07 lookingnotgood.TheMIDINightmare GetSequencer
SEVERE: null
javax.sound.midi.MidiUnavailableException: MIDI OUT transmitter not available
        at com.sun.media.sound.AbstractMidiDevice.createTransmitter(AbstractMidiDevice.java:444)
        at com.sun.media.sound.AbstractMidiDevice.getTransmitter(AbstractMidiDevice.java:299)
        at javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:451)
        at javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:348)
        at lookingnotgood.TheMIDINightmare.GetSequencer(Main.java:35)
        at lookingnotgood.Main.main(Main.java:84)


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package lookingnotgood;

import java.io.File;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.sound.midi.MidiDevice;
import javax.sound.midi.MidiSystem;
import javax.sound.midi.MidiUnavailableException;
import javax.sound.midi.Sequence;
import javax.sound.midi.Sequencer;

/**
 *
 * @author Javier  ###@###.###
 */

 class TheMIDINightmare
 {
     File f;
     Sequence seq;
     Sequencer TheSequencer;
     int DeviceIndex = -1;


     public void GetSequencer()
     {
         MidiDevice dev;
         TheSequencer = null;
        try {
            TheSequencer = MidiSystem.getSequencer();
        } catch (MidiUnavailableException ex) {
            Logger.getLogger(TheMIDINightmare.class.getName()).log(Level.SEVERE, null, ex);
        }
     }

     void GetSequence(String aFileName)
     {
         boolean R = false;
         try
         {
            f = new File(aFileName);
            seq = MidiSystem.getSequence(f);

         }
         catch(Exception e)
         {
         }
     }


     public void Go()
     {
             try
             {
                    TheSequencer.open();
                    TheSequencer.setSequence(seq);
                    TheSequencer.setLoopCount(0);
                    TheSequencer.start();

             }
             catch(Exception e)
             {

             }

         }
 }

public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        TheMIDINightmare test;

        test = new TheMIDINightmare();

        test.GetSequencer(); // HERE IS THE BUG

        test.GetSequence("c:\\tmp\\a.mid"); // I play this file with version 1.6.0_07
        test.Go();
    }

}


---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Rollback the update 1.6.0_10 or 1.6.0_11 to 1.6.0_07
and everything goes perfect!

SUPPORT :
YES

Release Regression From : 6u7
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

Comments
EVALUATION soundbank no longer exists in jdk7
28-01-2011

EVALUATION When soundbank is not available Sequencer con connect to MidiOut device (MIDI OUT port or windows Software synthesizer). To test if we have sounbank correctly installed the following test my be used: //////////////////////////////////////// import javax.sound.midi.MidiSystem; import javax.sound.midi.Soundbank; import javax.sound.midi.Synthesizer; public class midiTestAuto { public static void main(String[] args) throws Exception { Synthesizer synth = MidiSystem.getSynthesizer(); System.out.println("synth: " + synth); synth.open(); Soundbank soundbank = synth.getDefaultSoundbank(); System.out.println("soundbank: " + soundbank); synth.close(); if (soundbank == null) { throw new Exception("default soundbank is null"); } } } //////////////////////////////////////// also the following test may be used for manual testing (if soundbank is present, synthesizer plays a scale) /////////////////////////////////////// import javax.sound.midi.MidiSystem; import javax.sound.midi.Receiver; import javax.sound.midi.ShortMessage; import javax.sound.midi.Soundbank; import javax.sound.midi.Synthesizer; public class midiTestManual { public static void main(String[] args) throws Exception { Synthesizer synth = MidiSystem.getSynthesizer(); synth.open(); Receiver recv = synth.getReceiver(); int noteNum = 60; // c for (int note = 0; note<8; note++) { ShortMessage msg = new ShortMessage(); msg.setMessage(ShortMessage.NOTE_ON, 0, noteNum, 63); recv.send(msg, -1); Thread.sleep(500); if (note == 2 || note == 6) { noteNum++; } else { noteNum += 2; } } synth.close(); } } ///////////////////////////////////////
05-10-2009

EVALUATION Actually, with simple test like below i can not reproduce the issue even after removal of soundbank.gm file. Therefore, despite the fact that kernel installer might not be installing soundbank file when needed it does not seem to be the only reason and therefore it seems that evaluation by sound team seems to be incomplete. Transfering bug back to sound team to evaluate which assertions have to be satisfied exactly and how to reproduce problem that is reported here. ==================== import javax.sound.midi.MidiUnavailableException; import javax.sound.midi.Sequencer; public class MidiTest { public static void main(String a[]) { try { Sequencer s = javax.sound.midi.MidiSystem.getSequencer(); System.err.println("RRR "+s.getClass()); } catch (MidiUnavailableException ex) { System.err.println("Got "+ex); } } } Output says RealTimeSequencer was instantiated.
30-09-2009

EVALUATION There is no easy workaround but application should work after background installer installs all of the component. Suggested fix is to use explicitly request DownloadManager to load soundbank file if it is loaded from java.home (like it is done in the 6793694 for color profiles).
29-09-2009

EVALUATION The kernel installer should install this file. The online installer should not.
04-02-2009

WORK AROUND install midi sounbank manually: http://java.sun.com/products/java-media/sound/soundbanks.html
22-01-2009

EVALUATION The reason of the issue is midi soundbank isn't installed in the system (<jre>/lib/audio/soundbank.gm) To install the soundbank there was a special option is 6u07 installer (Show advanced options panel -> Additional Font and Media Support) 6u11 installer DOES NOT have "advanced options" checkbox. Offline installer always installs sounbank, online installer and online kernel installer don't install the sounbank (and don't allow to force it).
22-01-2009