The GrayBoxPainter in the plug-in is notorious for the exceptions it prints to the Java Console. The root cause of these exceptions is the fact that this class is generally used in a thread-unsafe manner, which is at least partially unavoidable (at least, not without large restructuring of the code) due to how the download progress callbacks work. Here, however, is a stack trace from the new Java Plug-In where such an error causes an applet to not load properly: java.lang.NullPointerException: component argument pData at sun.java2d.windows.GDIRenderer.doFillRect(Native Method) at sun.java2d.windows.GDIRenderer.fillRect(GDIRenderer.java:129) at sun.java2d.pipe.ValidatePipe.fillRect(ValidatePipe.java:58) at sun.java2d.SunGraphics2D.fillRect(SunGraphics2D.java:2274) at sun.plugin.util.GrayBoxPanel.paint(GrayBoxPanel.java:133) at sun.plugin.util.GrayBoxPainter.paintGrayBox(GrayBoxPainter.java:363) at sun.plugin.util.GrayBoxPainter.repaintGrayBox(GrayBoxPainter.java:313) at sun.plugin.util.GrayBoxPainter.access$200(GrayBoxPainter.java:37) at sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener.progressFinish(GrayBoxPainter.java:491) at sun.plugin.util.EventMulticaster.progressFinish(EventMulticaster.java:114) at sun.plugin.util.ProgressMonitor.unregisterSource(ProgressMonitor.java:176) at sun.net.ProgressSource.finishTracking(ProgressSource.java:137) at sun.net.www.http.KeepAliveStream.close(KeepAliveStream.java:91) at sun.net.www.MeteredStream.justRead(MeteredStream.java:75) at sun.net.www.MeteredStream.read(MeteredStream.java:117) at java.io.FilterInputStream.read(FilterInputStream.java:116) at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2385) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at sun.plugin2.applet.Applet2ClassLoader.getBytes(Applet2ClassLoader.java:549) at sun.plugin2.applet.Applet2ClassLoader.access$700(Applet2ClassLoader.java:55) at sun.plugin2.applet.Applet2ClassLoader$2.run(Applet2ClassLoader.java:224) at java.security.AccessController.doPrivileged(Native Method) at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:221) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at sun.plugin2.applet.Applet2ClassLoader.loadCode(Applet2ClassLoader.java:864) at sun.plugin2.applet.Applet2Manager.createApplet(Applet2Manager.java:2835) at sun.plugin2.applet.Applet2Manager.access$2000(Applet2Manager.java:87) at sun.plugin2.applet.Applet2Manager$AppletExecutionRunnable.run(Applet2Manager.java:1399) at java.lang.Thread.run(Thread.java:619) We need to guard against RuntimeExceptions propagating out of the GrayBoxPainter and use Trace.ignoredException() to display them, so that if tracing is turned off they don't pollute the Java Console output.
|