You are not logged in.

#1 2010-12-09 15:57:37

taavi
Member
From: Tartu, Estonia
Registered: 2010-10-10
Posts: 50
Website

PDF segfaults evince

I found one PDF which manages to segfault current evince.

I don't know if I should report it upstream or is it arch bug?

You can find that file here: http://endymion.juhe.ee/fyysika_re.pdf

Here is example:

[taavi@kosmos ~]$ pacman -Q evince
evince 2.32.0-5
[taavi@kosmos ~]$ evince Desktop/fyysika_re.pdf 
Segmentation fault

Offline

#2 2010-12-09 16:05:05

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: PDF segfaults evince

that works for me


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2010-12-09 16:11:09

silenc3r
Member
From: Poland
Registered: 2009-08-29
Posts: 149

Re: PDF segfaults evince

Epdfview and Zathura sefaults as well. I got few pdfs which cause sefault in plopper based pdf viewers, while they open just fine in mupdf. I noticed this bug like week ago, but I didn't found any solution so far (I didn't really searched though).

Offline

#4 2010-12-09 16:50:04

taavi
Member
From: Tartu, Estonia
Registered: 2010-10-10
Posts: 50
Website

Re: PDF segfaults evince

I produced core dump: http://endymion.juhe.ee/core

Offline

#5 2010-12-09 18:15:28

tlvb
Member
From: Sweden
Registered: 2008-10-06
Posts: 297
Website

Re: PDF segfaults evince

Works here too:

$ uname -a; pacman -Q kernel26; pacman -Q evince; evince Downloads/fyysika_re.pdf 
Linux patternmaker 2.6.35-ARCH #1 SMP PREEMPT Sat Oct 30 19:57:05 UTC 2010 i686 Intel(R) Pentium(R) M processor 2.00GHz GenuineIntel GNU/Linux
kernel26 2.6.35.8-1
evince 2.32.0-5

I need a sorted list of all random numbers, so that I can retrieve a suitable one later with a binary search instead of having to iterate through the generation process every time.

Offline

#6 2010-12-09 18:34:15

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: PDF segfaults evince

Segfaults for me too. I've been getting segfaults with a lot of different PDFs (such as anything from JSTOR) with all poppler-based PDF viewers lately.

evince 2.32.0-5
poppler 0.14.5-1
freetype2-infinality 2.4.4-1

Out of curiousity, are you using freetype2-infinality (I am); there was a clash with it and poppler awhile back, but I thought it had been fixed. A bit too lazy now to switch out my freetype2 package and see if it helps, though.

Offline

#7 2010-12-09 18:36:36

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: PDF segfaults evince

@frabjous ah. i totally forgot about that "issue"


Give what you have. To someone, it may be better than you dare to think.

Offline

#8 2010-12-09 18:59:05

silenc3r
Member
From: Poland
Registered: 2009-08-29
Posts: 149

Re: PDF segfaults evince

confirmed, freetype2-infinality causes the problem

Offline

#9 2010-12-10 01:36:20

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: PDF segfaults evince

Well, FWIW, I'm using Infinality's freetype patches (from 20101114) with evince 2.32.0 on a different distro, and I can read the PDF OK.

Looking at the AUR package, a difference is that I am enabling the system ZLIB:

sed -i -r 's:.*(#.*SYSTEM_ZLIB.*) .*:\1:' include/freetype/config/ftoption.h

And I'm also applying my freetype-2.4.3-20101114-infinality-apply-env-defaults.patch

Offline

#10 2010-12-10 08:49:03

taavi
Member
From: Tartu, Estonia
Registered: 2010-10-10
Posts: 50
Website

Re: PDF segfaults evince

frabjous wrote:

Segfaults for me too. I've been getting segfaults with a lot of different PDFs (such as anything from JSTOR) with all poppler-based PDF viewers lately.

evince 2.32.0-5
poppler 0.14.5-1
freetype2-infinality 2.4.4-1

Out of curiousity, are you using freetype2-infinality (I am); there was a clash with it and poppler awhile back, but I thought it had been fixed. A bit too lazy now to switch out my freetype2 package and see if it helps, though.

