[FOSS-GPS] Decoding UBX data

Tomoji TAKASU ttaka at yk.rim.or.jp
Thu Mar 14 15:39:05 PDT 2013


Dear Par,

Thanks for pointing out a problem.

> I managed to get a version of that code running, but
> I had to change one file of rtklib to make that happen.
> The change needed was that I commented out the
> free_raw on line 300 of rcwraw.c. The free_raw calls
> free() on the members of the struct. Then the struct
> members are again accessed which causes a
> segmentation fault on my platform.

Or you can also initialize the raw struct in advance
(without modification of RTKLIB).

raw_t raw;
->
raw_t raw={0};

regards,

Tomoji TAKASU

--------------------------------------------------
From: "Degerman Pär" <par.degerman at scania.com>
Sent: Thursday, March 14, 2013 4:50 PM
To: "Open Source GPS-related discussion and support" 
<foss-gps at lists.osgeo.org>
Subject: Re: [FOSS-GPS] Decoding UBX data

> Dear Tomoji,
>
>> Like the following codes.
>> ...
>
> I managed to get a version of that code running, but I had to change one 
> file of rtklib to make that happen. The change needed was that I commented 
> out the free_raw on line 300 of rcwraw.c. The free_raw calls free() on the 
> members of the struct. Then the struct members are again accessed which 
> causes a segmentation fault on my platform.
>
> I'm using visual studio 2008 32 bit on a 64 bit platform and compiling in 
> debug mode. I'm not sure if I have introduced a memory leak making this 
> change or any other errors, but for my current use case this solution 
> seems to work.
>
> Best regards
> - Pär
>
> _______________________________________________
> This message is sent to you from FOSS-GPS at lists.osgeo.org mailing list.
> Visit http://lists.osgeo.org/mailman/listinfo/foss-gps to manage your 
> subscription
> For more information, check http://wiki.osgeo.org/wiki/FOSS-GPS 



More information about the FOSS-GPS mailing list