Or-tools: Segmentation Fault with SetArcCostEvaluatorOfAllVehicles

Created on 19 Aug 2016  路  2Comments  路  Source: google/or-tools

This is a peculiar one:

This works:

callback = CreateLocationCallback(locations)
dist_callback = callback.distance
routing.SetArcCostEvaluatorOfAllVehicles(dist_callback)
...
assignment = routing.SolveWithParameters(search_parameters)

This does not

callback = CreateLocationCallback(locations)
routing.SetArcCostEvaluatorOfAllVehicles(callback.distance)
...
assignment = routing.SolveWithParameters(search_parameters)

Occurs on OSX, perhaps something to do with not using python reference counts correctly??

Bug Python Routing Solver

Most helpful comment

I also encountered the same problem. Your tentative solution saves my life...

All 2 comments

I also encountered the same problem. Your tentative solution saves my life...

Most likely quirks in the GC.

As the API has changed a lot since 7.0, I will close the bug.

Was this page helpful?
0 / 5 - 0 ratings