Menu

#4115 PrinterIOException when I try to print

normal bug
open
5
2021-11-05
2021-10-21
No

I can not print with jedit anymore to my linux cups printers and the pdf printer. Printing in a postscript file works. I can print this postscript file with lpr later.
jEdit gives me a PrinterIOException as message, nevertheless I can't see the whole stacktrace in the activity log.
I had a similar issue with intellij idea (also java based) where I was also not able to print, but here I was able to see the stack trace: finally the command 'lpr -o job-sheets=standard' was generated, and my lpr gives then an error that 'standard' is not known. Disabling the banner page in the intellij print dialog was the solution there. I can of course not be sure if this is the same issue as in jEdit. I found no possibility to disable banner pages in jEdit to check it out this way.

jEdit version: 5.6.0 with openJdk 17 (tried different java versions)
OS OpenSuse 15.3

Discussion

  • Dale Anson

    Dale Anson - 2021-10-28

    You can't print to any hardware printer?

    If you open the activity.log file directly, rather than in the Activity Log viewer, can you see the whole stack trace?

    Testing locally, printing to a hardware printer works fine, printing to postscript works fine, printing to pdf does not -- it appears there needs to be special handling for pdf printing like there is for postscript printing. I'll test some more and confirm.

     
    • z/VMphile

      z/VMphile - 2021-10-28
      My apologies to the jEdit-devel list. This message escaped from my mailer and was not
      

      intended for you.

      Leslie

       
  • Dale Anson

    Dale Anson - 2021-10-28
    • assigned_to: Dale Anson
     
  • Dale Anson

    Dale Anson - 2021-10-28

    I've been reading up on cups. Try this: print something to the pdf printer, then look in /var/spool/cups-pdf/(your user name). Is there a pdf file there with what you printed? That's the default location that cups puts pdf output. I'm still looking into how you can set a filename for it, though. When I do it, I get a file named "var_spool_cups-pdf_danson.pdf".

     
  • Dale Anson

    Dale Anson - 2021-10-28

    I've checked in a fix so that you can choose a directory and filename for printing to a pdf. Will this solve your problem?

     
  • Makarius

    Makarius - 2021-10-29

    Here is a stack trace with jEdit rev 25530 with OpenJDK 64-Bit Server VM Zulu17.28+13-CA on Linux:

    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask: java.util.ConcurrentModificationException
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1220)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.jedit.syntax.Chunk.init(Chunk.java:539)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.jedit.syntax.DisplayTokenHandler.initChunk(DisplayTokenHandler.java:175)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.jedit.syntax.DisplayTokenHandler.initChunks(DisplayTokenHandler.java:184)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.jedit.syntax.DisplayTokenHandler.makeScreenLine(DisplayTokenHandler.java:392)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.jedit.syntax.DisplayTokenHandler.handleToken(DisplayTokenHandler.java:96)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at isabelle.jedit.Token_Markup$Marker.markTokens(token_markup.scala:297)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.jedit.Buffer.markTokens(Buffer.java:1844)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.jedit.buffer.JEditBuffer.markTokens(JEditBuffer.java:1387)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.jedit.print.BufferPrintable1_7.calculatePages(BufferPrintable1_7.java:326)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.jedit.print.BufferPrintable1_7.print(BufferPrintable1_7.java:147)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at java.desktop/sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:2280)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1659)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at java.desktop/sun.print.UnixPrintJob.printableJob(UnixPrintJob.java:652)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at java.desktop/sun.print.UnixPrintJob.print(UnixPrintJob.java:518)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.jedit.print.BufferPrinter1_7$1.run(BufferPrinter1_7.java:152)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.util.TaskManager$MyTask._run(TaskManager.java:244)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at org.gjt.sp.util.Task.run(Task.java:65)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    11:16:47 AM [jEdit Worker #1] [error] TaskManager$MyTask:  at java.base/java.lang.Thread.run(Thread.java:833)
    

    I have seen this java.util.ConcurrentModificationException in other situations as well, e.g. the Plugin Manager / Update dialog (but cannot reproduce it now).

     
  • Christian Reuschling

    Printing to cups-pdf works with no problem, I can choose a filename and the pdf will be generated. Nevertheless, printing to hardware printers still not works. And I still see no error message in the activity.log file - also by looking into it directly, also with the newest revision r25530

     

Log in to post a comment.