[Sablevm-bugs] [ sablevm-Bugs-923922 ] Runtime.addShutdownHook: NullPointerException
Brought to you by:
egagnon
From: SourceForge.net <no...@so...> - 2004-03-27 02:27:42
|
Bugs item #923922, was opened at 2004-03-26 10:03 Message generated for change (Comment added) made by davidbelanger You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105523&aid=923922&group_id=5523 Category: Execution Problem Group: SableVM Status: Open Resolution: None Priority: 5 Submitted By: Laurent Martelli (laurentmartelli) Assigned to: Nobody/Anonymous (nobody) Summary: Runtime.addShutdownHook: NullPointerException Initial Comment: java.lang.ExceptionInInitializerError at java.lang.VMClass.initialize (VMClass.java:140) at java.lang.Class.initialize (Class.java:163) at java.lang.reflect.Method.invokeNative (Method.java) at java.lang.reflect.Method.invoke (Method.java:552) at org.objectweb.jac.core.JacLoader.run (JacLoader.java:570) at org.objectweb.jac.core.Jac.main (Jac.java:321) at java.lang.VirtualMachine.invokeMain (VirtualMachine.java) at java.lang.VirtualMachine.main (VirtualMachine.java:88) Caused by: java.lang.NullPointerException at java.lang.Thread.isAlive (Thread.java:601) at java.lang.Runtime.addShutdownHook (Runtime.java:351) at org.objectweb.jac.core.ACManager.static{} (ACManager.java:89) at java.lang.VMClass.step8 (VMClass.java) at java.lang.VMClass.initialize (VMClass.java:126) ...7 more ACManager reads: static { Runtime.getRuntime().addShutdownHook( new Thread() { public void run() { if (acManager!=null) { logger.info("JAC system shutdown: notifying all ACs..."); acManager.onExit(); } logger.info("Bye bye."); } } ); } Changig Thread.javaline 601 to be like this: return vmThread != null && vmThread.isAlive(); fixes the problem for me. ---------------------------------------------------------------------- Comment By: David Bélanger (davidbelanger) Date: 2004-03-26 21:27 Message: Logged In: YES user_id=694080 This has now been fixed in staging. David ---------------------------------------------------------------------- Comment By: David Bélanger (davidbelanger) Date: 2004-03-26 16:56 Message: Logged In: YES user_id=694080 Hi, This is the correct fix. I also fixed a similar bug. The fixes will get into SableVM/staging branch later today. Thank you for reporting this bug. David ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105523&aid=923922&group_id=5523 |