Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

gosmore segfault on rebuild #5110

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

gosmore segfault on rebuild #5110

openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

Reporter: harold[at]il.ibm.com
[Submitted to the original trac issue database at 6.05pm, Monday, 3rd February 2014]

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]))

@openstreetmap-trac
Copy link
Author

Author: lambertus
[Added to the original trac issue at 8.54pm, Saturday, 15th March 2014]

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

@openstreetmap-trac
Copy link
Author

Author: mmd
[Added to the original trac issue at 6.49pm, Tuesday, 19th May 2020]

Gosmore project is no longer active, closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant