[Tile-serving] [openstreetmap/osm2pgsql] segfault in middle_pgsql_t::local_nodes_set (#564)

Paul Norman notifications at github.com
Fri Apr 1 16:42:00 UTC 2016


If it's hitting pgsql.cpp:130 then it's in the `if(PQresultStatus(res) != expect)` logic and in the process of throwing an error. 

The actual code is `message += paramValues[i];` where `message` is a `std::string` and `paramValues` is a `const char *const *`

Prior to the line, message is `insert_node failed: ERROR:  duplicate key value violates unique constraint \"planet_osm_nodes_pkey\"\nDETAIL:  Key (id)=(2554008024) already exists.\n(7)\n`

printing off what it's trying to append, the issue is that one of the params is null

```
(gdb) print paramValues[0]
$8 = 0x7fffffffd830 "2554008024"
(gdb) print paramValues[1]
$9 = 0x7fffffffd83b "603106530"
(gdb) print paramValues[2]
$10 = 0x7fffffffd845 "85998169"
(gdb) print paramValues[3]
$11 = 0x0
```

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/564#issuecomment-204465771
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20160401/996c1153/attachment.html>


More information about the Tile-serving mailing list