IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2013/09/04)2013/09/05 
Jayson Hello everyone!When I frequently zoom one page ,maybe the program creates too much bitmap,it crashes.The report is as follows: 09-04 11:01:28.472: E/AndroidRuntime(17496): FATAL EXCEPTION: AsyncTask #5 09-04 11:01:28.472: E/AndroidRuntime(17496): java.lang.RuntimeException: An error occured while executing doInBackground() 09-04 11:01:28.472: E/AndroidRuntime(17496): at com.artifex.mupdfdemo.AsyncTask$3.done(AsyncTask.j02:43.58 
robin_watts_mac plinnell: earth calling plinnell, come in plinnell 22:01.00 
  paulgardiner, kens, chrisl, anyone else: Miles just called. 6:30 in the lobby, instead of 6.22:06.17 
chrisl robin_watts_mac: okay, cheers22:06.50 
kens OK got that22:12.30 
russcriptor hey guys, not sure if anyone is around, but I seem to be having an issue with png16m device22:14.37 
  ghostscript keeps crashing with it, but when using pngalpha it works fine22:14.54 
chrisl russcriptor: what platform? Where did you get Ghostscript?22:23.08 
russcriptor centos 6 x6422:30.40 
  tried using binaries and compiling from source22:30.57 
chrisl OKay, using the default build (i.e. the libpng we ship)?22:31.21 
russcriptor yep22:31.40 
  just a straight ./configure22:31.45 
chrisl Your best course is to raise a bug at http://bugs.ghostscript.com/ and attach a file that shows the problem22:32.31 
russcriptor k, I wonder if it's because I'm using -dTextAlphaBits=4 -dGraphicsAlphaBits=422:34.14 
  and not using an alpha device?22:34.20 
chrisl No, that should work. What version of gs are you using?22:35.00 
russcriptor 9.1022:35.06 
  and it works fine on a different box 9.0122:35.26 
chrisl Hmm, well, I just tried a couple of files through png16m with -dTextAlphaBits=4 -dGraphicsAlphaBits=4 and it didn't crash, so it's not a general problem with the device22:36.06 
russcriptor hmm22:37.15 
  i'm throwing pdf files at it22:37.19 
  that were generated in reportlab22:37.26 
  is there a test pdf i cant throw at it?22:38.14 
chrisl If you look in the examples directory in the gs distribution, there are some pdfs in there - I haven't tried those, actually22:39.20 
  Those seem fine, so it's either something specific about your command line options, or about the PDFs you've got that's triggering the problem22:41.05 
russcriptor none of the pdfs seem to work22:41.59 
  i'm doing this22:42.01 
  cat black.pdf | /usr/local/bin/gs -dMaxBitmap=999999 -dNOGC -dFirstPage=1 -q -dSAFER -dNOPAUSE -dBATCH -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=png16m -dDownScaleFactor=10 -r195.0x195.0 -sOutputFile=- -f -22:42.03 
  black.pdf is in ghostscript-9.10/contrib/pscolor22:42.24 
chrisl Well, don't use -dNOGC for a start - that's a *really* bad idea!22:42.55 
russcriptor hmm what does that do22:43.04 
chrisl It disables memory garbage collection22:43.19 
russcriptor wouldn't the memory be freed as soon as the process exits?22:44.29 
chrisl Yes, but basically it means we'll just keep accumulating memory as the task progresses - a complex file will run out of memory22:45.53 
  FWIW, I get an error, but no crash with something similar to the above command line22:46.26 
