Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault opening postscript: undefined -21 #506

Closed
mgkuhn opened this issue Dec 30, 2020 · 5 comments · Fixed by #508
Closed

Segfault opening postscript: undefined -21 #506

mgkuhn opened this issue Dec 30, 2020 · 5 comments · Fixed by #508

Comments

@mgkuhn
Copy link

mgkuhn commented Dec 30, 2020

Expected behaviour

No segfault after displaying first page when viewing ptc40.ps.bz2

Actual behaviour

$ atril ptc40.ps.bz2
undefined -21

** (atril:9516): WARNING **: 11:27:21.344: Error rendering thumbnail
undefined -21

** (atril:9516): WARNING **: 11:27:21.487: Error rendering thumbnail
undefined -21

** (atril:9516): WARNING **: 11:27:21.626: Error rendering thumbnail
undefined -21

** (atril:9516): WARNING **: 11:27:21.772: Error rendering thumbnail
undefined -21

** (atril:9516): WARNING **: 11:27:21.913: Error rendering thumbnail
undefined -21

** (atril:9516): WARNING **: 11:27:22.051: Error rendering thumbnail
undefined -21

** (atril:9516): WARNING **: 11:27:22.188: Error rendering thumbnail
undefined -21

** (atril:9516): WARNING **: 11:27:22.326: Error rendering thumbnail
undefined -21

** (atril:9516): WARNING **: 11:27:22.463: Error rendering thumbnail
undefined -21
Segmentation fault (core dumped)

After the window opens and the first page of the document is displayed, there is an immediate segfault, without any further user interaction.

Steps to reproduce the behaviour

$ wget http://pages.cs.wisc.edu/~yeoh/nt/ptc40.ps.bz2
$ atril ptc40.ps.bz2
undefined -21
[...]
undefined -21
Segmentation fault (core dumped)
$

Package version

$ apt-cache policy atril
atril:
  Installed: 1.24.0-1
  Candidate: 1.24.0-1
  Version table:
 *** 1.24.0-1 500
        500 http://gb.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

Linux Distribution

Xubtuntu 20.04.1 LTS

$ lsb_release -rd
Description:	Ubuntu 20.04.1 LTS
Release:	20.04

Link to bugreport of your Distribution (requirement)

https://bugs.launchpad.net/ubuntu/+source/atril/+bug/1909663

@raveit65
Copy link
Member

Are you sure this document isn't corrupt?
When opening it with evince from gnome, evince doesn't crash, but it shows me only the first page of the document.
When selecting page 2 or any other, evince shows me only a busy cursor.
Can you open it with another document reader?

Bildschirmfoto zu 2020-12-30 13-59-50

@mgkuhn
Copy link
Author

mgkuhn commented Dec 30, 2020

Neither gv

$ bzcat ptc40.ps.bz2 >ptc40.ps
$ gv ptc40.ps

nor Ghostscript

$ gs ptc40.ps
GPL Ghostscript 9.50 (2019-10-15)
Copyright (C) 2019 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Loading NimbusRoman-Regular font from /usr/share/ghostscript/9.50/Resource/Font/NimbusRoman-Regular... 4400160 2881049 3854024 2552623 1 done.
Loading StandardSymbolsPS font from /usr/share/ghostscript/9.50/Resource/Font/StandardSymbolsPS... 4432928 2979853 6775768 5430015 1 done.
>>showpage, press <return> to continue<<

>>showpage, press <return> to continue<<

>>showpage, press <return> to continue<<
[...]

give me any problems. They display all pages of this document without any warning or error.

@rbuj
Copy link
Contributor

rbuj commented Dec 30, 2020

Yes, libspectre was unable to open the document, this may be due to a damaged ps file or a library error.

(libspectre) ghostscript reports: undefined -21

You can either convert the document to pdf using ps2pdf or, report the error to the library maintainers.

Screenshot at 2020-12-30 15-49-25

@rbuj
Copy link
Contributor

rbuj commented Dec 30, 2020

@raveit65 evince tried to fix it on GNOME/evince@f93a84c

@mgkuhn
Copy link
Author

mgkuhn commented Dec 31, 2020

Thanks, now reported to libstream developers at https://gitlab.freedesktop.org/libspectre/libspectre/-/issues/43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants