United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7124552 [macosx] NullPointerException in getBufferStrategy()
JDK-7124552 : [macosx] NullPointerException in getBufferStrategy()

Details
Type:
Bug
Submit Date:
2011-12-23
Status:
Closed
Updated Date:
2012-03-22
Project Name:
JDK
Resolved Date:
2012-03-05
Component:
client-libs
OS:
os_x
Sub-Component:
java.awt
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u4 (b13)

Related Reports
Backport:
Relates:

Sub Tasks

Description
http://java.net/jira/browse/MACOSX_PORT-249 submitted 2011/08/09 by Alexander Petrov
1)For Canvas call createBufferStrategy(2)
2)call getBufferStrategy()
Result:
java.lang.NullPointerException
at java.awt.Component.getDrawGraphics(Component.java:4115)
at RenderingToCachedGraphicsTest.runTest(RenderingToCachedGraphicsTest.java:92)
at RenderingToCachedGraphicsTest.access./Mac2.bugs00(RenderingToCachedGraphicsTest.java:51)
at RenderingToCachedGraphicsTest.paint(RenderingToCachedGraphicsTest.java:71)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
at sun.awt.RepaintArea.paint(RepaintArea.java:240)
at sun.lwawt.LWComponentPeer.handleJavaPaintEvent(LWComponentPeer.java:980)
at sun.lwawt.LWComponentPeer.handleEvent(LWComponentPeer.java:945)
at java.awt.Component.dispatchEventImpl(Component.java:4936)
at java.awt.Component.dispatchEvent(Component.java:4686)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
at java.awt.EventQueue.access./Mac2.bugs00(EventQueue.java:101)
at java.awt.EventQueue.run(EventQueue.java:666)
at java.awt.EventQueue.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue.run(EventQueue.java:680)
at java.awt.EventQueue.run(EventQueue.java:678)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Build: b202
Keywords: test-fail-macos
Tests failed (Regression):
sun/java2d/DirectX/RenderingToCachedGraphicsTest/RenderingToCachedGraphicsTest.java

                                    

Comments
EVALUATION

Author: Alexander Petrov Date: 16/Aug/11 01:12 PM
java.lang.RuntimeException: Failed: rendering didn't show up
at RenderingToCachedGraphicsTest.main(RenderingToCachedGraphicsTest.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.javatest.regtest.MainWrapper.run(MainWrapper.java:94)
at java.lang.Thread.run(Thread.java:722)
 
Author: Alexander Petrov Date: 27/Sep/11 04:01 PM
Build: b208
Tests failed (Regression):
closed/java/awt/Component/6307563/bug6307563.java
                                     
2011-12-23
EVALUATION

1 npe in sun/java2d/DirectX/RenderingToCachedGraphicsTest/RenderingToCachedGraphicsTest.java was fixed. But this test still failed because Toolkit.getDefaultToolkit().sync(); is not implemented.
2 closed/java/awt/Component/6307563/bug6307563.java its another bug

Both should be refiled separately.
                                     
2012-02-15
SUGGESTED FIX

http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/0dac7f8b4282
                                     
2012-02-15



Hardware and Software, Engineered to Work Together