Latex Formula crashes with Unrecoverable error: stackunderflow in .setdistillerparams

Bug #1403454 reported by Manuel López-Ibáñez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned
inkscape (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Extensions->Render->Latex Formula...

Enter: $z \in \mathbb{R}^m$
Apply
Output:

GPL Ghostscript 9.10: Set UseCIEColor for UseDeviceIndependentColor to work properly.

Unrecoverable error: stackunderflow in .setdistillerparams

PostScript/PDF Interpreter finished. Return status 65280 executed command : /usr/bin/gs -I/home/manu/.fonts -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -dNOEPS "/tmp/inkscape-Lk7JkT/psinRKL3mZ"

The interpreter seems to have failed, cannot proceed !

Traceback (most recent call last):
  File "eqtexsvg.py", line 156, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 215, in affect
    self.effect()
  File "eqtexsvg.py", line 150, in effect
    svg_open(self, svg_file)
  File "eqtexsvg.py", line 81, in svg_open
    doc = inkex.etree.parse(filename)
  File "lxml.etree.pyx", line 3239, in lxml.etree.parse (src/lxml/lxml.etree.c:69955)
  File "parser.pxi", line 1748, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:102066)
  File "parser.pxi", line 1774, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:102330)
  File "parser.pxi", line 1678, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:101365)
  File "parser.pxi", line 1110, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:96817)
  File "parser.pxi", line 582, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:91275)
  File "parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:92461)
  File "parser.pxi", line 622, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:91757)
lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1

This is related to bug 1218350, however, adding a wrapper around /usr/bin/gs to add -dUseCIEColor still generates the error.

Following http://bugs.ghostscript.com/show_bug.cgi?id=694066#c4 adding -dColorConversionStrategy=/LeaveColorUnchanged instead fixes it but it produces some spurious output:

(CHAR1: )
(z)
0
0
0
32
0
-mark-
0
0
32
0
0
134
(CHAR1: )
(2)
0
0
0
32
0
-mark-
0
0
32
0
0
115
(CHAR1: )
(R)
0
0
0
32
0
-mark-
0
0
32
0
0
2465
4215
(CHAR1: )
(m)
0
0
0
32
0
-mark-
0
0
32
0
0

Nonetheless, the rendered formula seems correct.

This could be a bug in gs, in how pstoedit calls gs, or in how inkscape calls pstoedit.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: inkscape 0.48.4-3ubuntu2
ProcVersionSignature: Ubuntu 3.13.0-43.72-generic 3.13.11.11
Uname: Linux 3.13.0-43-generic i686
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: i386
CurrentDesktop: KDE
Date: Wed Dec 17 11:21:51 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-10-19 (58 days ago)
InstallationMedia: Kubuntu 14.04.1 LTS "Trusty Tahr" - Release i386 (20140722.2)
SourcePackage: inkscape
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Work-around in case it were useful to someone else:

$ sudo mv /usr/bin/gs /usr/bin/gs.original
$ sudo cat > /usr/bin/gs <<EOF
#!/bin/sh
##
# Wrapper to work-around bug https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/1403454
exec /usr/bin/gs.original -dColorConversionStrategy=/LeaveColorUnchanged "$@"
EOF
$ sudo chmod a+x /usr/bin/gs

Revision history for this message
su_v (suv-lp) wrote :

The spurious output of recent pstoedit when outlining glyphs is tracked in
Bug #1210287: LaTeX renderer shows an error message (but does render LaTeX formula)

tags: added: extensions-plugins
Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

The pdflatex extension no loger uses pstoedit, so closing.

Closed by https://gitlab.com/jhofinger

Changed in inkscape (Ubuntu):
status: New → Invalid
Changed in inkscape:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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