Bug 2178198 - 'gs -sDEVICE=display <file.ps>' segfaults
Summary: 'gs -sDEVICE=display <file.ps>' segfaults
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: ghostscript
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-14 14:06 UTC by Zdenek Dohnal
Modified: 2024-03-24 08:36 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-03-24 08:36:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Postscript file for testing (16.73 KB, application/postscript)
2023-03-14 14:06 UTC, Zdenek Dohnal
no flags Details
Full backtrace (16.29 KB, text/plain)
2023-03-14 14:09 UTC, Zdenek Dohnal
no flags Details

Description Zdenek Dohnal 2023-03-14 14:06:27 UTC
Created attachment 1950633 [details]
Postscript file for testing

Description of problem:
If I want to view Postscript file with -sDEVICE=display, 'gs' segfaults

Version-Release number of selected component (if applicable):
ghostscript-10.0.0-3.fc38.x86_64

How reproducible:
Always

Steps to Reproduce:
1. $ gs -sDEVICE=display <file.ps>

Actual results:
Segfault

Expected results:
GUI viewer for Postscript files starts

Comment 1 Zdenek Dohnal 2023-03-14 14:09:05 UTC
Created attachment 1950635 [details]
Full backtrace

Comment 2 Michael J Gruber 2023-03-14 14:20:59 UTC
Note that the x11 device is named 'x11'. Has 'display' ever worked here? Not on 9.55 nor 9.56. (gs should fail more gracefully, of course.)

Comment 3 Zdenek Dohnal 2023-03-14 15:02:36 UTC
Not sure - I've tested 'display' device just because x11 device is missing since 10.0.0.

From upstream regarding x11 device - it's a dynamic device which got removed because some symbols became hidden, so now only the library is shipped and not a dynamic device. Users can use 'gsx' from ghostscript-gtk to view postscript files.

According to upstream 'display' is badly chosen name from the past, it is actually an in-memory rendering device used for rendering to a display on MS Win. But still it would be great if it didn't crash :)

Comment 4 Michael J Gruber 2023-03-14 15:33:58 UTC
Interesting. If I build 10.0.0 from ghostpdl.git (plus extract.git, minus the libs we de-bundle in fedora) I get the x11 device. I guess the distribution tarball (which the spec pulls, as it should) differs.

We have gsx in ghostscript-gtk in fedora.

And yes, crashing should not be the way in which gs communicates non-working devices or parameters ... But that should be an upstream bug.

Comment 5 Fedora Admin user for bugzilla script actions 2024-01-06 00:13:52 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 6 Alex Cherepanov 2024-03-22 20:51:35 UTC
The display device is used by the MS Windows, OS/2 and the gtk+ versions of Ghostscript.

The segmentation fault has been fixed in v. 10.01.0 and higher.
New versions report an unrecoverable error message and exit.

Comment 7 Zdenek Dohnal 2024-03-24 08:36:56 UTC
I confirm Alex's findings - the current ghostscript on F38 - ghostscript-10.02.1-2.fc38.x86_64  - gets unrecoverable error instead of segfault, which is correct.


Note You need to log in before you can comment on or make changes to this bug.