JDK-6682803 : webcam applet failing with 6u10, http://wuc.fiu.edu/Default.aspx?tabid=208
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows,windows_xp
  • CPU: generic,x86
  • Submitted: 2008-04-01
  • Updated: 2010-09-08
  • Resolved: 2008-05-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u10 b22Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
Running the applet, on Windows XP, 6u10 b14, FF 3.0b4 (or IE 7) and got the errors below. The applet failed to load.

This applet works correctly under 6u5. 

Applet:  http://wuc.fiu.edu/Default.aspx?tabid=208

Forum post:  http://forums.java.net/jive/thread.jspa?threadID=38773&tstart=0


Errors thrown:

START - Java - ENV - Applet2Environment.initialize
START - Java - ENV - Applet2Environment.initialize - PluginSysUtil.getPluginThreadGroup
END - Java - ENV - Applet2Environment.initialize - PluginSysUtil.getPluginThreadGroup
START - Java - ENV - Applet2Environment.initialize - Applet2BrowserService.install
END - Java - ENV - Applet2Environment.initialize - Applet2BrowserService.install
Java Plug-in 1.6.0_10-beta
Using JRE version 1.6.0_10-beta Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\hp


----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

Applet Status: Loading Java Applet ...
Applet Status: Applet loaded.
Applet Status: Applet resized and added to parent container
Applet Status: Applet loaded.
Applet Status: Applet resized and added to parent container
Applet Status: Applet loaded.
Applet Status: Applet resized and added to parent container
Loaded image: http://iwuc325-2.fiu.edu/alarm_genesis.gif
Applet Status: Applet initialized
Applet Status: Applet made visible
Applet Status: Starting applet
Applet Status: Applet started
Applet Status: Told clients applet is started
Loaded image: http://iwuc325-2.fiu.edu/SD.gif
Loaded image: http://iwuc325-2.fiu.edu/SD_full.gif
Applet Status: Applet loaded.
Applet Status: Applet loaded.
Applet Status: Applet resized and added to parent container
java.lang.reflect.InvocationTargetException
at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.runOnEDT(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at MovieApplet.setSize(MovieApplet.java:630)
at sun.plugin2.applet.Plugin2Manager$AppletStubImpl$1.run(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletStubImpl.appletResize(Unknown Source)
at java.applet.Applet.resize(Unknown Source)
at java.applet.Applet.resize(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception: java.lang.reflect.InvocationTargetException
Exception in thread "AWT-EventQueue-5" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPanel.paint(Unknown Source)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Loaded image: http://iwuc325-2.fiu.edu/SD_err.gif
Applet Status: Applet initialized
Applet Status: Applet resized and added to parent container
Applet Status: Applet made visible
Applet Status: Starting applet
Applet Status: Applet started
Applet Status: Told clients applet is started
Applet Status: Loading Java Applet Failed...
java.lang.NullPointerException
at MovieApplet.init(MovieApplet.java:107)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NullPointerException
Applet Status: Applet initialized
Applet Status: Starting applet
Applet Status: Applet started
Applet Status: Told clients applet is started
Loaded image: http://iwuc325-2.fiu.edu/time_icon.gif
Applet Status: Applet initialized
Applet Status: Applet made visible
Applet Status: Starting applet
Applet Status: Applet started
Applet Status: Told clients applet is started
Loaded image: http://iwuc325-2.fiu.edu/btn_sp_ON.gif
Loaded image: http://iwuc325-2.fiu.edu/btn_sp_OFF.gif
Movie:
java.lang.NullPointerException
at MovieApplet.fitToScreen(MovieApplet.java:471)
at MovieApplet.updateImage(MovieApplet.java:373)
at MovieApplet.run(MovieApplet.java:318)
at java.lang.Thread.run(Unknown Source)
Loaded image: http://iwuc325-2.fiu.edu/btn_sp_ON_ac.gif
Loaded image: http://iwuc325-2.fiu.edu/btn_sp_OFF_ac.gif
Applet Status: Applet initialized
Applet Status: Applet made visible
Applet Status: Starting applet
Applet Status: Applet started
Applet Status: Told clients applet is started
Exception in thread "AWT-EventQueue-5" java.lang.NullPointerException
at MovieApplet.setSize(MovieApplet.java:630)
at sun.plugin2.applet.Plugin2Manager$AppletStubImpl$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-5" java.lang.NullPointerException
at MovieApplet.setSize(MovieApplet.java:630)
at sun.plugin2.applet.Plugin2Manager$AppletStubImpl$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-5" java.lang.NullPointerException
at MovieApplet.setSize(MovieApplet.java:630)
at sun.plugin2.applet.Plugin2Manager$AppletStubImpl$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Movie:
java.lang.NullPointerException
at MovieApplet.updateImage(MovieApplet.java:376)
at MovieApplet.run(MovieApplet.java:318)
at java.lang.Thread.run(Unknown Source)
Exception in thread "AWT-EventQueue-5" java.lang.NullPointerException
at MovieApplet.setSize(MovieApplet.java:630)
at sun.plugin2.applet.Plugin2Manager$AppletStubImpl$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Movie:
java.lang.NullPointerException
at MovieApplet.updateImage(MovieApplet.java:376)
at MovieApplet.run(MovieApplet.java:318)
at java.lang.Thread.run(Unknown Source)
Movie:
java.lang.NullPointerException
at MovieApplet.updateImage(MovieApplet.java:376)
at MovieApplet.run(MovieApplet.java:318)
at java.lang.Thread.run(Unknown Source)
Movie:
java.lang.NullPointerException
at MovieApplet.updateImage(MovieApplet.java:376)
at MovieApplet.run(MovieApplet.java:318)
at java.lang.Thread.run(Unknown Source)
Movie:
java.lang.NullPointerException
at MovieApplet.updateImage(MovieApplet.java:376)
at MovieApplet.run(MovieApplet.java:318)
at java.lang.Thread.run(Unknown Source)
Movie:
java.lang.NullPointerException
at MovieApplet.updateImage(MovieApplet.java:376)
at MovieApplet.run(MovieApplet.java:318)
at java.lang.Thread.run(Unknown Source)
Movie:
java.lang.NullPointerException
at MovieApplet.updateImage(MovieApplet.java:376)
at MovieApplet.run(MovieApplet.java:318)
at java.lang.Thread.run(Unknown Source)
Movie:
java.lang.NullPointerException
at MovieApplet.updateImage(MovieApplet.java:376)
at MovieApplet.run(MovieApplet.java:318)
at java.lang.Thread.run(Unknown Source)
Movie:
java.lang.NullPointerException
at MovieApplet.updateImage(MovieApplet.java:376)
at MovieApplet.run(MovieApplet.java:318)
at java.lang.Thread.run(Unknown Source)


that last thing, keeps saying the same thing over and over....

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/deployment_data/6u10/6682803.0
02-04-2008

EVALUATION The applet has its own setSize method. But if it's called before init, the canvas component is still null resulting in NPE. In the old plugin code, we never call setSize on the applet but only call resize. The only time the old plugin code calls setSize is on a component like panel, frame, etc. A simple fix is to call resize instead of setSize in AppletStubImpl.appletResize.
02-04-2008