ps2ascii crashs at start

Bug #281419 reported by Christian Prim on 2008-10-10
4
Affects Status Importance Assigned to Milestone
ghostscript (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: ghostscript

In Intrepid Beta ps2ascii (package ghostscript 8.63.dfsg.1-0ubuntu4) crashs (with or without input-files)

Error-log:
***********

Username@Kubuntu:~$ ps2ascii
Error: /rangecheck in --put--
Operand stack:
   --nostringval-- false setshared .inew --nostringval-- --nostringval-- 1500 --nostringval--
Execution stack:
   %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1904 2 3 %oparray_pop 1903 2 3 %oparray_pop 1887 2 3 %oparray_pop 1771 2 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval--
Dictionary stack:
   --dict:1163/1684(G)-- --dict:0/20(G)-- --dict:94/200(L)-- --dict:1163/1684(G)--
Current allocation mode is global
Current file position is 8319
GPL Ghostscript 8.63: Unrecoverable error, exit code 1

Related branches

arno_b (arno.b) wrote :

Please can you explain how the crash occured. Can you reproduce it?

Try to obtain a backtrace by following the instructions on https://wiki.ubuntu.com/DebuggingProgramCrash.
(install packages 'ghostscript-dbgsym' and 'gdb' and see here for backtrace https://wiki.ubuntu.com/Backtrace)

Set to incomplete until we have a backtrace or more info.

Changed in ghostscript:
status: New → Incomplete
Christian Prim (christian-prim) wrote :

ps2ascii is a shell-script. It calls ghostscript (gs) as an interpreter. The interpreted ps-file (which does the work) is called /usr/share/ghostscript/8.63/lib/ps2ascii.ps. The Interpreter itself (that is ghostscript) doesn't crash with a segmentation fault or so. So a backtrace won't bring anything to solve the problem.

The problem is probably with the ps2ascii.ps-file. Or the new ghostscript missinterpretes this file.

On my system (amd64) the problem occurs in every situation. ps2ascii doesn't work in any circumstances.

Just for your information: ps2epsi works identically to ps2ascii without any problems!
(the shellscript ps2epsi is a bit longer and complexer than ps2ascii, but it calls in the same manner ghostscript as interpreter with a ps2epsi.ps-file)

Hope, this helps you enough.

Christian Prim (christian-prim) wrote :

Since ps2ascii.ps-file didn't change to my working version in Hardy, the problem must probably be with the new interpreter.

arno_b (arno.b) on 2008-10-13
Changed in ghostscript:
status: Incomplete → New
Till Kamppeter (till-kamppeter) wrote :

Can you edit /usr/bin/ps2ascii removing the "-dDELAYBIND" from the "OPTIONS=..." line? Then try to use ps2ascii again and check whether you get correct results.

Changed in ghostscript:
status: New → Incomplete
Christian Prim (christian-prim) wrote :

I tried this. The output is correct so far. But ghostscript can't quit (the last command "-c quit" in /usr/bin/ps2ascii) without a Segmenation fault (core dumped).

Because ghostscript-dbg or -dbgsym isn't in the repo, I don't think the core dump will help further.

But it is attached for your information.

I have installed the newest version:

ghostscript 8.63.dfsg.1-0ubuntu5

Christian Prim (christian-prim) wrote :

I tested it with -dNOBIND switch and it works so far for me! But I think this is still a bug, because ps2ascii uses this -dDELAYBIND switch as it is written in the man-pages.

Shall I do further tests? If desired, do you have a test-file for me?

Thanks

Till Kamppeter (till-kamppeter) wrote :

Thank you very much.

I have reported it upstream

http://bugs.ghostscript.com/show_bug.cgi?id=690124

but I will apply your solution anyway, as we have release freeze tomorrow.

Till Kamppeter (till-kamppeter) wrote :

Unfortunately, I cannot apply the "-dNOBIND" solution. It does not work for me.

Till Kamppeter (till-kamppeter) wrote :

This bug got fixed upstream and I have verified that "ps2ascii" really works now.

Changed in ghostscript:
status: Incomplete → Triaged

Thanks a lot!

Christian Prim, for getting your problem fixed immediately, apply the patch attached to the upstream bug

http://bugs.ghostscript.com/attachment.cgi?id=4519&action=view

to the file

/usr/share/ghostscript/8.63/lib/gs_init.ps

on your system.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 8.63.dfsg.1-0ubuntu6

---------------
ghostscript (8.63.dfsg.1-0ubuntu6) intrepid; urgency=low

  * debian/patches/42_gs-init-ps-delaybind-fix.dpatch: Make "ps2ascii" working
    again (LP: #281419, upstream bug #690124).

  * debian/patches/45_bjc600-bjc800-pdf-input.dpatch: Fix setting of the
    "DitheringType" option. With PDF input Ghostscript crashes, with
    PostScript input the "DitheringType" option was probably ignored
    (Upstream bug #690032).

  * debian/patches/48_cups-output-device-pdf-duplex-uninitialized-memory.patch.dpatch:
    Fixed several bugs in the "cups" (CUPS Raster) output device:
     - Ghostscript crashed with PDF input data
     - The "Duplex" and "MediaWeight" options were ignored
     - There was uninitialized memory and wrong usage of pointers, potential
       cause for segmentation faults or even vulnerabilities
     - There were mismatches in data types, leading to possible breakage
       of the "AdvanceDistance", "MediaWeight", and "cupsStringXX" options.
    (Upstream bug #690101).

 -- Till Kamppeter <email address hidden> Sun, 19 Oct 2008 12:48:22 +0200

Changed in ghostscript:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.