# Segmentation fault (core dumped) when adding GeoJSON polygon in Aerospike

**URL:** <https://discuss.aerospike.com/t/segmentation-fault-core-dumped-when-adding-geojson-polygon-in-aerospike/4183>\
**Category:** Client Libraries\
**Tags:** index\
**Created:** [May 22, 2017, 3:43pm UTC](https://discuss.aerospike.com/t/segmentation-fault-core-dumped-when-adding-geojson-polygon-in-aerospike/4183 "2017-05-22T15:43:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anuranjit](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/anuranjit/32/670_2.png) [@anuranjit](https://discuss.aerospike.com/u/anuranjit)\
**Post date:** [May 22, 2017, 3:43pm UTC](https://discuss.aerospike.com/t/segmentation-fault-core-dumped-when-adding-geojson-polygon-in-aerospike/4183/1 "2017-05-22T15:43:18Z")

</div>

[Stackoverflow crosspost.](https://stackoverflow.com/questions/44117044/segmentation-fault-core-dumped-when-adding-geojson-polygon-in-aerospike)

Hi,

I am **Segmentation fault (core dumped**) when i am trying to put GeoJSON in aerospike in persistent namespace. It happens very frequently. I also create an Index on the bbox field.

Below is the sample code ( This runs in a loop of 300000)

```
 geo_gson = GeoJSON({
                "type": "Polygon",
                "coordinates": [[
                    [min_lng, max_lat],
                    [max_lng, max_lat],
                    [max_lng, min_lat],
                    [min_lng, min_lat],
                    [min_lng, max_lat],
                ]]
            })
            bins = {
                "row": row, 
                "col": col,
                "city": city,
                "bbox": geo_gson,
                "min_lat": min_lat,
                "min_lng": min_lng,
                "max_lat": max_lat,
                "max_lng": max_lat
            }
      aerospike_client.put(("namespace", "set", "mykey"), bins)

```

I am using aerospike server 3.8.3 and python client aerospike==2.0.5. There is no error in aerospike log. This just fails without any error information.

Update:

```
   {'city': 1L, 'max_lng': 12.66811406299999, 'min_lng': 77.229080252800131, 'bbox': '{"type": "Polygon", "coordinates": [[[77.229080252800131, 12.66811406299999], [77.239080252800136, 12.66811406299999], [77.239080252800136, 12.65811406299999], [77.229080252800131, 12.65811406299999], [77.229080252800131, 12.66811406299999]]]}', 'max_lat': 12.66811406299999, 'min_lat': 12.65811406299999, 'col': 26, 'row': 46}

```

This is the **bin** for which it crashes (client)

Update 2: If I limit the float precision to 6 decimal places it works.

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [May 22, 2017, 5:17pm UTC](https://discuss.aerospike.com/t/segmentation-fault-core-dumped-when-adding-geojson-polygon-in-aerospike/4183/2 "2017-05-22T17:17:43Z")

</div>

There is a Geospatial related segfault addressed in the [2.0.7 python client release](http://www.aerospike.com/download/client/python/notes.html#2.0.7).

---

<div class="post-metadata">

**Author:** ![anuranjit](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/anuranjit/32/670_2.png) [@anuranjit](https://discuss.aerospike.com/u/anuranjit)\
**Post date:** [May 22, 2017, 5:26pm UTC](https://discuss.aerospike.com/t/segmentation-fault-core-dumped-when-adding-geojson-polygon-in-aerospike/4183/3 "2017-05-22T17:26:46Z")

</div>

@kporter I mentioned in the update that if i decrease the precision of

```
  min_lat min_lng max_lat max_lng

```

the error does not come. I am facing the issue in 2.0.13 also but not as frequently
