Duplicate :
|
Name: rmT116609 Date: 06/02/2003 java version "1.4.2-beta" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19) Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode) FULL OS VERSION : Microsoft Windows XP [Version 5.1.2600] \-> WinXP pro Linux gala.cime.net 2.4.2-2 #1 Sun Apr 8 19:37:14 EDT 2001 i586 unknown - Reproducibly under either OS A DESCRIPTION OF THE PROBLEM : Once used, AudioSystem will never shutdown properly and resources will potentially leak over time. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Run testcase EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Process terminates cleanly once end of main() is reached. ACTUAL - Process hangs indefinately. REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- import javax.sound.sampled.*; import javax.sound.sampled.DataLine.Info; public class ShutdownBug { public static void main(String[] args) { System.out.println("Program init"); Info info = new javax.sound.sampled.DataLine.Info(SourceDataLine.class, null); AudioSystem.isLineSupported(info); //If this line is removed, the main thread shuts down properly System.out.println("Program shutdown"); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : Forcibly shutdown using System.exit() (Review ID: 186890) ======================================================================