bugGPSD - Bugs: bug #34562, error in json encoded device list

 
 

bug #34562: error in json encoded device list

Submitter:  None
Submitted:  Sun 16 Oct 2011 08:42:36 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  esr
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 17 Apr 2012 08:39:12 AM UTC, comment #4: 

Fix shipped in 3.5 or earlier.

Eric S. Raymond <esr>
Group administrator
Mon 24 Oct 2011 08:44:36 PM UTC, comment #3: 

Submitter has verified a fix.

Eric S. Raymond <esr>
Group administrator
Mon 17 Oct 2011 08:44:22 PM UTC, comment #2: 

I have been digging a bit deeper to determine the origin of the error.

Originally, I used gpsd version 2.92, as provided on Ubuntu 10.04 LTS. I tried the lastest version, by compiling the lastest version from git (3.1). The error is still there in version 3.1. I also get this error if I use an ordinary file instead of a named pipe.

I tried different flags on the command line, including -b and -n, but to no avail. Debugging output generated with -N -D 2 does not give a clue either.

If I look in the source code (gpsd_json.c), I would expect stopbits and cycle to appear after the parity, but these don't show up at all: all output after the opening " for the parity value is completely missing. Could it be that somehow that device->gpsdata.dev.parity is not initialized and therefore causes an error in the creation of the json string?

Igor Passchier <ipasschier>
Sun 16 Oct 2011 08:49:00 AM UTC, comment #1: 

Just a comment to notify that I was the original poster of this bug.

Igor Passchier <ipasschier>
Sun 16 Oct 2011 08:42:36 AM UTC, original submission:  

I am using gpsd to read the input from a named pipe. The named pipe is fed by another application to create in real time nmea sentences. All works fine, except that the first json sentence I receive after switching on WATCH, contains a lexicographical error. The sentence I receive is:

{"class":"DEVICES","devices":[{"class":"DEVICE","path":"/var/run/gpsfake/input.1.1","activated":1318753919.75,"flags":1,"driver":"Generic NMEA","native":0,"bps":9600,"parity":"}]}

A closing " is missing at the very end, for the value of "parity".

The actual sentences generated from the nmea input are all fine again, its just this one sentence causing trouble

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by esr (Posted a comment)
  • -email is unavailable- added by ipasschier (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-04-17 esr Open/ClosedOpen Closed
    2011-10-24 esr StatusNone Fixed
        Assigned toNone esr

    Back to the top

    Powered by Savane 3.13-0329.
    Corresponding source code