I have infinality patched freetype2 from AUR.

evince 2.32.0-5
poppler 0.14.5-1
freetype2-infinality 2.4.4-1

In which part the bug lies then?

Last edited by taavi (2010-12-10 08:53:07)

Offline

#11 2010-12-10 13:41:14

taavi
Member
From: Tartu, Estonia
Registered: 2010-10-10
Posts: 50
Website

Re: PDF segfaults evince

Ok, stupid question it has to be with infinality then.

I just wait for upstream to fix it then.

Offline

#12 2010-12-10 13:45:56

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: PDF segfaults evince

taavi, I just stated my situation, which proves you wrong. It doesn't work for me by *magic*.

Here's a huge hint: Try the 2 differences I mentioned, without any "export" commands, to check whether internationalization (e.g. commas rather than decimal points) is the problem.

Last edited by brebs (2010-12-10 13:48:31)

Offline

#13 2010-12-10 13:53:21

taavi
Member
From: Tartu, Estonia
Registered: 2010-10-10
Posts: 50
Website

Re: PDF segfaults evince

Hm, ok. I'm not the brightest at the moment.

I'll try to compile freetype with that one patch and system zlib.

Offline

#14 2010-12-10 15:40:39

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: PDF segfaults evince

brebs, or someone else with the know-how, it might help to actually provide a PKGBUILD for your modified infinality build rather than vaguely describing the differences. Not everyone with this problem is a programmer who knows how to apply patches, or where/when to put that sed line.

I also don't really see how what you wrote proved taavi wrong. Maybe the problem is equally on the side of poppler, but if a patch on infinality resolves the problem, then the problem is with infinality, even if it's only with the version of infinality in AUR.

Offline

#15 2010-12-10 15:53:25

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: PDF segfaults evince

Yeah yeah I know all this, but I'm not here to write an essay, or get into the subtleties of what "upstream" can possibly mean. It should be obvious what to do next - try my two tweaks, which are *not* "vague". Strewth.

I provide instructions *because* I use Lunar, not Arch or Gentoo anymore.

I'm running poppler 0.14.5 also.

Offline

#16 2010-12-10 16:29:26

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: PDF segfaults evince

Admittedly "vague" might not be the right word. What I meant is that your instructions only give me a vague sense of what to do next. It may be "obvious" to some, but for people who aren't familiar with such things, it's not going to be. I think the best thing is to leave a comment for jxy on the AUR page to see if he's interested in editing the PKGBUILD. I think someone is going to have to host your patch on a non-mediafire site, though, since it's going to be annoyingly complicated otherwise. I might try to make such a PKGBUILD when I get a chance, but this is a bit outside my comfort zone.

Offline

#17 2010-12-10 16:57:05

jxy
Member
Registered: 2008-12-03
Posts: 133

Re: PDF segfaults evince

Interestingly, I'm using KDE and okular, with the stock poppler(-qt) and the current freetype2-infinality, displaying the the pdf without a problem.  I don't have evince and currently don't have time to try it, so I'll have to rely on you guys to pin down the exact problem.  Hopefully, taavi's going to get back to us, soon.

EDIT: By the way, I'm using [testing], so zlib 1.2.5-3 is from testing, if that makes any differences.

Last edited by jxy (2010-12-10 17:01:52)

Offline

#18 2010-12-11 07:34:51

jib2
Member
From: Paris, France
Registered: 2009-08-13
Posts: 93

Re: PDF segfaults evince

Here is a working PKGBUILD with the patches brebs was talking about.
http://aur.pastebin.com/HAfvc1nu

PDF and Libreoffice work OK with it on my computer.

Offline

#19 2010-12-11 10:23:10

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: PDF segfaults evince

jib2 wrote:

with the patches brebs was talking about.

You've used *old* patches, not the most recent ones.

Offline

#20 2010-12-11 10:54:58

jib2
Member
From: Paris, France
Registered: 2009-08-13
Posts: 93

Re: PDF segfaults evince

Oh! well i just followed the link you gave on Gentoo forum.
And just above, you said you were "using Infinality's freetype patches (from 20101114)"

