Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2018/04/09)20180410 
kens chrisl I see you tried exactly what I was going to have a go at, debug code to check teh pointer alignment08:37.07 
  There's obviously some feature of their environment we haven't got yet though08:37.34 
chrisl kens: yeh, and I don't remotely understand the comments about h == 109:15.06 
kens Me neither.09:15.15 
  There *is* a 1 pixel high image in the input file09:15.24 
  But I'd have thought all the images would go through there09:15.46 
chrisl I don't ever see the clist path calling that function09:16.20 
kens That's the real problem, yes09:16.35 
chrisl He also originally reported the crash at line 272, but now it's 271 - which, tbf, makes a lot more sense09:18.17 
kens 271 makes more sense to me09:18.38 
  It occured to me last night that if 272 was misaligned, then 271 must also be09:18.54 
chrisl Exactly09:19.03 
kens TBH I am very suspicious about the code in there. A lot of it looks to me like its got problems on CPUs with alignment restrictions09:19.40 
  But until we can at least get the code to go through there, its going to be hard to fix it09:20.19 
  BTW dumb question, but you are using the 9.19 code ?09:20.29 
chrisl Yes09:20.38 
kens THought you wodl be09:20.42 
  There's obviously something important about the configuration we don't know.09:21.08 
chrisl I did have a long pause wondering where all the "new" warnings had appeared from..... forgetting 9.19 was before we did all that cleanup09:21.25 
kens :-D09:21.35 
chrisl I have been through that code before due to an issue on SPARC, and it was okay in the sections I could confirm: anything unaligned was written in bytes09:22.43 
kens Its the fact that it just adds 3 to the pointer in at least one place that worried me. Of course that may mean everything is byte-aligned thereafter, its pretty much impossible to tell from just reading the code09:23.29 
chrisl I'd guess it's the other way around - the adding 3 is get it 4 byte aligned, then we can write multiple values09:24.31 
kens That is possible, certainly09:24.40 
  And again, missing that could be the course of the problem09:24.59 
  source*09:25.06 
  But until we can get the code to go through there....09:25.21 
chrisl There's sections like around line 240 that, at first glance look dodgy09:26.05 
kens Several places looked suspicious to me, but as you say it may all be just aligning things properly09:26.28 
kens fetches more coffee09:27.22 
Robin_Watts I have to say, that I find it vanishingly unlikely that there are bugs in that code.10:49.09 
  I mean, it hasn't changed for donkeys years, and earlier versions of gs ran happily on RISC OS, which couldn't do unaligned load/stores.10:49.53 
  I think a compiler bug, or a random memory corruption is more likely.10:50.22 
kens I'm not disputing it, but since we can't even get the code to run through there, we can't really tell10:50.34 
Robin_Watts Can they give us a remote login on their system for us to try ?10:50.55 
kens As Chrisl says, I suspect its a Chromebook10:51.08 
  But I suppose we can ask10:51.22 
Robin_Watts Can they give us a Chromebook for us to try? :)10:51.34 
kens They don't seem to be hugely expensive10:51.46 
  Chris tracked one down with an ARM chip for only £20010:51.58 
  Whether we can make it run a debugger is another matter10:52.12 
Robin_Watts Yeah, but we'd need to match the version of the OS and toolset too, IIRC.10:52.15 
  s/IIRC/I bet/10:52.24 
kens Hmm, maybe.10:52.35 
Robin_Watts older ARM chromebooks could easily be 32bit too.10:52.51 
kens All things are possible. I think the first challenge is to ge the code to execute that path10:53.32 
chrisl The fact they (apparently) are debugging the code suggests a debug build, which reduces the likelihood of compiler error10:54.30 
Robin_Watts Whether they are debugging a debug build, or a release build with -g added to the link stage is unclear to me.10:56.15 
chrisl True....10:56.33 
  One thing we have had a problem with in the past was the cups device not correctly handling an output buffer resize - that *could* conceivably result in an alignment problem10:56.36 
kens We don't know any of what they are actually doing, really10:56.39 
  But like I said, I think the first point is to be able to execute that code path, which we currently can't reproduce at all.10:57.08 
  Until we do that, we aren't even remotely close to having a clue10:57.21 
Robin_Watts kens: Yeah. And the easiest way to do that, IMAO, is to ask for access to their system.10:57.38 
  They might shoot us down, but it costs us nothing to ask10:57.47 
kens I did say we can ask10:57.54 
  But at least duplicating their configuration would be helpful. Especially given teh time difference10:58.19 
  And training for futre reports10:58.28 
Robin_Watts Do the coverage tests show that section of code being called?10:58.29 
kens NAFC10:58.57 
Robin_Watts https://ghostscript.com/coverage/ghostscript/base/gdevm24.c.html10:59.01 
chrisl So, yes....10:59.24 
kens Well if the yellow means its being called, then yes10:59.27 
Robin_Watts Line 271, right? That shows some files that run that.10:59.29 
chrisl yeh10:59.40 
Robin_Watts Hover over, and it'll give you some names10:59.40 
kens *lots* of files10:59.52 
  7357 more11:00.01 
  But of course, none on a CPU which will have a problem with unaligned adresses11:00.28 
  And we don't know if soemthing earlier altered the pointer to *make* it unaligned11:00.41 
  For example the code at lines 227 only have 6000 odd calls11:01.07 