russcriptor I think I meant an error22:47.20 
  when I said crash22:47.24 
  libpng error: No IDATs written into file IHDR¦Ó> pHYsÙ˲`tEXtSoftwareGPL Ghostscript 9.10ÞAError: /VMerror in --showpage-- VM status: 3 646753 1968748 Current allocation mode is local Last OS error: 2 GPL Ghostscript 9.10: Unrecoverable error, exit code 122:47.39 
chrisl Yeh, that's not a crash.....22:47.58 
russcriptor so it breaks for you too the same way?22:49.21 
  it works fine for me on 9.01 FWIW22:49.37 
chrisl Yeh, it's the combination of -dTextAlphaBits=4 -dGraphicsAlphaBits=4 and -ddDownScaleFactor=10 that does it22:50.01 
  Remove the -dDownScaleFactor=10 and it works fine for me22:50.47 
russcriptor so is it a bug22:50.47 
chrisl No, not a bug22:50.54 
russcriptor or am I just sending in crazy options22:50.54 
chrisl You're asking it to render at an internal resolution of 7800dpi and it runs out of memory - hence VMError in showpage22:51.48 
russcriptor but I have a ton of memory22:52.53 
  do I need an options to let it use more?22:53.05 
chrisl Do you really *want* it to render at that resolution?22:53.20 
russcriptor and wouldn't pngalpha be doing the same thing22:53.25 
  well we were having issues with text rendering bad22:53.37 
  which is why we put this fix in22:53.43 
chrisl pngalpha is probably ignoring -dDownScaleFactor=10 (just as 9.01 would be)22:53.59 
russcriptor hmm... we might've put that in because we were testing on 9.0122:55.35 
  it probably didn't make a difference though22:55.51 
chrisl A doubt -dDownScaleFactor=10 makes sense anyway. Rendering at 10x resolution and downsampling is unlikely to result legible text22:57.49 
  s/A/I22:57.55 
russcriptor what would be a better solution?22:58.07 
  we have a PDF that we are converting to an image22:58.21 
  and the image is fairly small22:58.28 
  so the text ends up looking bad22:58.34 
chrisl Personally, I would just use the -dTextAlphaBits=4 -dGraphicsAlphaBits=4 options, *or* -dDownScaleFactor=423:00.00 
russcriptor ok, chrisl, thanks a lot23:04.56 
robin_watts_mac chrisl23:04.58 
russcriptor chrisl: i will test tommorow to see if it still looks the same without ddownsalefactor23:05.32 
robin_watts_mac Bah. I would say to just use png16m, not pngalpha, and to use -dDownScaleFactor=4 and leave off GraphicsAlpha/TextAlpha.23:05.32 
russcriptor what's the diff between png16m and pngalpha?23:05.57 
  is it just that pngalpha supports alpha?23:06.09 
robin_watts_mac yes.23:06.13 
  but if you just want a rendered image at a smaller res, just use png16m with -dDownScaleFactor.23:06.47 
  OR, be really smart and use mudraw instead.23:06.54 
russcriptor MuPDF you mean23:08.14 
  instead of ghostscript?23:08.18 
chrisl robin_watts_mac: isn't -dDownScaleFactor=4 going to be a bit wasteful for "average" documents with relatively low ink coverage?23:10.58 
  I mean, it will downsample the entire page, won't it?23:11.21 
robin_watts_mac chrisl: It will. But it's a fairly fast process.23:11.52 
  I think we may have special cases for -dDownScaleFactor=3 actually, as that's the important one for PCL->fax.23:12.17 
  hi henrys.23:12.21 
  are you in chicago?23:12.25 
chrisl but using the *AlphaBits options only downsamples the marked areas23:12.29 
robin_watts_mac we are meeting downstairs at 6:30 for food.23:12.36 
henrys robin_watts_mac: yes23:12.39 
  right I called miles23:12.45 
robin_watts_mac ah, ok.23:12.59 
russcriptor ok, i got mupdf install23:14.13 
  installed23:14.16 
  will play with mdraw conversion tommorow23:14.23 
henrys does the wireless suck or am I just having a temporary problem?23:14.28 
russcriptor and also play with the options you guys mentioned23:14.32 
  thanks for all your help23:14.39 
robin_watts_mac henrys: it doesn't seem amazingly fast, but it's ok.23:14.49 
chrisl henrys: it's not that quick, but it's been reliable for me so far23:14.56 
 Forward 1 day (to 2013/09/06)>>> 
ghostscript.com
Search: