Bug 67739 - Printing from evince results in segfault
Summary: Printing from evince results in segfault
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.14
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-04 10:03 UTC by stefan.weichselbaumer
Modified: 2018-08-25 13:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
GDB backtrace of the segfault (3.48 KB, text/plain)
2013-08-04 10:03 UTC, stefan.weichselbaumer
Details
valgrind report (14.75 KB, text/plain)
2013-08-04 10:04 UTC, stefan.weichselbaumer
Details
gdb output with debugging enabled (4.80 KB, text/plain)
2013-08-08 17:16 UTC, stefan.weichselbaumer
Details

Description stefan.weichselbaumer 2013-08-04 10:03:32 UTC
Created attachment 83607 [details]
GDB backtrace of the segfault

Printing certain pages from Evince results in segfaults in libcairo. However, when I ran evince through Valgrind, no segfault occured.

Version used:
evince: 3.8.3
poppler: 0.22.5
cairo: 1.12.14

I have a GDB backtrace attached to this bug report. Until now, only one document showed this behaviour for me. The problem is, that this document is my bachelor thesis and I am not allowed by my department to share it on the Internet. If you need the file, I would send it to you as a private e-mail, but I do not want to post it publicly available.

If you need further information, don't hesitate to ask.
Comment 1 stefan.weichselbaumer 2013-08-04 10:04:20 UTC
Created attachment 83608 [details]
valgrind report
Comment 2 Adrian Johnson 2013-08-04 10:35:40 UTC
I'll need the file to be able to fix this. You can send it to me at ajohnson@redneon.com.
Comment 3 Adrian Johnson 2013-08-04 23:25:10 UTC
I am unable to reproduce the bug. What distro are you using? 32 or 64 bit?

Does the bug occur if you run:

pdftocairo -pdf evince-segfault.pdf out.pdf
Comment 4 stefan.weichselbaumer 2013-08-05 17:43:25 UTC
Hi,

i am running Arch Linux x86_64.

The bug does not occur when using pdfcairo.
Comment 5 Adrian Johnson 2013-08-06 01:42:29 UTC
Are you able to build cairo with debugging enabled? The attached gdb and valgrind reports are not very useful without the debug information.

If you have poppler-glib-demo installed you could see if that reproduces the bug.

Does printing to a pdf file cause the bug or do you have to print to a real printer?
Comment 6 stefan.weichselbaumer 2013-08-08 17:02:55 UTC
Hi,

> Are you able to build cairo with debugging enabled? The attached gdb and 
> valgrind reports are not very useful without the debug information.

I am currently trying to build cairo with debugging enabled and redo the tests.

> If you have poppler-glib-demo installed you could see if that reproduces the 
> bug.

The bug does not occur in poppler-glib-demo. If tried printing to file and to a real printer and it both works. Curiously, if I now try to print the "printed" PDF from poppler-glib-demo in evince it passes the test. Is there a way to do diffs on PDF files?

> Does printing to a pdf file cause the bug or do you have to print to a real 
> printer?

Does not matter. Occurs in both types.
Comment 7 stefan.weichselbaumer 2013-08-08 17:16:48 UTC
Created attachment 83856 [details]
gdb output with debugging enabled

I just built cairo with CFLAGS set to "-g". Now the stack trace contains some more output, but I am not sure if I have done everything right. There are still a lot of "No symbol table info available".
Comment 8 Adrian Johnson 2013-08-08 23:40:33 UTC
Try building with "-g3 -O0" and see if that gets more information out of the gdb. If that works you could also do another run with valgrind.

> Curiously, if I now try to print the
> "printed" PDF from poppler-glib-demo in evince it passes the test. Is there
> a way to do diffs on PDF files?

Not easily, and it probably won't be useful. I really need to either reproduce it myself or get enough debug info from you to see where the bug is.

I will try installing Arch Linux in a VM sometime but I won't have time to do that for a while.
Comment 9 Adrian Johnson 2013-08-08 23:44:49 UTC
Another idea is to run evince with cairo-trace while printing. But I'm not sure how to separate the trace of the pdf printing from the screen drawing. Maybe Chris can advise the best way to do this.
Comment 10 GitLab Migration User 2018-08-25 13:54:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/255.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.