| <<<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.j | 02: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, cheers | 22:06.50 |
kens | OK got that | 22:12.30 |
russcriptor | hey guys, not sure if anyone is around, but I seem to be having an issue with png16m device | 22:14.37 |
| ghostscript keeps crashing with it, but when using pngalpha it works fine | 22:14.54 |
chrisl | russcriptor: what platform? Where did you get Ghostscript? | 22:23.08 |
russcriptor | centos 6 x64 | 22:30.40 |
| tried using binaries and compiling from source | 22:30.57 |
chrisl | OKay, using the default build (i.e. the libpng we ship)? | 22:31.21 |
russcriptor | yep | 22:31.40 |
| just a straight ./configure | 22:31.45 |
chrisl | Your best course is to raise a bug at http://bugs.ghostscript.com/ and attach a file that shows the problem | 22:32.31 |
russcriptor | k, I wonder if it's because I'm using -dTextAlphaBits=4 -dGraphicsAlphaBits=4 | 22: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.10 | 22:35.06 |
| and it works fine on a different box 9.01 | 22: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 device | 22:36.06 |
russcriptor | hmm | 22:37.15 |
| i'm throwing pdf files at it | 22:37.19 |
| that were generated in reportlab | 22: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, actually | 22: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 problem | 22:41.05 |
russcriptor | none of the pdfs seem to work | 22:41.59 |
| i'm doing this | 22: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/pscolor | 22: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 do | 22:43.04 |
chrisl | It disables memory garbage collection | 22: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 memory | 22:45.53 |
| FWIW, I get an error, but no crash with something similar to the above command line | 22:46.26 |
russcriptor | I think I meant an error | 22:47.20 |
| when I said crash | 22: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 1 | 22: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 FWIW | 22:49.37 |
chrisl | Yeh, it's the combination of -dTextAlphaBits=4 -dGraphicsAlphaBits=4 and -ddDownScaleFactor=10 that does it | 22:50.01 |
| Remove the -dDownScaleFactor=10 and it works fine for me | 22:50.47 |
russcriptor | so is it a bug | 22:50.47 |
chrisl | No, not a bug | 22:50.54 |
russcriptor | or am I just sending in crazy options | 22:50.54 |
chrisl | You're asking it to render at an internal resolution of 7800dpi and it runs out of memory - hence VMError in showpage | 22:51.48 |
russcriptor | but I have a ton of memory | 22: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 thing | 22:53.25 |
| well we were having issues with text rendering bad | 22:53.37 |
| which is why we put this fix in | 22: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.01 | 22:55.35 |
| it probably didn't make a difference though | 22:55.51 |
chrisl | A doubt -dDownScaleFactor=10 makes sense anyway. Rendering at 10x resolution and downsampling is unlikely to result legible text | 22:57.49 |
| s/A/I | 22:57.55 |
russcriptor | what would be a better solution? | 22:58.07 |
| we have a PDF that we are converting to an image | 22:58.21 |
| and the image is fairly small | 22:58.28 |
| so the text ends up looking bad | 22:58.34 |
chrisl | Personally, I would just use the -dTextAlphaBits=4 -dGraphicsAlphaBits=4 options, *or* -dDownScaleFactor=4 | 23:00.00 |
russcriptor | ok, chrisl, thanks a lot | 23:04.56 |
robin_watts_mac | chrisl | 23:04.58 |
russcriptor | chrisl: i will test tommorow to see if it still looks the same without ddownsalefactor | 23: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 mean | 23: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 areas | 23:12.29 |
robin_watts_mac | we are meeting downstairs at 6:30 for food. | 23:12.36 |
henrys | robin_watts_mac: yes | 23:12.39 |
| right I called miles | 23:12.45 |
robin_watts_mac | ah, ok. | 23:12.59 |
russcriptor | ok, i got mupdf install | 23:14.13 |
| installed | 23:14.16 |
| will play with mdraw conversion tommorow | 23: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 mentioned | 23:14.32 |
| thanks for all your help | 23: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 far | 23:14.56 |
| Forward 1 day (to 2013/09/06)>>> | |