Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6658398
Votes 0
Synopsis a regression test MemoryLeakTest threw exceptions.
Category java:classes_2d
Reported Against
Release Fixed 6u10(b20)
State 10-Fix Delivered, Verified, bug
Priority: 3-Medium
Related Bugs
Submit Date 01-FEB-2008
Description
Java Version: 1.6.0_10-ea-b11
Platform: Solaris-Sparc 10
Problem: Running the test MemoryLeakTest with d3d flag, when you max/min the test windows as instruction says, it threw exceptions as below, but it is not always threw.
/net/jre.sfbay/p/v06/jdk/6_10/ea/b11/binaries/solaris-sparc/bin/java -Dsun.java2d.d3d=True MemoryLeakTest
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at MemoryLeak.componentResized(MemoryLeakTest.java:131)
        at java.awt.Component.processComponentEvent(Component.java:5920)
        at java.awt.Component.processEvent(Component.java:5874)
        at java.awt.Container.processEvent(Container.java:2058)
        at java.awt.Window.processEvent(Window.java:1801)
        at java.awt.Component.dispatchEventImpl(Component.java:4466)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Window.dispatchEventImpl(Window.java:2443)
        at java.awt.Component.dispatchEvent(Component.java:4296)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:284)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)        
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)        
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
MemoryLeakTest Failed.
Exception in thread "main" java.lang.Exception: MemoryLeakTest failed.
        at MemoryLeakTest.main(MemoryLeakTest.java:27)

How to reproduce the problem:
Use 6u10-b11 java which in:
/net/jre.sfbay/p/v06/jdk/6_10/ea/b11/binaries/solaris-sparc
to run the regression test in 
/net/jano1/export1/jcg/ws/6uN/jcg/j2se/test/java/awt/image/MemoryLeakTest
Posted Date : 2008-02-01 23:02:30.0
Work Around
N/A
Evaluation
D3D is only present on Windows platform, the test is failing
on Solaris so passing this flag has no relevance.

This appears to be caused by some changes in AWT (or just
the right timing).

The "oldimage" which is init-ed to "osImage" can be null 
only if componentResized event is  received before componentShown 
(where the osImage is initialized).

Reassigning to awt.
Posted Date : 2008-02-01 23:36:15.0

The test has been failing since at least JDK6-b61 (works fine with b46).
Posted Date : 2008-02-26 17:15:12.0

At the same time, I don't see any place in specification which prohibits componentResized notifications for invisible components. If such notifications are really acceptable, then the test should be corrected.
Posted Date : 2008-02-26 17:19:23.0

I'm afraid this is a defect in the test itself which is due to an undetermined order of  ComponentEvents. We can't guarantee anything about it because on different platforms they may come in a different order. 
If the ComponentShowing event comes first there seem osImage becomes initialized and following componentResized() method addresses non-null value to invoke its method. Othervise we use null value to invoke method.
BTW, I'm constantly able to reproduce NPE w/o d3d flag on Windows2000 with JDK6.0.
Posted Date : 2008-02-27 13:55:11.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang