[OPENJDK6-26] VM Crash when using javax.print API on Mac Created: 21/Jan/14  Updated: 22/Jan/14  Resolved: 22/Jan/14

Status: Closed
Project: openjdk6
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: danstain Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java Version: 1.7.0_21, Mac OS X Marvericks


Tags: MACOSX_PORT

 Description   

DocFlavor flavor = DocFlavor.INPUT_STREAM.PNG;

PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
pras.add(new Copies(1));

PrintService pss[] = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.GIF, pras);

if (pss.length == 0)
throw new SystemException("No printer services available.");

PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gs = ge.getDefaultScreenDevice();
GraphicsConfiguration gc = gs.getDefaultConfiguration();
PrintService service = ServiceUI.printDialog(gc, x, y, pss, defaultService, DocFlavor.INPUT_STREAM.GIF, pras);

-> Crash on last line.

2014-01-21 23:26:49.318 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x000000011073a97a Java_sun_java2d_opengl_CGLLayer_nativeCreateLayer + 119
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
2 ??? 0x0000000106aaf2f5 0x0 + 4406833909
3 ??? 0x0000000106aaf1d8 0x0 + 4406833624
4 ??? 0x0000000106aaf1d8 0x0 + 4406833624
)
2014-01-21 23:26:49.319 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.319 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x00000001107435de Java_sun_lwawt_macosx_CPlatformView_nativeCreateView + 169
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
2 ??? 0x0000000106aaf2f5 0x0 + 4406833909
3 ??? 0x0000000106aaf1d8 0x0 + 4406833624
)
2014-01-21 23:26:49.319 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.320 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x0000000110743976 Java_sun_lwawt_macosx_CPlatformWindow_nativeCreateNSWindow + 188
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
2 ??? 0x0000000106aaf2f5 0x0 + 4406833909
)
2014-01-21 23:26:49.321 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.326 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x0000000110749102 Java_sun_lwawt_macosx_CPlatformComponent_nativeCreateComponent + 119
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
2 ??? 0x0000000106aaf2f5 0x0 + 4406833909
3 ??? 0x0000000106aaf886 0x0 + 4406835334
4 ??? 0x0000000106aaf1d8 0x0 + 4406833624
)
2014-01-21 23:26:49.326 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.327 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x0000000110748047 Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowBounds + 79
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
2 ??? 0x0000000106aaf1d8 0x0 + 4406833624
3 ??? 0x0000000106aaf886 0x0 + 4406835334
)
2014-01-21 23:26:49.327 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.328 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x0000000110748cb7 Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowTitle + 60
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
)
2014-01-21 23:26:49.328 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.328 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x0000000110748528 Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowStyleBits + 69
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
2 ??? 0x0000000106aaf1d8 0x0 + 4406833624
3 ??? 0x0000000106aaf1d8 0x0 + 4406833624
)
2014-01-21 23:26:49.328 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.329 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x0000000110747eb1 Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowMinMax + 79
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
2 ??? 0x0000000106aaf1d8 0x0 + 4406833624
3 ??? 0x0000000106aaf886 0x0 + 4406835334
)
2014-01-21 23:26:49.329 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.329 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x0000000110748dc1 Java_sun_lwawt_macosx_CPlatformWindow_nativeGetNSWindowInsets + 72
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
)
2014-01-21 23:26:49.329 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.399 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x0000000110748047 Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowBounds + 79
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
2 ??? 0x0000000106aaf1d8 0x0 + 4406833624
3 ??? 0x0000000106aaf886 0x0 + 4406835334
)
2014-01-21 23:26:49.400 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.425 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x0000000110747822 Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowMinimizedIcon + 64
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
2 ??? 0x0000000106aaf1d8 0x0 + 4406833624
3 ??? 0x0000000106aaf1d8 0x0 + 4406833624
4 ??? 0x0000000106aaf886 0x0 + 4406835334
)
2014-01-21 23:26:49.425 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.426 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x00000001107475eb Java_sun_lwawt_macosx_CPlatformWindow_nativeSynthesizeMouseEnteredExitedEvents + 59
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
2 ??? 0x0000000106aaf1d8 0x0 + 4406833624
3 ??? 0x0000000106aaf886 0x0 + 4406835334
)
2014-01-21 23:26:49.427 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2014-01-21 23:26:49.427 java[53728:507] Cocoa AWT: Running on AppKit thread 0 when not expected. (
0 liblwawt.dylib 0x0000000110748528 Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowStyleBits + 69
1 ??? 0x0000000106ac0db1 0x0 + 4406906289
2 ??? 0x0000000106aaf1d8 0x0 + 4406833624
3 ??? 0x0000000106aaf1d8 0x0 + 4406833624
)
2014-01-21 23:26:49.427 java[53728:507] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.lwawt.macosx.CPlatformWindow.getLocationOnScreen(CPlatformWindow.java:437)
at sun.lwawt.LWWindowPeer.getLocationOnScreen(LWWindowPeer.java:370)
at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:2033)
at java.awt.Component.getLocationOnScreen(Component.java:2018)
at java.awt.Component$AccessibleAWTComponent.getLocationOnScreen(Component.java:9435)
at javax.swing.JComponent$AccessibleJComponent.getLocationOnScreen(JComponent.java:3679)
at javax.swing.text.JTextComponent$AccessibleJTextComponent$1.componentMoved(JTextComponent.java:2577)
at java.awt.Component.processComponentEvent(Component.java:6334)
at java.awt.Component.processEvent(Component.java:6285)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:702)
at java.awt.EventQueue$4.run(EventQueue.java:700)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)



 Comments   
Comment by danstain [ 21/Jan/14 ]

Same crash when using null here:

PrintService service = ServiceUI.printDialog(null, x, y, pss, defaultService, DocFlavor.INPUT_STREAM.GIF, pras);

That code works fine on a Windows JRE 1.7 from Oracle, but not on JRE 1.7 on Mac

Comment by omajid [ 22/Jan/14 ]

I think you have wrong bug tracker. This is the OpenJDK6 bug tracker. It's only for tracking bugs in OpenJDK6. Not those in OpenJDK 7 (or 8). OpenJDK6 also does not have a mac port.

You want one of:

The stack trace itself says: "Please file a bug report at http://java.net/jira/browse/MACOSX_PORT"

Generated at Sun Aug 30 07:40:42 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.