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

Stack overflow on Linux using DialogTypeSelection.NATIVE

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8, 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
      2d
    • Resolved In Build:
      b96

      Backports

        Description

        This program shows a stack over flow ..
        import java.awt.print.*;
        import javax.print.*;
        import javax.print.attribute.*;
        import javax.print.attribute.standard.*;

        public class PD {

            public static void main(String args[]) {
               PrinterJob job = PrinterJob.getPrinterJob();
               if (job == null) {
                   return;
               }
               PrintRequestAttributeSet pSet =
                    new HashPrintRequestAttributeSet();
               pSet.add(DialogTypeSelection.NATIVE);
               job.printDialog(pSet);
               job.pageDialog(pSet);
           }
        }

        Exception in thread "main" java.lang.StackOverflowError
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.print.RasterPrinterJob.pageDialog(RasterPrinterJob.java:720)
        at sun.print.RasterPrinterJob.pageDialog(RasterPrinterJob.java:762)
        at sun.print.RasterPrinterJob.pageDialog(RasterPrinterJob.java:737)
        at sun.print.RasterPrinterJob.pageDialog(RasterPrinterJob.java:762)
        at sun.print.RasterPrinterJob.pageDialog(RasterPrinterJob.java:737)


          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  psadhukhan Prasanta Sadhukhan
                  Reporter:
                  prr Philip Race
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: