conveyal / r5

Developed to power Conveyal's web-based interface for scenario planning and land-use/transport accessibility analysis, R5 is our routing engine for multimodal (transit/bike/walk/car) networks with a particular focus on public transit
https://conveyal.com/learn
MIT License
290 stars 74 forks source link

NPE when first loading pickup delay modification #539

Open ansoncfit opened 5 years ago

ansoncfit commented 5 years ago

Seems like a minor error with loading/caching -- scenarios with these modifications work well after re-requesting.

java.lang.NullPointerException
    at com.conveyal.r5.analyst.scenario.IndexedPolygonCollection.getWinningPolygon(IndexedPolygonCollection.java:175)
    at com.conveyal.r5.streets.StreetLayer.getWaitTime(StreetLayer.java:1566)
    at com.conveyal.r5.streets.LinkedPointSet.computeEgressStopDelaysIfNeeded(LinkedPointSet.java:630)
    at com.conveyal.r5.profile.PerTargetPropagater.<init>(PerTargetPropagater.java:130)
    at com.conveyal.r5.analyst.TravelTimeComputer.computeTravelTimes(TravelTimeComputer.java:263)
    at com.conveyal.r5.analyst.cluster.AnalystWorker.handleOneSinglePointTask(AnalystWorker.java:424)
    at com.conveyal.r5.analyst.cluster.AnalysisWorkerController.handleSinglePoint(AnalysisWorkerController.java:50)
abyrd commented 5 years ago

I believe I've seen this problem before, but am now unable to reproduce this problem locally, using latest dev of analysis-backend, analysis-ui, and r5. To a freshly started backend, I have tried issuing single point requests first without car mode selected before doing one with car mode selected; only with car mode selected, etc. and can't trigger the problem.

Maybe it has something to do with the exact contents or field names of the geojson. Can you point me to the exact modification and project that caused the problem, and also tell me the sequence of events leading up to it? Was the network already in use (handling single point requests) without the modification, then the modification was created and more single point requests issued? Was the network already built? Thanks.

ansoncfit commented 5 years ago

On staging, with no worker running, the error occurs with R5 set to v4.6.0-5-g73b2ab8 and access/direct/egress modes set to BICYCLE_RENT,WALK at https://analysis.conveyal.com/regions/5d31363437ed816220a22702/analysis?projectId=5d31393f37ed816220a227ce