-
Bug
-
Resolution: Fixed
-
P3
-
5.0u6
-
b92
-
x86
-
windows_xp
FULL PRODUCT VERSION :
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
FULL OS VERSION :
Microsoft Windows XP Professional Version 2002 (SP2)
A DESCRIPTION OF THE PROBLEM :
If MIDI Transmitter/Receiver for receiving MIDI events is created too early in an applet the JVM crashes completely (either when receiving MIDI events or when closing applet).
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. run appletviewer on an applet contatining the following applet tags:
<applet name=blt WIDTH=580 HEIGHT=740 code=CrashApplet.class mayscript>
</applet>
2. send some MIDI events (via a MIDI keyboard for example)
3. close the applet - CRASH HERE (for me at least) !
EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected behaviour is to get some printouts of MIDI events in std out.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.JApplet;
import javax.sound.midi.Receiver;
import javax.sound.midi.MidiSystem;
import javax.sound.midi.Transmitter;
import javax.sound.midi.MidiMessage;
public class CrashApplet extends JApplet implements Receiver {
Transmitter transmitter;
/**
* Creates a new <code>CrachApplet</code> instance.
*
*/
public CrashApplet() {
try {
transmitter = MidiSystem.getTransmitter();
transmitter.setReceiver(this);
} catch (Exception e) {
e.printStackTrace();
transmitter = null;
}
}
public void close() {
}
public void send(MidiMessage message, long timeStamp) {
System.out.println("MIDI message received: " + message);
}
public void stop() {
transmitter.close();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Move the code for the transmitter in to the start method of the applet!
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
FULL OS VERSION :
Microsoft Windows XP Professional Version 2002 (SP2)
A DESCRIPTION OF THE PROBLEM :
If MIDI Transmitter/Receiver for receiving MIDI events is created too early in an applet the JVM crashes completely (either when receiving MIDI events or when closing applet).
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. run appletviewer on an applet contatining the following applet tags:
<applet name=blt WIDTH=580 HEIGHT=740 code=CrashApplet.class mayscript>
</applet>
2. send some MIDI events (via a MIDI keyboard for example)
3. close the applet - CRASH HERE (for me at least) !
EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected behaviour is to get some printouts of MIDI events in std out.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.JApplet;
import javax.sound.midi.Receiver;
import javax.sound.midi.MidiSystem;
import javax.sound.midi.Transmitter;
import javax.sound.midi.MidiMessage;
public class CrashApplet extends JApplet implements Receiver {
Transmitter transmitter;
/**
* Creates a new <code>CrachApplet</code> instance.
*
*/
public CrashApplet() {
try {
transmitter = MidiSystem.getTransmitter();
transmitter.setReceiver(this);
} catch (Exception e) {
e.printStackTrace();
transmitter = null;
}
}
public void close() {
}
public void send(MidiMessage message, long timeStamp) {
System.out.println("MIDI message received: " + message);
}
public void stop() {
transmitter.close();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Move the code for the transmitter in to the start method of the applet!