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

 
 

bug #34562: error in json encoded device list

Submitted by:  None
Submitted on:  Sun 16 Oct 2011 08:42:36 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Eric S. Raymond <esr>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Fix shipped in 3.5 or earlier.

Eric S. Raymond <esr>
Project AdministratorIn charge of this item.
Mon 24 Oct 2011 08:44:36 PM UTC, comment #3:

Submitter has verified a fix.

Eric S. Raymond <esr>
Project AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 17 Apr 2012 08:39:12 AM UTCesrOpen/ClosedOpen=>Closed
    Mon 24 Oct 2011 08:44:36 PM UTCesrStatusNone=>Fixed
      Assigned toNone=>esr

    Back to the top


    Powered by Savane 3.1-cleanup1