Anyway, the patches are not so old (less than a month), they work just fine, give a pretty good result, and i thought it could help some users struggling with a lot of different versions.

Last edited by jib2 (2010-12-11 11:17:23)

Offline

#21 2010-12-11 11:18:03

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: PDF segfaults evince

That's not what I said. Take your existing Infinality PKGBUILD (which uses freetype 2.4.4) and *add* these 2 changes:

sed -i -r 's:.*(#.*SYSTEM_ZLIB.*) .*:\1:' include/freetype/config/ftoption.h
Apply my freetype-2.4.3-20101114-infinality-apply-env-defaults.patch  (yes, this patch applies equally well to freetype 2.4.4)

But anyway, what you've done isn't that far out-of-date - I was a little harsh smile

Offline

#22 2010-12-11 11:55:07

jib2
Member
From: Paris, France
Registered: 2009-08-13
Posts: 93

Re: PDF segfaults evince

brebs wrote:

*add* these 2 changes:

sed -i -r 's:.*(#.*SYSTEM_ZLIB.*) .*:\1:' include/freetype/config/ftoption.h
Apply my freetype-2.4.3-20101114-infinality-apply-env-defaults.patch  (yes, this patch applies equally well to freetype 2.4.4)

Tried that. Some PDF still make evince crash. They don't with previous version.

Last edited by jib2 (2010-12-11 11:55:41)

Offline

#23 2010-12-11 12:11:35

goddesse
Member
Registered: 2009-08-03
Posts: 13

Re: PDF segfaults evince

Paul's patch required a trivial update for 2.4.4 to apply everything cleanly:

@@ -945,7 +952,15 @@
     if ( checked_filter_params_env == 0 )
     {
       char *filter_params = getenv( "INFINALITY_FT_FILTER_PARAMS" );
-      if ( filter_params != NULL && strcmp(filter_params, "") != 0 )
+      if ( filter_params == NULL )
+      {
+        default_filter[0] = (FT_Byte) (0.11 * 255.0f + 0.5f);
+        default_filter[1] = (FT_Byte) (0.22 * 255.0f + 0.5f);
+        default_filter[2] = (FT_Byte) (0.38 * 255.0f + 0.5f);
+        default_filter[3] = (FT_Byte) (0.22 * 255.0f + 0.5f);
+        default_filter[4] = (FT_Byte) (0.11 * 255.0f + 0.5f);
+      }
+      else
       {
         float f1, f2, f3, f4, f5;

EDIT: Actually, scratch that. I forgot that was from another patch I had previously applied in a custom build. This isn't needed anymore, I was using the 20101117 envvar fix.

You need to remove the infinality_settings.sh from profile.d, I believe. I was able to open all the problem pdfs fine in zathura, which is poppler-glib based. You're probably seeing the same behavior because you're still using the old environment variables that were set there. Thanks a lot for your help, Paul.

Last edited by goddesse (2010-12-11 12:35:44)

Offline

#24 2010-12-11 13:15:14

jib2
Member
From: Paris, France
Registered: 2009-08-13
Posts: 93

Re: PDF segfaults evince

goddesse wrote:

You need to remove the infinality_settings.sh from profile.d, I believe. I was able to open all the problem pdfs fine in zathura, which is poppler-glib based. You're probably seeing the same behavior because you're still using the old environment variables that were set there. Thanks a lot for your help, Paul.

That was it! Thank you goddesse!

Here is a PKGBUILD: http://aur.pastebin.com/fBJpcUcD

All PDF open fine, Libreoffice is OK too.

Last edited by jib2 (2010-12-11 13:15:30)

Offline

#25 2010-12-11 15:00:30

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: PDF segfaults evince

All right, that seems to fix the problem, both with evince and zathura, both with the original PDF and the other ones I was having trouble with.

Thanks a lot.

Two notes:

  • I had to run fromdos on the PKGBUILD after downloading it, or else makepkg would complain about CRLF characters. Probably a problem with pastebin.com.

  • It didn't work immediately after installing the new version of the package, but it did after I rebooted. I'm not sure what exactly needed to be changed to make this happen; perhaps quitting and restarting X would have been sufficient? Or...?

Offline

Board footer

Powered by FluxBB