Opened 5 years ago

Last modified 5 years ago

#5110 new defect

gosmore segfault on rebuild

Reported by: harold@… Owned by: nroets@…
Priority: blocker Milestone:
Component: gosmore Version:
Keywords: gosmore rebuild pak core segfault segmentation fault Cc:


Whenever I try to run gosmore rebuild it segfaults. I have debugged it and attach a diff which solves the problem for me.

Setup: Ubuntu Saucy (13.10) amd64 Gosmore from svn 03/02/2014

problem is at line 1506 in jni/libgosm.cpp

svn diff

Index: jni/libgosm.cpp
--- jni/libgosm.cpp	(revision 30261)
+++ jni/libgosm.cpp	(working copy)
@@ -1504,7 +1504,7 @@
   // Now adjust for track type.
   if ((k2v["tracktype"] && isdigit (k2v["tracktype"][5])) ||
-    strcmp (k2v["highway"], "track") == 0) {
+    (k2v["highway"] && strcmp (k2v["highway"], "track") == 0)) {
     // many tracks don't have a tracktype, assume them as rather slow
     int tracktype = 2;
     if (k2v["tracktype"] && isdigit (k2v["tracktype"][5]))

Change History (1)

comment:1 Changed 5 years ago by lambertus

Identical behaviour in Debian 7 "Wheezy". Proposed patch works.

Note: See TracTickets for help on using tickets.