JDK-4863748 : Exceptions and crash while running JavaSoundDemo
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2003-05-14
  • Updated: 2006-05-31
  • Resolved: 2006-05-31
Related Reports
Duplicate :  
Description
Name: dk106046			Date: 05/14/2003

FULL JDK VERSION(S):
-------------------
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b15)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b15, mixed mode)

java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)


------------
In the "Juke" tab of the Sound Demo, while one file is playing, without stopping it, I select another file and then do a stop 

and start. If I repeat this a number of times, exceptions are thrown and sometimes the demo hangs and the process has to be killed.

Steps to recreate:
1) java -jar JavaSoundDemo.jar 
 (  Note: This demo can be downloaded from http://java.sun.com/products/java-media/sound/samples/JavaSoundDemo )
2) Select the "Juke Box" tab
3) Select one file. Click on "Start". Select some other file. Click on "Stop". Immediately click on "Start".
     Repeat this a number of times selecting different files. A number of exceptions are thrown as below and sometimes the demo hangs. 


java -jar JavaSoundDemo.jar

java.lang.ClassCastException
        at Juke.loadSound(Juke.java:271)
        at Juke.run(Juke.java:409)
        at java.lang.Thread.run(Thread.java:536)
java.lang.IllegalStateException: Sequencer not open
        at com.sun.media.sound.MixerSequencer.stop(MixerSequencer.java:437)
        at Juke.playSound(Juke.java:309)
        at Juke.run(Juke.java:410)
        at java.lang.Thread.run(Thread.java:536)
java.lang.ClassCastException
        at Juke.loadSound(Juke.java:271)
        at Juke.run(Juke.java:409)
        at java.lang.Thread.run(Thread.java:536)

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D2AAC95
Function=[Unknown.]
Library=D:\Java\Sun\jdk1.4.1\jre\bin\jsound.dll

NOTE: We are unable to locate the function name symbol for the error
      just occurred. Please refer to release documentation for possible
      reason and solutions.


Current Java thread:
       at com.sun.media.sound.MixerSequencer.nGetSequenceMicrosecondLength(Native Method)
       at com.sun.media.sound.MixerSequencer.getMicrosecondLength(MixerSequencer.java:758)
       at Juke.loadSound(Juke.java:273)
       at Juke.run(Juke.java:409)
       at java.lang.Thread.run(Thread.java:536)

Dynamic libraries:
0x00400000 - 0x00406000        D:\Java\Sun\jdk1.4.1\bin\java.exe
0x77F60000 - 0x77FBE000        C:\WINNT\System32\ntdll.dll
0x77DC0000 - 0x77DFF000        C:\WINNT\system32\ADVAPI32.dll
0x77F00000 - 0x77F5E000        C:\WINNT\system32\KERNEL32.dll
0x77E70000 - 0x77EC5000        C:\WINNT\system32\USER32.dll
0x77ED0000 - 0x77EFC000        C:\WINNT\system32\GDI32.dll
0x77E10000 - 0x77E67000        C:\WINNT\system32\RPCRT4.dll
0x78000000 - 0x78040000        C:\WINNT\system32\MSVCRT.dll
0x6D330000 - 0x6D45C000        D:\Java\Sun\jdk1.4.1\jre\bin\client\jvm.dll
0x77FD0000 - 0x77FFA000        C:\WINNT\System32\WINMM.dll
0x6BC00000 - 0x6BC10000        C:\WINNT\System32\SMNT40.dll
0x69F00000 - 0x69FBA000        C:\WINNT\System32\adisynth.dll
0x6D1D0000 - 0x6D1D7000        D:\Java\Sun\jdk1.4.1\jre\bin\hpi.dll
0x6D300000 - 0x6D30D000        D:\Java\Sun\jdk1.4.1\jre\bin\verify.dll
0x6D210000 - 0x6D229000        D:\Java\Sun\jdk1.4.1\jre\bin\java.dll
0x6D320000 - 0x6D32D000        D:\Java\Sun\jdk1.4.1\jre\bin\zip.dll
0x6D000000 - 0x6D0FA000        D:\Java\Sun\jdk1.4.1\jre\bin\awt.dll
0x77C00000 - 0x77C18000        C:\WINNT\System32\WINSPOOL.DRV
0x76AB0000 - 0x76AB5000        C:\WINNT\System32\IMM32.dll
0x77B20000 - 0x77BD7000        C:\WINNT\system32\ole32.dll
0x6D2A0000 - 0x6D2C1000        D:\Java\Sun\jdk1.4.1\jre\bin\jsound.dll
0x74100000 - 0x74109000        C:\WINNT\System32\msacm32.drv
0x75D50000 - 0x75D6A000        C:\WINNT\System32\MSACM32.dll
0x6D180000 - 0x6D1D0000        D:\Java\Sun\jdk1.4.1\jre\bin\fontmanager.dll
0x77130000 - 0x77156000        C:\WINNT\System32\ddraw.dll
0x71290000 - 0x71296000        C:\WINNT\system32\MSIDLE.DLL
0x77510000 - 0x77517000        C:\WINNT\System32\msadp32.acm
0x77520000 - 0x77527000        C:\WINNT\System32\imaadp32.acm
0x774F0000 - 0x774F9000        C:\WINNT\System32\msgsm32.acm
0x774E0000 - 0x774E5000        C:\WINNT\System32\tssoft32.acm
0x74980000 - 0x74987000        C:\WINNT\System32\tsd32.dll
0x77500000 - 0x77505000        C:\WINNT\System32\msg711.acm
0x1C200000 - 0x1C250000        C:\WINNT\System32\msaud32.acm
0x6B100000 - 0x6B10B000        C:\WINNT\System32\lhacm.acm
0x6BA00000 - 0x6BA1D000        C:\WINNT\System32\msg723.acm
0x6D130000 - 0x6D152000        D:\Java\Sun\jdk1.4.1\jre\bin\dcpr.dll
0x76AC0000 - 0x76ADD000        C:\WINNT\System32\imagehlp.dll
0x690A0000 - 0x690AB000        C:\WINNT\System32\PSAPI.DLL

Local Time = Mon May 12 20:18:59 2003
Elapsed Time = 18
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode)
#
---------------------------------

======================================================================

Comments
EVALUATION ###@###.### 2003-05-14 Looks like mostly a problem in the demo. It does not exactly use recommended programming practices. The crash should not occur, though. Is it happening on 1.4.2-beta, too? ###@###.### 2003-05-14 Tried to reproduce the problem: it was easy to get the ClassCastExceptions and NullPointerExceptions. But I could only get it to crash with 1.4.1, not with 1.4.2b23.
14-05-2003