Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8170917

Crash Printing Report with Image

    Details

    • Subcomponent:
      2d
    • CPU:
      x86
    • OS:
      os_x

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_112"
      Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
      Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      OSX 10.11

      A DESCRIPTION OF THE PROBLEM :
      Implementing a Report with Crystal Reports, Printing in Linux and Windows fine.
      When Printing the report in OSX I get an Error.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      The report has a Image that expects a uri parameter of the report. I pass the Uri of a Temporary File I just created with a buffered Image writen to it.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The Report would print like in Windows and Linux.
      ACTUAL -
      Crash of the Image print and report comes out of the printer without the image, place for image seems to be in report.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :

      java[4158:296875] Cocoa AWT: Not running on AppKit thread 0 when expected. (
      0 libosxapp.dylib 0x000000011b5a0702 +[ThreadUtilities getJNIEnv] + 38
      1 libawt_lwawt.dylib 0x000000011b514421 syncFromJavaPixels + 1842
      2 libawt_lwawt.dylib 0x000000011b5148b7 LockImage + 75
      3 libawt_lwawt.dylib 0x000000011b527850 Java_sun_java2d_CRenderer_doImage + 170
      4 ??? 0x0000000106a15574 0x0 + 4406203764
      5 ??? 0x0000000106a07ffd 0x0 + 4406149117
      )
      java[4158:296875] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
      java.lang.StackOverflowError
      at sun.java2d.CRenderer.doImage(Native Method)
      at sun.java2d.OSXSurfaceData.blitImage(OSXSurfaceData.java:1027)
      at sun.java2d.CRenderer.blitImage(CRenderer.java:461)
      at sun.java2d.CRenderer.scaleImage(CRenderer.java:455)
      at sun.java2d.CRenderer.transformImage(CRenderer.java:508)
      at sun.java2d.CRenderer.transformImage(CRenderer.java:582)
      at sun.java2d.pipe.ValidatePipe.transformImage(ValidatePipe.java:230)
      at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3461)
      at sun.print.ProxyGraphics2D.drawImage(ProxyGraphics2D.java:1315)
      at org.apache.pdfbox.rendering.PageDrawer.drawBufferedImage(PageDrawer.java:835)
      at org.apache.pdfbox.rendering.PageDrawer.drawImage(PageDrawer.java:793)
      at org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:62)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149)
      at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:189)
      at org.apache.pdfbox.rendering.PDFRenderer.renderPageToGraphics(PDFRenderer.java:184)
      at org.apache.pdfbox.printing.PDFPrintable.print(PDFPrintable.java:190)
      at sun.lwawt.macosx.CPrinterJob$4.run(CPrinterJob.java:662)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
      at java.awt.EventQueue.access$500(EventQueue.java:97)
      at java.awt.EventQueue$3.run(EventQueue.java:709)
      at java.awt.EventQueue$3.run(EventQueue.java:703)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
      at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
      at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
      at sun.lwawt.macosx.CPrinterJob.print(CPrinterJob.java:300)
      at pkg2SoftUtilsPrints.PrintRpt.run(PrintRpt.java:68)
      at pkg2soft.posfaturas.FaturaImpressao.ButtonPrintActionPerformed(FaturaImpressao.java:767)
      at pkg2soft.posfaturas.FaturaImpressao.access$300(FaturaImpressao.java:38)
      at pkg2soft.posfaturas.FaturaImpressao$4.actionPerformed(FaturaImpressao.java:511)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
      at java.awt.Component.processMouseEvent(Component.java:6533)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
      at java.awt.Component.processEvent(Component.java:6298)
      at java.awt.Container.processEvent(Container.java:2236)
      at java.awt.Component.dispatchEventImpl(Component.java:4889)
      at java.awt.Container.dispatchEventImpl(Container.java:2294)
      at java.awt.Component.dispatchEvent(Component.java:4711)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
      at java.awt.Container.dispatchEventImpl(Container.java:2280)
      at java.awt.Window.dispatchEventImpl(Window.java:2746)
      at java.awt.Component.dispatchEvent(Component.java:4711)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
      at java.awt.EventQueue.access$500(EventQueue.java:97)
      at java.awt.EventQueue$3.run(EventQueue.java:709)
      at java.awt.EventQueue$3.run(EventQueue.java:703)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
      at java.awt.EventQueue$4.run(EventQueue.java:731)
      at java.awt.EventQueue$4.run(EventQueue.java:729)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      The Report is part of a POS Application and there are a number of classes involved in printing the report.
      Contact me if you need a copy of the application. Would be hard to isolate.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      I have implemented the display of the report on screen, the report is rendered to a BufferedImage, that I can then print. But the text looks bad and not sure if I can increase the quality.

        Attachments

          Activity

            People

            • Assignee:
              aroy Abhijit Roy (Inactive)
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: