Fix index out of range for stop_times last arrival of multi-section run #704
+9
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I stumbled upon a motis crash
libc++abi: terminating due to uncaught exception of type cista::cista_exception: bucket::at: index out of range
with the 06.01.2025 DELFI GTFS and this query (didn't dare to try it out on one of the public instances...):/api/v1/stoptimes?stopId=gtfs_de%3A03159%3A33817%3A%3A8&time=2025-01-18T13%3A08%3A00.000Z&arriveBy=true&n=10
Occurs in nigiri/src/rt/frun.cc#L105 for the last stop of multi-section trips, because it would always look for a
event_type::kDep
.I.e. an alternative fix with less (interface) changes would be to make
get_trip_index(ev_type)
in nigiri more robust, but would then still lead to wrong results for thetrip_id
at stops where thetrip_id
switches (if I understand correctly).