pyvalhalla icon indicating copy to clipboard operation
pyvalhalla copied to clipboard

Segment fault

Open vtao1989 opened this issue 3 years ago • 5 comments

Package and system information: pyvalhalla 3.0.3 with python 3.10.6 in the Debian Linux 11.

My task was to map match several trips to the roads. The issue was that, after trace_route returned a RuntimeError with "Exact route match algorithm failed to find path" when map matching a trip, map matching another trip caused the "Segment fault" error.

vtao1989 avatar Nov 16 '22 19:11 vtao1989

I can't see how this causes a segfault within Valhalla (let alone the bindings, we don't do anything special here):

https://github.com/valhalla/valhalla/blob/5f59706b8a172f8e664835f79f1928c2de8fb837/src/thor/trace_route_action.cc#L84-L92

Can you provide a minimum example request (as few points as possible)?

nilsnolde avatar Nov 17 '22 04:11 nilsnolde

Sure.

You can find the code and data in this repo. The data contains GPS points of two trips.

I used the tiles built from PA, US. The repo does not allow me to upload large-size files. So you probably need to build tiles by yourself. Sorry for the inconvenience.

I tested this code in Windows and Linux, and the same issue occurred on both.

Thanks.

vtao1989 avatar Nov 17 '22 23:11 vtao1989

I had the same issue. In my case it was solved after increasing the trace_options.search_radius to 50 meters

nikosece avatar May 02 '23 14:05 nikosece

~~Also windows? Did you try other OSs?~~

Oops, @vtao1989 was also on Linux.. Do you have an easier way to replicate by any chance?

nilsnolde avatar May 02 '23 15:05 nilsnolde

I'm experiencing that my python script terminates unexpectedly after calling actor.trace_route.

echo %ERRORLEVEL% returns -1073740791

I'm not able to find the source of the crash in the python code itself, it crashes when I try to step into return super().trace_route(req)

I'm on Windows, Python 3.11, pyvalhalla 3.2.0.

thomthom avatar Aug 04 '24 21:08 thomthom