SIGSEGV in OutputDev::cvtUserToDev(double, double, int*, int*) on PDF import

Bug #1332013 reported by Martin Spacek on 2014-06-19
256
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
High
Unassigned

Bug Description

I've built and installed the latest dev version of poppler (with ./configure --enable-xpdf-headers). I've also built and installed the latest dev version of inkscape. This dev version of poppler works fine with the latest dev version of qpdfview (I don't think I can compile evince from scratch on my system to separately test the glib bindings).

Inkscape runs, but as soon as I try to import a PDF via drag-and-drop or File->Import, it crashes with a SIGSEGV (see error1.txt) or SIGABRT message (see error2.txt). It seems the specific errors are file specific, but it's always one or the other, no matter the file. Also, if I try to open a PDF using File->Open, it just hangs and reports nothing in gdb.

I'm running Xubuntu 12.10 amd64. Backtraces from gdb for the first two cases are attached.

Martin Spacek (mspacek) wrote :
Martin Spacek (mspacek) wrote :
information type: Private Security → Public Security
description: updated
Martin Spacek (mspacek) wrote :

By the way, I'm on poppler 8a5e59c6ea7ccd0ecbdb4b37bf3fe4e74e1c0e8e and inkscape r13432.

description: updated
jazzynico (jazzynico) on 2014-06-19
tags: added: crash importing pdf
Changed in inkscape:
importance: Undecided → High
jazzynico (jazzynico) wrote :

Not reproduced on Windows XP, Inkscape trunk revision 13432 (poppler 0.12.1 from the official win32 devlibs).

Did you try to compile Inkscape with the poppler package provided by Ubuntu?

I guess you used a local poppler-dev compilation because you ran into Bug #254849 (https://bugs.launchpad.net/inkscape/+bug/254849). Note that you can also install the libpoppler-private-dev package instead, without having to recompile poppler.

su_v (suv-lp) wrote :

On 2014-06-19 12:21 +0100, Martin Spacek wrote:
> By the way, I'm on poppler 8a5e59c6ea7ccd0ecbdb4b37bf3fe4e74e1c0e8e (…)

This is bleeding edge unstable latest poppler git master:
<http://cgit.freedesktop.org/poppler/poppler/log/?id=8a5e59c6ea7ccd0ecbdb4b37bf3fe4e74e1c0e8e&qt=range&q=8a5e59c6ea7ccd0ecbdb4b37bf3fe4e74e1c0e8e>

I would recommend to revert to latest stable release poppler 0.26 (support for compiling inkscape with poppler 0.26 was only recently added, see bug #1315142). I doubt that the inkscape project currently has the capacity to keep up with poppler HEAD at any given time (since already its stable releases often tend to cause build breakage or other issues due to newly introduced ABI-incompatibilities).

Martin Spacek (mspacek) wrote :

That poppler commit I mentioned above was just a couple past 0.26.1. Looked pretty safe. I've tried reverting to the poppler git commit tagged 0.26.0, recompiled both poppler and inkscape (after doing a make clean and re-running config on both ), still get the same backtraces as above. Could I be doing something wrong? What's the latest version of poppler that inkscape is known to work with? I'll try 0.24 and report back. Each iteration of this takes a good 30 min.

Martin Spacek (mspacek) wrote :

"Note that you can also install the libpoppler-private-dev package instead, without having to recompile poppler."

Yes, I have that package installed on my Xubuntu 12.10. I don't think it makes any difference though if I'm building poppler myself.

su_v (suv-lp) wrote :

Can't reproduce the reported crashes with (random) PDF files using current inkscape trunk (r13342) and poppler 0.26.1 on OS X 10.7.5.

su_v (suv-lp) wrote :

typo: s/r13342/r13432/

Martin Spacek (mspacek) wrote :

OK, Compiling against poppler 0.24.5 tag in git still doesn't solve the problem. Drag'n'drop of a PDF into inkscape gives me either of the same errors as above (error1.txt and error2.txt). Seems to be random as to which one occurs.

pkg-config --modversion poppler
0.24.5

ldd on the compiled inkscape binary is attached. Seems inkscape is indeed compiled against the intended poppler library (libpoppler.so.44, which corresponds to 0.24.5).

What am I doing wrong here? Wait a minute. The first error1.txt report shows libpoppler.so.28 in one of the first lines, which is I think the original that came with Xubuntu 12.10. And the latest backtrace with inkscape compiled against 0.24.5 also shows libpoppler.so.28. So inkscape is somehow mixing up poppler versions on my system. This is really frustrating, given the results from pkg-config and ldd. Oh, and ldd actually shows both libpoppler.so.44 *and* libpoppler.so.28. Maybe I need to run sudo ldconfig again?

Martin Spacek (mspacek) wrote :

Well, if I remove all poppler libs in /usr/local/lib so that just the libpoppler.so.28 packaged with Xubuntu 12.10 remains, and then recompile inkscape, it works.

So, what's the proper way to build poppler such that inkscape will link against it? Here's what I've been doing:

To build poppler:

make clean
./autogen.sh
./configure --enable-xpdf-headers
make
sudo make install

For inkscape:

make clean
./autogen.sh
./configure
make
sudo make install

To post a comment you must log in.
This report contains Public Security information  Edit
Everyone can see this security related information.

Other bug subscribers