Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Norway: Travel search from Oslo to Haugesund fails #3777

Closed
leonardehrenfried opened this issue Dec 10, 2021 · 3 comments
Closed

Norway: Travel search from Oslo to Haugesund fails #3777

leonardehrenfried opened this issue Dec 10, 2021 · 3 comments
Labels
Bug Entur On Entur Roadmap
Milestone

Comments

@leonardehrenfried
Copy link
Member

leonardehrenfried commented Dec 10, 2021

Expected behavior

When testing my flex stop locations feature (#3757) I noticed that there is a bug in OTP that was - I think - not introduced by my PR, as it happens on the currently deployed Entur version, too.

Observed behavior

When planning a route from Oslo to Haugesund the request fails and I see the following exception in the log:

Caused by: java.lang.IllegalStateException: null
	at org.opentripplanner.transit.raptor.api.path.PathBuilderLeg.timeShiftTransferTime(PathBuilderLeg.java:391)
	at org.opentripplanner.transit.raptor.api.path.PathBuilderLeg.timeShiftThisAndNextLeg(PathBuilderLeg.java:228)
	at org.opentripplanner.transit.raptor.api.path.PathBuilder.lambda$timeShiftAllStreetLegs$1(PathBuilder.java:203)
	at java.base/java.util.stream.Stream$2.forEachRemaining(Stream.java:1314)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at org.opentripplanner.transit.raptor.api.path.PathBuilder.timeShiftAllStreetLegs(PathBuilder.java:203)
	at org.opentripplanner.transit.raptor.api.path.PathBuilder.updateAggregatedFields(PathBuilder.java:173)
	at org.opentripplanner.transit.raptor.api.path.PathBuilder.build(PathBuilder.java:145)
	at org.opentripplanner.transit.raptor.rangeraptor.path.ReversePathMapper.mapToPath(ReversePathMapper.java:67)
	at org.opentripplanner.transit.raptor.rangeraptor.path.DestinationArrivalPaths.add(DestinationArrivalPaths.java:115)
	at org.opentripplanner.transit.raptor.rangeraptor.standard.stoparrivals.path.EgressArrivalToPathAdapter.addToPath(EgressArrivalToPathAdapter.java:96)
	at org.opentripplanner.transit.raptor.rangeraptor.standard.stoparrivals.path.EgressArrivalToPathAdapter.roundComplete(EgressArrivalToPathAdapter.java:81)
	at org.opentripplanner.transit.raptor.rangeraptor.standard.stoparrivals.path.EgressArrivalToPathAdapter.lambda$new$1(EgressArrivalToPathAdapter.java:50)
	at org.opentripplanner.transit.raptor.rangeraptor.workerlifecycle.LifeCycleEventPublisher.roundComplete(LifeCycleEventPublisher.java:65)
	at org.opentripplanner.transit.raptor.rangeraptor.RangeRaptorWorker.runRaptorForMinute(RangeRaptorWorker.java:186)
	at org.opentripplanner.transit.raptor.rangeraptor.RangeRaptorWorker.lambda$route$0(RangeRaptorWorker.java:162)
	at io.micrometer.core.instrument.composite.CompositeTimer.record(CompositeTimer.java:79)
	at org.opentripplanner.transit.raptor.rangeraptor.RangeRaptorWorker.route(RangeRaptorWorker.java:149)
	at org.opentripplanner.transit.raptor.rangeraptor.standard.heuristics.HeuristicSearch.route(HeuristicSearch.java:31)
	at org.opentripplanner.transit.raptor.service.HeuristicSearchTask.run(HeuristicSearchTask.java:125)
	at org.opentripplanner.transit.raptor.service.RangeRaptorDynamicSearch.runHeuristicsSequentially(RangeRaptorDynamicSearch.java:199)
	at org.opentripplanner.transit.raptor.service.RangeRaptorDynamicSearch.runHeuristics(RangeRaptorDynamicSearch.java:115)
	at org.opentripplanner.transit.raptor.service.RangeRaptorDynamicSearch.route(RangeRaptorDynamicSearch.java:71)
	at org.opentripplanner.transit.raptor.RaptorService.route(RaptorService.java:34)
	at org.opentripplanner.routing.algorithm.raptor.router.TransitRouter.route(TransitRouter.java:100)
	at org.opentripplanner.routing.algorithm.raptor.router.TransitRouter.route(TransitRouter.java:301)
	at org.opentripplanner.routing.algorithm.RoutingWorker.routeTransit(RoutingWorker.java:148)
	at org.opentripplanner.routing.algorithm.RoutingWorker.lambda$route$2(RoutingWorker.java:68)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
	... 6 common frames omitted

Version of OTP used (exact commit hash or JAR name)

https://otp2debug.entur.org

Steps to reproduce the problem

Visit https://otp2debug.entur.org/?module=planner&fromPlace=59.92199002450385%2C10.73638916015625&toPlace=59.4073549644218%2C5.2734375&time=1%3A43pm&date=12-10-2021&mode=TRANSIT%2CWALK&maxWalkDistance=4828.032&arriveBy=false&wheelchair=false&showIntermediateStops=true&debugItineraryFilter=false&locale=en

and click Plan.

@leonardehrenfried leonardehrenfried added the Entur On Entur Roadmap label Dec 10, 2021
@t2gran t2gran added this to the 2.1 milestone Dec 10, 2021
@leonardehrenfried leonardehrenfried changed the title Norway: Travel search from Oslo to Haugesung Norway: Travel search from Oslo to Haugesung fails Dec 10, 2021
@leonardehrenfried leonardehrenfried changed the title Norway: Travel search from Oslo to Haugesung fails Norway: Travel search from Oslo to Haugesund fails Dec 13, 2021
@t2gran
Copy link
Member

t2gran commented Feb 3, 2022

The stack-trace is missing information,I added a bit.

else {
            throw new IllegalStateException("Unexpected leg type before TransferLeg: " + this);
        }

in commit 72dc974.

@t2gran t2gran added the Bug label Feb 3, 2022
@t2gran
Copy link
Member

t2gran commented Feb 7, 2022

@hannesj encountered this problem to day and found this path causing the same problem:
NPE-Tx-2-Tx

This error happened with the Mexico city data set, where the error is quite frequent.

@t2gran
Copy link
Member

t2gran commented Mar 14, 2022

I will close this, I think it is fixed. Reopen if "Unexpected leg type before TransferLeg" is seen in logs with fix 3970 applied.

@t2gran t2gran closed this as completed Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Entur On Entur Roadmap
Projects
None yet
Development

No branches or pull requests

2 participants