[ gpsdrive ] mem leak at 7mb/hr, bogus data in track.sav

Hamish hamish_b at yahoo.com
Tue Sep 23 02:27:39 AKDT 2008


Hi,

just to let you know about two bugs just filed at SF:
  http://sourceforge.net/tracker/?group_id=148048&atid=770280

---
The first: [ 2124271 ] gpsdrive leaks memory at 7mb/hr

I have noticed that if I leave gpsdrive running for a long time (overnight)
that it leaks a significant amount of memory. Even with show-track turned
off.
For some strange reason it slowed from 7.3 to 1.5 MB/hr after 3.5 hours.
valgrind memcheck log and memory use graph attached.
...
valgrind showed that the worst offender was the g_malloc() called from
gdk_pixbuf_new(). (see the massif.html attachment) Presumably it just
needs another g_free() somewhere??

secondary was three calls to g_malloc0() from main(), the 3 together
adding up in magnitude to about the same leakage rate as the primary
offender.

a number of plots and valgrind results attached to the bug's ticket.


---
The second: [ 2124308 ] track_*.sav full of 1001.0 junk data

when GpsDrive loses view of satellites it still logs position with dummy
1001.0 coords (but real timestamp).

why record this? it just wastes space.
if there is a desire to indicate a break between a contiguous string of
good fixes, maybe just insert one extra newline when the fix is first
lost.

the gpx logger seems to break these using <trkseg> within the same <trk>,
which is nice. (or at least it breaks trkseg for some reason, I have to
check if the times line up with .sav going to 1001.0s)


to get rid of it is all that is needed to modify storepoint() by
replacing "add_trackpoint(1001.0, ...)" with ";" ? [src/track.c line 171]


thanks,
Hamish


More information about the GPSdrive mailing list