Subject: bug#637: xpdf crashes the window manager

From: David Haworth <[email-masked]>
Date: Sun, 28 Nov 2021 08:23:55 +0100

Package: xpdf
Version: 3.04+git20211021-1
Severity: normal

Dear Maintainer,

xpdf crashes the window manager when trying to scroll the table of contents
in the left-hand pane. The crash happens both when dragging the slider
and when using the scroll wheel of the mouse.

The crash happens with both of my window managers: blackbox and xfce.

The crash seems to be related to the content of the PDF file, or
maybe the size. The RP2040 reference manual is the file where I
discovered the problem, but there may be others:

https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf

I've tried to reproduce the problem on my company laptop running
debian unstable, also with both xfce and blackbox, but the crash
doesn't happen there.

All the best,
Dave

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 5 (daedalus/ceres)
Release:	5
Codename:	daedalus ceres
Architecture: x86_64

Kernel: Linux 5.14.0-4-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages xpdf depends on:
ii  libc6          2.32-4
ii  libgcc-s1      11.2.0-12
ii  libpaper1      1.1.28+b1
ii  libpoppler102  20.09.0-3.1
ii  libstdc++6     11.2.0-12
ii  libx11-6       2:1.7.2-2+b1
ii  libxm4         2.3.8-3
ii  libxt6         1:1.2.0-1

Versions of packages xpdf recommends:
ii  cups-bsd        2.3.3op2-7
ii  gsfonts-x11     0.28
ii  poppler-data    0.4.11-1
ii  poppler-utils   20.09.0-3.1
ii  sensible-utils  0.0.17

xpdf suggests no packages.

-- no debconf information

---

From: Mark Hindley <[email-masked]>
Date: Mon, 29 Nov 2021 10:37:47 +0000

Control: tags -1 debian

David,

> debian unstable, also with both xfce and blackbox, but the crash

Thanks. Notwithstanding this, you should report this issue directly to
Debian. Devuan uses Debian's xpdf packages directly without recompilation.

A quick look at Debian's BTS shows both #996903 and #996832 which might be
similar.

I suggest you try to get a gdb trace and see if either of those bugs are related
and add you contribution there.

Thanks

Mark

---

From: Adam Sampson <[email-masked]>
Date: Tue, 30 Nov 2021 01:13:23 +0000

> Debian. Devuan uses Debian's xpdf packages directly without

(I'm the maintainer of xpopple, which is the upstream source for
Debian's xpdf these days.)

The problem reported here is not that xpdf crashes, it's that the window
manager crashes. That shouldn't happen regardless of what client
programs do, so this isn't a fault in xpdf itself.

Are you certain that it's the window manager crashing, and not the X
server? The latter seems more likely -- when you're scrolling the table
of contents, it's not changing any properties of the window (which would
cause the WM to do something), but it is doing lots of X drawing
operations to scroll the list and render new text. It'd be worth having
a look at the X server log after a crash (/var/log/Xorg.0.log.old).

If it's only just started doing this, one change we've made recently in
xpdf is to enable Xft font support by default. You could try setting the
following X resource (with xrdb):

Xpdf*font: fixed

This should make it use a bitmap font for the interface instead, which
will be rendered using X's core font support rather than alpha
blending. If that fixes it, then it could be a problem with your
graphics driver's implementation of the RENDER extension.

Thanks,

-- 
Adam Sampson <[email-masked]>                         <http://offog.org/>

---

From: David Haworth <[email-masked]>
Date: Tue, 30 Nov 2021 16:35:05 +0100

Hi Adam,

You're right - it is indeed the X server that crashes.

I've only noticed the problem recently, but that doesn't necessarily mean
that it's a new problem.

Changing the font as you suggested doesn't have any effect, so I
don't think it's the font rendering. The backtrace from Xorg.0.log
shows

[ 10759.847] (EE) Backtrace:
[ 10759.860] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x135) [0x55662f3b7e05]
[ 10759.861] (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x50) [0x7fe2d501b8e0]
[ 10759.861] (EE) 2: ? (?+0x0) [0x7fe2c169003a]
[ 10759.861] (EE)
[ 10759.861] (EE) Segmentation fault at address 0x7fe2c28be000

I guess I'd better re-report the bug. This report can be closed.

Thanks for the tip about changing the fonts, though. The new default
fonts are too large for my liking so I'll play around and find a suitable
smaller typeface. The fixed fonts are missing some characters.

All the best,
Dave

---

From: Mark Hindley <[email-masked]>
Date: Tue, 30 Nov 2021 16:16:23 +0000

Control: tags -1 invalid

David,

> I guess I'd better re-report the bug. This report can be closed.

Closing as requested.

Thanks.

Mark

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Tue, 30 Nov 2021 16:18:21 +0000

This is an automatic notification regarding your bug report
which was filed against the xpdf package:

#637: xpdf crashes the window manager

It has been closed by Mark Hindley <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Mark Hindley <[email-masked]> by
replying to this email.

-- 
637: https://bugs.devuan.org/cgi/bugreport.cgi?bug=637
Devuan Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#637: xpdf crashes the window manager
From: Mark Hindley <[email-masked]>
To: [email-masked], [email-masked]
Date: Tue, 30 Nov 2021 16:16:23 +0000

Control: tags -1 invalid

David,

Closing as requested.

Thanks.

Mark

Subject: xpdf crashes the window manager
From: David Haworth <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Sun, 28 Nov 2021 08:23:55 +0100

Package: xpdf

Dear Maintainer,

All the best,
Dave

-- System Information:
Distributor ID:	Devuan