opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.2k stars 1.03k forks source link

RAPTOR: Nullpointer in traverse #830

Closed koch-t closed 12 years ago

koch-t commented 12 years ago

Novalis which file i have to modify at line 366?

Stacktrace: java.lang.NullPointerException at org.opentripplanner.routing.edgetype.PlainStreetEdge.traverse(PlainStreetEdge.java:212) at org.opentripplanner.routing.impl.raptor.Raptor.getStateDepartAt(Raptor.java:364) at org.opentripplanner.routing.impl.raptor.Raptor.getState(Raptor.java:351) at org.opentripplanner.routing.impl.raptor.Raptor.getPaths(Raptor.java:189) at org.opentripplanner.api.ws.PlanGenerator.generate(PlanGenerator.java:96) at org.opentripplanner.api.ws.Planner$1.call(Planner.java:95) at org.opentripplanner.api.ws.Planner$1.call(Planner.java:93) at org.opentripplanner.api.ws.Planner.wrapGenerate(Planner.java:77) at org.opentripplanner.api.ws.Planner.getItineraries(Planner.java:93) at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)

Previous discussion at https://github.com/openplans/OpenTripPlanner/commit/48bc14f7d727f3ce2142532ae66120d53373244a#commitcomment-1846461

koch-t commented 12 years ago

Most occurrences of this issue seem to take place within this feed. http://ovapi.nl/gtfs/gtfs-Kv1_LS_504_2012-09-04_2012-12-07.zip

novalis commented 12 years ago

I'm having a hard time reproducing this. Maybe that means I fixed the bug (I have a bunch of changes locally), or maybe I need more information. Can you give a URL that produces this error? Ideally, only using that one feed, but if you need to use other feeds, send a link and I'll include them in my graph.

koch-t commented 12 years ago

http://raptor.opentripplanner.nl/index.html#/ i get them here quite often. I'm getting on routing: departure @ 23:36 from 52.507719,5.462232 to 52.506465,5.483175 Am going to update to HEAD right now. And something i should have said earlier, i'm running this merged with the zmqupdatestreamer branch. https://github.com/StichtingOpenGeo/OpenTripPlanner/tree/otp_nl_dev

novalis commented 12 years ago

That one works for me on HEAD.

novalis commented 12 years ago

I haven't actually tried the zmqupdatestreamer branch at all, so I don't know how well the merge will work, I would expect this issue to be unrelated, but I'm not sure

koch-t commented 12 years ago

Running it now, except for a new nullpointer that was clearly due to the updatestreamer. It seems you fixed the bug. Also nice work on getting rid of the very stupid itineraries where it would go somewhere not on the right route with a bus then wait 6 hours in the middle of the night and then continue ;)

java.lang.NullPointerException at org.opentripplanner.updater.stoptime.StoptimeUpdater.getSnapshot(StoptimeUpdater.java:95) at org.opentripplanner.routing.core.RoutingContext.(RoutingContext.java:119) at org.opentripplanner.routing.core.RoutingRequest.setRoutingContext(RoutingRequest.java:589) at org.opentripplanner.routing.impl.raptor.Raptor.getPaths(Raptor.java:90) at org.opentripplanner.api.ws.PlanGenerator.generate(PlanGenerator.java:96) at org.opentripplanner.api.ws.Planner$1.call(Planner.java:95) at org.opentripplanner.api.ws.Planner$1.call(Planner.java:93) at org.opentripplanner.api.ws.Planner.wrapGenerate(Planner.java:77) at org.opentripplanner.api.ws.Planner.getItineraries(Planner.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)

abyrd commented 12 years ago

Yes, this NPE is zmq updater branch-specific. Will look into it tomorrow.

-Andrew

On 09/18/2012 12:40 AM, skywave wrote:

Running it now, except for a new nullpointer that was clearly due to the updatestreamer. It seems you fixed the bug. Also nice work on getting rid of the very stupid itineraries where it would go somewhere not on the right route with a bus then wait 6 hours in the middle of the night and then continue ;)

java.lang.NullPointerException at org.opentripplanner.updater.stoptime.StoptimeUpdater.getSnapshot(StoptimeUpdater.java:95) at org.opentripplanner.routing.core.RoutingContext.(RoutingContext.java:119) at org.opentripplanner.routing.core.RoutingRequest.setRoutingContext(RoutingRequest.java:589) at org.opentripplanner.routing.impl.raptor.Raptor.getPaths(Raptor.java:90) at org.opentripplanner.api.ws.PlanGenerator.generate(PlanGenerator.java:96) at org.opentripplanner.api.ws.Planner$1.call(Planner.java:95) at org.opentripplanner.api.ws.Planner$1.call(Planner.java:93) at org.opentripplanner.api.ws.Planner.wrapGenerate(Planner.java:77) at org.opentripplanner.api.ws.Planner.getItineraries(Planner.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)

— Reply to this email directly or view it on GitHub https://github.com/openplans/OpenTripPlanner/issues/830#issuecomment-8633715.