chrisl At least a couple of those files run through without a SIGBUS and without unaligned pointers at those lines11:08.29 
kens Your theroy about it being a CUPS problem reallocating memory is looking plausible....11:08.57 
Robin_Watts OK, so as far as I can see, the problem should only be able to occur if the base memory pointer isn't 32bit aligned.11:09.43 
chrisl *Except* I thought we'd fixed that problem. It's possible there's another issue in that area, though11:09.44 
Robin_Watts (or a raster that's not 32bit aligned)11:11.02 
  kens: Can you ssh into peeves?11:22.18 
  chrisl: Shelly has an account on peeves, but he can't ssh in, despite keys being set up properly.11:27.13 
chrisl Robin_Watts: Does he say what error he's getting?11:27.42 
Robin_Watts chrisl: Stupid chatzilla crashed. Have moved to #artifex.11:29.06 
Rutkay Hi Kens, everyone 11:31.37 
  I was looking for increasing dpi value of the conversion. I'm trying to render pdf to tiff and ps to tiff11:32.49 
  I saw -r option but it doesn't work as a expected 11:33.08 
  Do you suggest any options or that option baked with your vision?11:33.55 
  Current call of mine: gs -dNOPAUSE -sDEVICE=tiffg4 -r204x196 -sOutputFile=myfile.tiff myfile.pdf -c quit 11:35.05 
chrisl -r sets the resolution that ghostscript renders11:36.08 
Rutkay the issue is increasing the quality of the rendering basically11:39.11 
  rendered image: https://ufile.io/4iwz9 11:39.14 
  Original pdf11:39.24 
  https://ufile.io/tf1wr11:39.25 
  What do you suggest me to increase this quality 11:39.37 
chrisl Well, 204x196 is very low resolution, it's unlikely to be great, and especially with halftoning is even more problematic11:41.17 
  Especially as the quality of the original is exactly great11:42.19 
  isn't exactly great - I mean11:42.35 
Rutkay Actually I looked for increasing the threshold for halftoning or something like that11:43.08 
  More black is more likely to be good instead of more white for color cases11:43.34 
  Halftoning is maybe the main problem here I want to make better11:44.07 
chrisl Well, you could experiment with DITHERPPI: https://www.ghostscript.com/doc/9.23/Use.htm#Rendering_parameters11:45.56 
kens Sorry was at lunch, let me catch up11:46.10 
chrisl Or you could try tiffscaled: https://www.ghostscript.com/doc/9.23/Devices.htm#TIFF11:46.52 
kens You might be able to apply a transfer frunction to make the result darker11:46.59 
  But rendering faint colour output at low resolution to a halftoned device is always going to result in poor quality, IMO11:47.26 
Rutkay My offer Darker = better is more likely to be workaround, I admit it11:48.52 
kens As I sadi, you could try applying a transfer function11:49.10 
  That's somewhat similar to a gamma curve11:49.35 
Rutkay Is Transfer function is valid with options or do you suggest to do it myself before the calling gs?11:49.51 
kens You can apply a trnasfer function by sending PostScript at the command line11:50.11 
  NB if your input file has a transfer function (rare) then it may well override any supplied one.11:50.47 
Rutkay I have a bad old script but there is something like that you said before calling GS : $ACROREAD -toPostScript -markupsOn -choosePaperByPDFPageSize -level${LEVEL} -shrink -pairs $infile $tmpfile 11:51.23 
  Do you mean something like that?11:51.31 
kens Nope, none fo that makes any sense to me11:51.42 
Rutkay What do you mean by "by sending PostScript at the command line" ?11:52.04 
kens See the -c anf -f switches in the documentation11:52.15 
Rutkay Then, if we wrap up things you both said: 11:54.21 
  I'm trying to do some experiments with Devices.htm TIFF page and Use.htm Rendering Parameters11:54.53 
  And also I'm going to look at -c and -f switches 11:55.17 
kens You'll need to be able to write some PostScript to use the -c and -f, because you'll have to write your own transfer function11:57.20 
Rutkay Then, it could be better to play with options before that. I will be right back after some experiments, thank you.12:02.06 
HenryStiles chrisl: do you ever use the admin password on bugzilla? I've never used it.12:26.58 
chrisl HenryStiles: There's an admin password??12:27.36 
HenryStiles s/admin password/admin account12:27.43 
chrisl I wouldn't know how to get to it - there's no "admin" username12:28.35 
HenryStiles corin claims there is but now I don't see it.12:28.41 
chrisl Doing a user search returns several with "admin" either in the name or in the "real name" - none of them are ours, I think12:30.13 
HenryStiles he says in the bz configuration there is an admin@bugzilla.org, I don't see it but I haven't looked on picas12:30.30 
chrisl That's clearly not ours12:30.54 
HenryStiles talk more at the meeting, we are ready to go live, this week sometime.12:33.52 
chrisl Oh, cool12:34.01 
Robin_Watts Rutkay: gs -sDEVICE=tiffscaled -sCompression=g4 -r612x588 -dDownScaleFactor=3 -o out.tif colored.pdf13:10.06 
kens chrisl ping13:32.09 
chrisl kens: pong13:32.18 
kens Do we actually *have* a dict_get() ?13:32.28 
  I cna find dict_put and idict_put13:32.40 
  But no 'get'13:32.46 
  It looks like we enumerate the dictionary for that.13:32.57 
chrisl Hmm, we must have an equivalent operation13:33.15 
kens Juts trying to locate zget()13:33.33 
chrisl zgeneric.c13:33.45 
  dict_find()13:33.56 
kens Ah of course, dict_get presumably being too obvious :-(13:34.11 
chrisl You are clearly living in expectation of consistency and logic.....13:34.36 
kens Well the existence of an array_get had me hopeful....13:34.56 
  And dict_put13:35.02 
 Forward 1 day (to 2018/04/11)>>> 
ghostscript.com #mupdf
Search: