Package: xpdf-reader
Version: 3.02-1.1
Severity: normal
Tags: patch
When xpdf is in normal mode, using close menu (or Ctrl-W) closes current
document, but not xpdf.
In fullscreen mode, with one and only one document open, close menu (or
Ctrl-W) crashes the application.
In XPDFViewer::clear, some widgets belonging to the toolbar are
referenced (pageNumText, pageCountLabel, etc), but have not been
initialized if mode is fullscreen. I think this is the reason of the
crash.
I attach a modification that seems to fix this bug.
arno
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.21
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages xpdf-reader depends on:
ii gsfonts 1:8.11+urwcyr1.0.7~pre41-3 Fonts for the Ghostscript interpre
ii lesstif2 1:0.95.0-2+b1 OSF/Motif 2.1 implementation relea
ii libc6 2.6.1-1 GNU C Library: Shared libraries
ii libfreetype6 2.3.5-1+b1 FreeType 2 font engine, shared lib
ii libgcc1 1:4.2.1-2 GCC support library
ii libice6 2:1.0.3-3 X11 Inter-Client Exchange library
ii libpaper1 1.1.21 Library for handling paper charact
ii libsm6 2:1.0.3-1+b1 X11 Session Management library
ii libstdc++6 4.2.1-2 The GNU Standard C++ Library v3
ii libt1-5 5.1.0-2 Type 1 font rasterizer library - r
ii libx11-6 2:1.0.3-7 X11 client-side library
ii libxext6 1:1.0.3-2 X11 miscellaneous extension librar
ii libxp6 1:1.0.0.xsf1-1 X Printing Extension (Xprint) clie
ii libxpm4 1:3.5.6-3 X11 pixmap library
ii libxt6 1:1.0.5-3 X11 toolkit intrinsics library
ii xpdf-common 3.02-1.1 Portable Document Format (PDF) sui
xpdf-reader recommends no packages.
-- no debconf information
--- xpdf/XPDFViewer.cc.old 2007-08-13 22:41:36.000000000 +0200
+++ xpdf/XPDFViewer.cc 2007-08-13 23:01:07.000000000 +0200
@@ -400,18 +400,21 @@ void XPDFViewer::clear() {
title = app->getTitle() ? app->getTitle()->getCString()
: (char *)xpdfAppName;
XtVaSetValues(win, XmNtitle, title, XmNiconName, title, NULL);
- s = XmStringCreateLocalized("");
- XtVaSetValues(pageNumText, XmNlabelString, s, NULL);
- XmStringFree(s);
- s = XmStringCreateLocalized(" of 0");
- XtVaSetValues(pageCountLabel, XmNlabelString, s, NULL);
- XmStringFree(s);
- // disable buttons
- XtVaSetValues(prevTenPageBtn, XmNsensitive, False, NULL);
- XtVaSetValues(prevPageBtn, XmNsensitive, False, NULL);
- XtVaSetValues(nextTenPageBtn, XmNsensitive, False, NULL);
- XtVaSetValues(nextPageBtn, XmNsensitive, False, NULL);
+ if (toolBar != None) {
+ s = XmStringCreateLocalized("");
+ XtVaSetValues(pageNumText, XmNlabelString, s, NULL);
+ XmStringFree(s);
+ s = XmStringCreateLocalized(" of 0");
+ XtVaSetValues(pageCountLabel, XmNlabelString, s, NULL);
+ XmStringFree(s);
+
+ // disable buttons
+ XtVaSetValues(prevTenPageBtn, XmNsensitive, False, NULL);
+ XtVaSetValues(prevPageBtn, XmNsensitive, False, NULL);
+ XtVaSetValues(nextTenPageBtn, XmNsensitive, False, NULL);
+ XtVaSetValues(nextPageBtn, XmNsensitive, False, NULL);
+ }
// remove the old outline
#ifndef DISABLE_OUTLINE