JDK-7124552 : [macosx] NullPointerException in getBufferStrategy()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic
  • Submitted: 2011-12-23
  • Updated: 2017-05-24
  • Resolved: 2012-03-05
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 7 JDK 8 Other
7u4 b13Fixed 8Fixed openjdk7uFixed
Related Reports
Relates :  
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 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.
15-02-2012

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

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
23-12-2011