United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6761680 NullPointerException thrown when dragging applets out of browser with virtualized X11 guest OSs
JDK-6761680 : NullPointerException thrown when dragging applets out of browser with virtualized X11 guest OSs

Details
Type:
Bug
Submit Date:
2008-10-21
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2009-01-30
Component:
deploy
OS:
generic
Sub-Component:
plugin
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u12
Fixed Versions:
6u12 (b01)

Related Reports
Relates:

Sub Tasks

Description
While running OpenSolaris from within VMWare Fusion with Firefox 3 and the new Java Plug-In it was discovered that attempting to drag applets out of the web browser failed with the following NullPointerException:

Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
	at sun.plugin2.applet.DragHelper$PerAppletInfo.setupWindow(Unknown Source)
	at sun.plugin2.applet.DragHelper$PerAppletInfo.dispatchEventImpl(Unknown Source)
	at sun.plugin2.applet.DragHelper$PerAppletInfo.dispatchEvent(Unknown Source)
	at sun.plugin2.applet.DragHelper.dispatchEvent(Unknown Source)
	at sun.plugin2.applet.DragHelper.access$500(Unknown Source)
	at sun.plugin2.applet.DragHelper$1$1.eventDispatched(Unknown Source)
	at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)
	at java.awt.Toolkit.notifyAWTEventListeners(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)

This is apparently occurring because the returned DisplayMode is null while attempting to determine the screen's size for the fix for 6702679. It's likely this is occurring because the X server doesn't have the required X extensions while running in a VM.

                                    

Comments
SUGGESTED FIX

webrev: http://sa.sfbay.sun.com/projects/deployment_data/6u12/6761680.0
testcase: none / hard
                                     
2008-10-21
EVALUATION

Added null checks to guard against NPEs in conditions where Java SE
APIs for querying the screen size return null.

Fix has been verified in the environment in question (OpenSolaris
running inside VMWare Fusion on Mac OS X). It will be difficult to
reproduce the exact configuration so not providing a specific
regression test.
                                     
2008-10-21
EVALUATION

I am not having the exact test environment and also I don;t have any ready testcase, hence closing this bug with substatus as unverified.
                                     
2009-01-30



Hardware and Software, Engineered to Work Together