xdot crashes on floats in the .dot file

Bug #1317688 reported by Brian the Lion
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
xdot (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Medium
Unassigned

Bug Description

[ Impact ]

xdot is totally unusable with graphviz >= 2.31, due to xdot format changes http://www.graphviz.org/doc/info/output.html#d:xdot

[ Test case ]

$ cat > test.dot << EOF
 digraph {
 caesar [label = "caesar"];
 lizard [label = "lizard"];
 newton [label = "newton"];
 lizard -> newton;
 newton -> lizard;
 caesar -> lizard;
 lizard -> caesar;
}
EOF
$ xdot test.dot

If it crashes on startup, it's broken.

[ Regression Potential ]

~Nil, considering the level of brokennes.

=== Original report ===

Traceback (most recent call last):
  File "/usr/bin/xdot", line 4, in <module>
    xdot.main()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1947, in main
    win.open_file(args[0])
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1881, in open_file
    self.set_dotcode(fp.read(), filename)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1863, in set_dotcode
    if self.widget.set_dotcode(dotcode, filename):
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1477, in set_dotcode
    self.set_xdotcode(xdotcode)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1497, in set_xdotcode
    self.graph = parser.parse()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1167, in parse
    DotParser.parse(self)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 977, in parse
    self.parse_graph()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 986, in parse_graph
    self.parse_stmt()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1032, in parse_stmt
    self.handle_node(id, attrs)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1142, in handle_node
    shapes.extend(parser.parse())
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 625, in parse
    points = self.read_polygon()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 517, in read_polygon
    x, y = self.read_point()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 500, in read_point
    x = self.read_number()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 494, in read_number
    return int(self.read_code())
ValueError: invalid literal for int() with base 10: '360.25'

This has been corrected in more recent versions of the software.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: xdot 0.5-2
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: GNOME
Date: Thu May 8 18:47:25 2014
InstallationDate: Installed on 2014-04-08 (29 days ago)
InstallationMedia: Ubuntu-GNOME 14.04 LTS "Trusty Tahr" - Daily amd64 (20140408)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: xdot
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Brian the Lion (rossabri) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xdot (Ubuntu):
status: New → Confirmed
Revision history for this message
malheum (maxheise) wrote :

The title for this bug is a bit misleading. I do get a crash too, with this simple graph:

$ cat test-xdot
digraph {
 caesar [label = "caesar"];
 lizard [label = "lizard"];
 newton [label = "newton"];
 lizard -> newton;
 newton -> lizard;
 caesar -> lizard;
 lizard -> caesar;
}

So I'd say that xdot is currently *totally* broken in 14.0.4

Revision history for this message
malheum (maxheise) wrote :
Revision history for this message
Stefano Rivera (stefanor) wrote :
description: updated
Changed in xdot (Ubuntu Trusty):
importance: Undecided → Medium
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdot - 0.6-1

---------------
xdot (0.6-1) unstable; urgency=medium

  * New upstream release.
    - Supports graphviz >= 2.31 (LP: #1317688)
  * Switch debian/watch to https.
  * Bump copyright years.
  * Bump Standards-Version to 3.9.5, no changes needed.

 -- Stefano Rivera <email address hidden> Sun, 25 May 2014 17:57:57 +0200

Changed in xdot (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Please test proposed package

Hello Brian, or anyone else affected,

Accepted xdot into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/xdot/0.5-2ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in xdot (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
katsu (katsukatsu-deactivatedaccount) wrote :

[test case]
$ cat test-xdot
digraph {
 caesar [label = "caesar"];
 lizard [label = "lizard"];
 newton [label = "newton"];
 lizard -> newton;
 newton -> lizard;
 caesar -> lizard;
 lizard -> caesar;
}

$ xdot test-xdot
Traceback (most recent call last):
  File "/usr/bin/xdot", line 4, in <module>
    xdot.main()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1947, in main
    win.open_file(args[0])
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1881, in open_file
    self.set_dotcode(fp.read(), filename)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1863, in set_dotcode
    if self.widget.set_dotcode(dotcode, filename):
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1477, in set_dotcode
    self.set_xdotcode(xdotcode)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1497, in set_xdotcode
    self.graph = parser.parse()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1167, in parse
    DotParser.parse(self)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 977, in parse
    self.parse_graph()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 986, in parse_graph
    self.parse_stmt()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1032, in parse_stmt
    self.handle_node(id, attrs)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1142, in handle_node
    shapes.extend(parser.parse())
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 612, in parse
    w = s.read_number()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 494, in read_number
    return int(self.read_code())
ValueError: invalid literal for int() with base 10: '32.25'

[recheck by proposed package]
* enabled trusty-proposed & installed package.

$ LANG=C apt-cache policy xdot
xdot:
  Installed: 0.5-2ubuntu0.1
  Candidate: 0.5-2ubuntu0.1
  Version table:
 *** 0.5-2ubuntu0.1 0
        400 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-proposed/universe i386 Packages
        100 /var/lib/dpkg/status
     0.5-2 0
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty/universe i386 Packages

$ xdot test-xdot
* The graph was displayed. see the screenshot(text-xdot.png).

The bug was corrected.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdot - 0.5-2ubuntu0.1

---------------
xdot (0.5-2ubuntu0.1) trusty; urgency=medium

  * Support Xdot format 1.6, as used by graphviz >= 2.35 (LP: #1317688)
 -- Stefano Rivera <email address hidden> Sun, 25 May 2014 17:25:57 +0200

Changed in xdot (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of the Stable Release Update for xdot has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
malheum (maxheise) wrote :

Thanks for the fix. xdot works again now as expected

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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