Forum Bugs

*** Mercury runtime: caught segmentation violation ***

Rakkenes
We Have a very strange error:
version: Prince 7.1

I copied the offending html file to the server to test it, and I run it like this: (actual url changed with myserver)

prince -v --log=sverre6.log --baseurl=http://mysite --input=html myinorg.html -o pdf/sverre6.pdf

this is the output:

*** Mercury runtime: caught segmentation violation ***
cause: unknown
address involved: (nil)
This may have been caused by a stack overflow, due to unbounded recursion.
exiting from signal handler

the logfile looks like this:

Mon Nov 4 07:51:39 2013: ---- begin
Mon Nov 4 07:51:39 2013: Loading document...
Mon Nov 4 07:51:39 2013: loading HTML input: myinorg.html
Mon Nov 4 07:51:39 2013: loading style sheet: http://mysite/frontend/template/css/pdf_print.css
Mon Nov 4 07:51:39 2013: loading image: http://mysite/frontend/elements/logos/melbye_bluelogo.svg
Mon Nov 4 07:51:39 2013: loading document: http://mysite/frontend/elements/logos/melbye_bluelogo.svg
Mon Nov 4 07:51:39 2013: loading image: http://mysite/frontend/elements/logos/melbye_greylogo_m.svg
Mon Nov 4 07:51:39 2013: loading document: http://mysite/frontend/elements/logos/melbye_greylogo_m.svg
Mon Nov 4 07:51:39 2013: loading image: http://mysite/frontend/mediabank/8818/0666275p.tif
Mon Nov 4 07:51:39 2013: loading image: http://mysite/frontend/mediabank/8855/49010558p.tif
Mon Nov 4 07:51:39 2013: loading image: http://mysite/frontend/mediabank/8820/49000045p.tif
Mon Nov 4 07:51:39 2013: loading image: http:/mysite/frontend/mediabank/5736/49010451p.tif
Mon Nov 4 07:51:39 2013: loading image: http://mysite/frontend/mediabank/7692/49010464p.tif
Mon Nov 4 07:51:40 2013: loading image: http://mysite/frontend/mediabank/11366/0666283p.tif
Mon Nov 4 07:51:40 2013: loading image: http://mysite/frontend/mediabank/11397/FF9060-Komposit-C250.tif
Mon Nov 4 07:51:40 2013: Converting document...
Mon Nov 4 07:51:40 2013: used font: DIN OT, Bold
Mon Nov 4 07:51:40 2013: used font: DIN OT, Regular

to troubleshoot the problem, I have copied the html file and all content to a local folder to test it.
(I changed the html file to read all the images and the css from localhost instead of from the website, and I run it like this:

prince -v --log=sverre7.log --input=html myin.html -o pdf/sverre7.pdf

(no output from the commandline)

the logfile looks like this:
cat sverre7.log
Mon Nov 4 07:54:38 2013: ---- begin
Mon Nov 4 07:54:38 2013: Loading document...
Mon Nov 4 07:54:38 2013: loading HTML input: myin.html
Mon Nov 4 07:54:38 2013: loading style sheet: pdf_print.css
Mon Nov 4 07:54:38 2013: loading image: melbye_bluelogo.svg
Mon Nov 4 07:54:38 2013: loading image: melbye_greylogo_m.svg
Mon Nov 4 07:54:38 2013: loading image: 0666275p.tiff
Mon Nov 4 07:54:38 2013: loading image: 0666275p.tif
Mon Nov 4 07:54:38 2013: loading image: 49010558p.tif
Mon Nov 4 07:54:38 2013: loading image: 49000045p.tif
Mon Nov 4 07:54:38 2013: loading image: 49010451p.tif
Mon Nov 4 07:54:38 2013: loading image: 49010464p.tif
Mon Nov 4 07:54:38 2013: loading image: 0666283p.tif
Mon Nov 4 07:54:38 2013: loading image: FF9060-Komposit-C250.tif
Mon Nov 4 07:54:38 2013: Converting document...
Mon Nov 4 07:54:38 2013: used font: DIN OT, Bold
Mon Nov 4 07:54:38 2013: used font: DIN OT, Regular
Mon Nov 4 07:54:38 2013: loading image: FF9060-Komposit-C250.tif
Mon Nov 4 07:54:38 2013: loading image: 0666283p.tif
Mon Nov 4 07:54:39 2013: loading image: 49010464p.tif
Mon Nov 4 07:54:39 2013: loading image: 49010451p.tif
Mon Nov 4 07:54:39 2013: loading image: 49000045p.tif
Mon Nov 4 07:54:39 2013: loading image: 49010558p.tif
Mon Nov 4 07:54:40 2013: loading image: 0666275p.tif
Mon Nov 4 07:54:40 2013: loading image: 0666275p.tiff
Mon Nov 4 07:54:40 2013: finished: success
Mon Nov 4 07:54:40 2013: ---- end

and the pdf is created correctly.. as far as I can see.. the only difference between the two is that the first one get the css, and images from a remote server, and the second one get it from the local server. can anyone help?



mikeday
Can you test it with Prince 9? It could well be bug in Prince that we have already fixed.
Rakkenes
yes, that is the problem, it works fine in prince 9.0 and also in prince 6.0 but not in prince 7.1, and we can not use either on this server (as we can not make the pdfs look the same with those versions). we make a lot of pdfs from this server on this prince, and only this one gives this problem.
mikeday
How about Prince 8.1? :D

Seriously, it may be easier to adjust the style sheets to make the document work perfectly with a newer Prince version; there are typically only a few small changes that need to be made.

If you don't think this is an option, would you be able to email me (mikeday@yeslogic.com) a URL for the document which I could use to reproduce the problem here?
Rakkenes
Thanks, I have tried to use 9.0 and it seems to work fine for me (fonts and everything seems to look the same), so I have suggested this back to the developers, and I will see if this is ok for them. thanks for your help mikeday