| <<<Back 1 day (to 2015/12/16) | 20151217 |
tor8 | Robin_Watts: the gzip functions added in the recent commit are "broken" in unix builds | 10:54.57 |
| implicit declarations of lseek, read, write and close... some #include or ifdef must be going wrong | 10:55.32 |
| okay, solved it with a -DHAVE_UNISTD_H in Makethird | 11:15.32 |
Robin_Watts | tor8: cool. need a review? | 12:06.21 |
| fz_get_pixmap does not necessarily make a NEW pixmap. | 12:07.54 |
| It 'gets' the pixmap associated with the image. | 12:08.04 |
| Sometimes that may be the underlying one. | 12:08.13 |
| fz_new_pixmap implies that you can alter the image to me. | 12:08.26 |
| fz_get_pixmap does not have that implication. | 12:08.37 |
| which admittedly means that fz_new_pixmap_from_image was wrong in the current source. | 12:09.07 |
| It should have done 'get_image', then checked that the ref was 1. If it wasn't, clone it. | 12:09.27 |
| The new bitmap from pixmap one seems right. | 12:13.42 |
| And the gzip one. | 12:13.57 |
| I think Paul should weigh in on the js stuff. I guess it's a policy thing... | 12:41.27 |
iMessage | I found this script to convert pdf to png images --> https://bpaste.net/show/cc3a46a075ae --> it converts to me only first page. Does anyone know why ? | 14:17.01 |
kens | At a guess, because there's a problem in the script. We don't do Python support here. | 14:18.35 |
Robin_Watts | iMessage: That script is doing: gs -dBATCH -dNOPAUSE -sOutputFile=<name>.png -sDEVICE=png16m -r<resolution> | 14:23.18 |
| Essentially that puts all the pages output into 1 file. Given that png doesn't support multiple images in 1 file, what else do you want it to do? | 14:24.07 |
| If instead you did: gs -dBATCH -dNOPAUSE -sOutputFile=blah%d.png -sDEVICE=png16m -r<resolution> | 14:24.43 |
| then it'd put page 1 into blah1.png, page 2 into blah2.png etc. | 14:25.02 |
kens | He'll need %s%d because otherwise subsequent files will overwrite the first input file | 14:25.10 |
Robin_Watts | kens: Yes. I'm just pointing out the simple change. He can handle fixing the python script. | 14:25.52 |
| The problem he's going to have to cope with is that he can't simply change the script from %s.png to %s%d.png. | 14:26.38 |
| He might get away with %s%%d.png | 14:26.45 |
kens | Not my problem :-D | 14:26.56 |
Robin_Watts | yeah. | 14:27.00 |
kens | But surely %s-%d or something similar | 14:27.07 |
Robin_Watts | %s-%%d maybe. | 14:27.49 |
kens | chrisl just pointed me at the latest release of Git for Windows which allows support for Windows editors. I can't get Wordpad ot work still, nor can I change the editor using git config. However, if I manually edit the .config file to use Notepad2, it *does* work. I mention ths for Micahel and any other interested Windows users. | 14:28.42 |
Robin_Watts | kens: What version of git for windows is that? | 14:30.34 |
kens | err, 2.6.4 maybe ? | 14:30.49 |
| Whatever was on the SourceFOrge page | 14:30.56 |
Robin_Watts | I'm on 2.6.3 | 14:31.06 |
kens | https://git-for-windows.github.io/ | 14:31.24 |
| THe download link says 2.6.4 | 14:31.41 |
Robin_Watts | yeah. I was hoping they might have fixed some problems with ConsoleZ that they recently introduced, but no mention of that in the changelog. | 14:32.53 |
kens | They mention notepad several times, but I found Notepad reallyu doesn't work, because the file still ends up with Unix line endings | 14:33.35 |
| And with wordpad it still exits straight back to the shell, but notep[ad2 defintely works for an interactive rebase | 14:34.07 |
| You could always try it with consoleZ | 14:35.21 |
iMessage | thanks :) | 14:35.44 |
kens | git checkout master | 14:37.16 |
| ooops | 14:37.21 |
Robin_Watts | I've got a fix for the tiffsep top bit char separation name bug on robin/master if anyone fancies reviewing it for me. | 14:40.38 |
kens | Is that a bug number somewhere ? | 14:44.20 |
| "sanitise tiffsep separation names ?" | 14:44.59 |
Robin_Watts | yeah. | 14:48.30 |
kens | Looks OK, can't see anything obvious | 14:50.35 |
Robin_Watts | I suppose I could bend top bit set chars into utf-8. | 14:50.40 |
kens | I thnk anything that returns valid filenames is fine | 14:51.02 |
Robin_Watts | but I'd still need to escape stuff like backspace and / etc. | 14:51.12 |
kens | Indeed | 14:51.19 |
Robin_Watts | so I'm going to leave it as is. Thanks. | 14:51.20 |
burgerbrigade | i'm a complete noob to how ghostscript and pdfs work, but why would a pdf look better in pdf.js than in ghostscript? I have a pdf and the font looks awful compared to pdf.js on my firefox | 15:29.17 |
| which is a shame because i want to replace my firefox with emacs. | 15:33.58 |
tor8 | burgerbrigade: pdf.js uses anti-aliasing when rendering fonts, which gs by default does not | 15:40.28 |
burgerbrigade | ah so it'd look like pdf.js if i figured out how to turn aa on? | 15:46.18 |
tor8 | burgerbrigade: possibly. you could also use mupdf or evince. | 15:57.34 |
| mupdf has (IMHO) the best anti-aliased font rendering, evince has bad spacing issues | 15:58.27 |
mvrhel_laptop | Robin_Watts: are you there? | 16:24.41 |
Robin_Watts | mvrhel_laptop: Last time I checked. | 16:26.33 |
mvrhel_laptop | good deal. just had a question about memento | 16:26.47 |
| tying to understand if I have any issues in what I am seeing | 16:27.10 |
Robin_Watts | ok. | 16:27.16 |
mvrhel_laptop | let me use pastebin | 16:28.24 |
| http://pastebin.com/FbEURj6K | 16:29.19 |
| so the 455 mallocs and 393 frees.... | 16:29.42 |
| and the list at the end | 16:29.53 |
| is that indicating what has not been released? | 16:30.24 |
Robin_Watts | The list of "Allocated blocks" are the blocks that are still allocated at the end of the program, yes. | 16:33.00 |
mvrhel_laptop | ok | 16:33.04 |
| so I have some work to do | 16:33.09 |
| very odd | 16:33.19 |
Robin_Watts | So you have some leaks. | 16:33.20 |
| The indentation on that list is there to help you. | 16:33.28 |
mvrhel_laptop | a few I would say... | 16:33.31 |
| so perhaps if I free the page the others will fall.... | 16:34.00 |
Robin_Watts | A block is indented from a previous block if the previous block contains a pointer to it. | 16:34.09 |
mvrhel_laptop | nice | 16:34.15 |
Robin_Watts | so, as you say, if you fix the fz_page reference counting, the rest may fall out. | 16:34.26 |
| BUT.... the more worrying thing than the leak is the first 3 lines. | 16:34.45 |
| That implies that you are writing to a block after it has been freed. | 16:34.59 |
mvrhel_laptop | yes I see that | 16:35.01 |
Robin_Watts | Now, Memento has stuff in that can narrow down when that happens. | 16:35.18 |
| Is this a repeatable thing? | 16:35.33 |
mvrhel_laptop | yes | 16:35.38 |
Robin_Watts | Ok, so want me to talk you through it? | 16:35.46 |
mvrhel_laptop | sure that would be great | 16:35.53 |
Robin_Watts | Put a breakpoint on Memento_inited and Memento_breakpoint | 16:36.21 |
| Then run the program in the debugger. It'll stop on Memento_inited. | 16:36.56 |
| Now Alt-Ctrl-Q to get the QuickWatch window up. | 16:37.23 |
| and enter Memento_setParanoia(1) and hit return. | 16:37.47 |
| That tells memento to check the memory for overwrites and leaks after every single alloc/free | 16:38.03 |
| just grabbing a drink. Tell me when you've caught up. | 16:39.04 |
mvrhel_laptop | I did this. It is essentially doing repeated outputs during the freeing of the context | 16:43.34 |
Robin_Watts | repeated outputs? | 16:44.04 |
| It should stop on Memento_breakpoint when it detects it being wrong. | 16:44.23 |
| And tell you what event it's on. | 16:44.33 |
mvrhel_laptop | I don't get any output until the very end when the context is freed then I get the following (hold on for pastebin | 16:45.01 |
| http://pastebin.com/XCFP1uDP | 16:45.48 |
Robin_Watts | And it never stopped on Memento_breakpoint ? | 16:46.11 |
mvrhel_laptop | yes, but that was during the freeing of the context | 16:46.24 |
Robin_Watts | Right. | 16:46.28 |
| But the key thing is the output there. | 16:46.34 |
| The block is being corrupted between event 894 and 895. | 16:46.52 |
mvrhel_laptop | oh | 16:47.08 |
Robin_Watts | So, we can now rerun the program. | 16:47.09 |
mvrhel_laptop | ah ok | 16:47.15 |
Robin_Watts | And we can use Memento to do stuff like "stop us on event 118 so we can see what code is allocating the block" | 16:47.38 |
| or "stop us on event 894 so we can step though and see where the corruption happens" | 16:47.52 |
mvrhel_laptop | cool | 16:47.54 |
Robin_Watts | So, run the program again, and it'll stop on Memento_inited | 16:48.15 |
mvrhel_laptop | yes | 16:48.21 |
Robin_Watts | Ctrl-Alt-Q again. | 16:48.26 |
| Memento_breakAt(118) | 16:48.35 |
| Hit return, then continue. | 16:48.44 |
mvrhel_laptop | not 894? | 16:48.50 |
Robin_Watts | 118 is to show you where the block was allocated. | 16:49.05 |
| if you already know that, then we can do 894 instead. | 16:49.22 |
mvrhel_laptop | no I dont | 16:49.29 |
| hold on | 16:49.36 |
Robin_Watts | ok, so do 118 to start with. | 16:49.37 |
mvrhel_laptop | ok I see the object | 16:50.29 |
| which is where I suspected the problem might be | 16:50.37 |
Robin_Watts | ok, so if you're happy, you can Ctrl-Alt-Q again, then Memento_breakAt(894) | 16:51.05 |
mvrhel_laptop | Robin_Watts: ok. so 894 was a freeing operation. I think this has given me enough to figure out the issue | 16:53.32 |
Robin_Watts | mvrhel_laptop: yeah, after that free, all the memory is fine. | 16:53.54 |
| Something is writing to the block allocated in 118 (which is now freed) before the next allocation operation. | 16:54.32 |
mvrhel_laptop | thanks. that is a very useful tool. I will need to jot down a few notes to remember all of this | 16:54.36 |
| I think I see the issue | 16:54.49 |
Robin_Watts | mvrhel_laptop: There are some notes at the top of memento.h about this. | 16:54.52 |
| But anything extra (or that could be made clearer) please let me know. | 16:55.13 |
mvrhel_laptop | Robin_Watts: awesome thank you | 16:55.53 |
Robin_Watts | np. | 16:56.04 |
kens | Drat installing a new MSys Git has knackered my SSH | 16:56.07 |
Robin_Watts | OK. Gotta dive into the clist. It's been nice knowing you all. | 16:56.25 |
| I think set_copy_alpha is written as many bytes and read as just 1. | 17:30.24 |
| no, cmd_opv_ext_put_halftone is being written, but set_copy_alpha is being read. | 17:35.36 |
mvrhel_laptop | tor8: so I pushed my most recent work onto my repos if you want to look it over at some point. I am going to work on the sharing of the same resources across pages now, then I will tackle the identity font stuff | 18:15.13 |
| have to step out for bit now | 18:16.10 |
| dang it. I just pushed my branch to golden | 22:57.27 |
| did not mean to do that | 22:57.35 |
| not sure if you can remove it or not Robin_Watts | 22:58.19 |
| I have head out for bit again. | 22:58.26 |
ome | Hello | 23:54.06 |
ghostbot | Welcome to #ghostscript, the channel for Ghostscript and MuPDF. If you have a question, please ask it, don't ask to ask it. Do be prepared to wait for a reply as devs will check the logs and reply when they come on line. | 23:54.06 |
ome | Where can I find a description of fitz file structure? | 23:54.49 |
| I would like to be able to build a minimal fitz without make and I am having a hard time figuring out what file includes what and such. | 23:55.31 |
| Forward 1 day (to 2015/12/18)>>> | |