gpsprof crashed with IOError in __main__: [Errno 32] Broken pipe

Bug #1018583 reported by Roman Stingler
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gpsd (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

when trying to plot gps fixes via gnuplot a error is generated

without plot works fine
$ gpsprof -n5
gpsprof: 20261 looking for fix...first fix in 0.45sec, gathering 5 samples......(4.44 sec) done.
set title "2012-06-27T20:23:49, Generic NMEA, 9600 8N1, cycle 1s"
set autoscale
set key below
set key title "2012-06-27T20:23:53"
set size ratio -1
set style line 2 pt 1
set style line 3 pt 2
set xlabel "Meters east from 14E"
set ylabel "Meters north from 46N"
set border 15
set y2label "Meters Altitude from 219.760000"
set ytics nomirror
set y2tics
cep=0.134223
cep95=0.189821
cep99=0.189821
set parametric
set trange [0:2*pi]
cx(t, r) = sin(t)*r
cy(t, r) = cos(t)*r
chlen = cep/20
set arrow from -chlen,0 to chlen,0 nohead
set arrow from 0,-chlen to 0,chlen nohead
plot "-" using 1:2 with points ls 3 title "5 GPS fixes" , "-" using ( 1.000000 ):($5 < 100000 ? $5 - 219.760000 : 1/0) axes x1y2 with points ls 2 title " 5 Altitude fixes, Average = 219.760000, EP (50%) = 0.160000", cx(t, cep),cy(t, cep) ls 1 title "CEP (50%) = 0.000000 meters", cx(t, cep95),cy(t, cep95) title "CEP (95%) = 0.164390 meters", cx(t, cep99),cy(t, cep99) title "CEP (99%) = 0.164390 meters"
# Position uncertainty, 2012-06-27T20:23:49, Generic NMEA, 9600 8N1, cycle 1s

but when plotted this error is generated:
$ gpsprof -n5 | gnuplot -p
gpsprof: 20370 looking for fix...first fix in 0.56sec, gathering 5 samples......(4.93 sec) done.
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr

ProblemType: Crash
DistroRelease: Ubuntu 12.10
Package: python-gps 3.6-3ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-2.2-generic 3.5.0-rc4
Uname: Linux 3.5.0-2-generic x86_64
ApportVersion: 2.2.5-0ubuntu1
Architecture: amd64
CrashCounter: 1
Date: Wed Jun 27 22:21:59 2012
ExecutablePath: /usr/bin/gpsprof
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120413)
InterpreterPath: /usr/bin/python2.7
ProcCmdline: python /usr/bin/gpsprof -n50
ProcEnviron:
 TERM=xterm
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
PythonArgs: ['/usr/bin/gpsprof', '-n50']
SourcePackage: gpsd
Title: gpsprof crashed with IOError in __main__: [Errno 32] Broken pipe
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/gpsprof", line 405, in <module>
     sys.stdout.write(plot.plot())
 IOError: [Errno 32] Broken pipe
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Roman Stingler (coolx67) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Miriam España Acebal (mirespace) wrote :

Hi,

While doing some bug cleanup, I found this old bug.

First of all, thank you for reporting this bug to Ubuntu.

Ubuntu 12.04 (precise) reached end-of-life on April 28, 2017, so I'm afraid this bug can't be fixed. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner, but it appears to be no further action possible at this time.

Anyway, I checked if the bug is present in the current supported Ubuntu series, and it is not (i.e, for Jammy):

❯ gpsprof -n50 | gnuplot -p
gpsprof: 32664 looking for fix...first fix in 1.03sec, gathering 50 samples......(44.07 sec) done.
Warning: empty x range [-0:-0], adjusting to [-1:1]
Warning: empty y range [-0:-0], adjusting to [-1:1]

Also, the broken pipe error suggests that gnuplot wasn't available to receive data from gpsprof. Now, it seems that this exception is well handled and doesn't produce the crash anymore:

❯ gpsprof -n5 | gnuplot -p
gpsprof: 2247416 looking for fix...first fix in 0.04sec, gathering 5 samples......(2.01 sec) done.
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32]

Due to the above, I'm marking this bug as "Won't fix".

Changed in gpsd (Ubuntu):
status: New → Won't Fix
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.