Skip to content

ArrayIndexOutOfBoundsException when applying trip updates #3110

@gmellemstrand

Description

@gmellemstrand

NOTE: this issue system is intended for reporting bugs and tracking progress in software development. For all other usage and software development questions or discussion, please write to one of the mailing lists (Google groups):
https://groups.google.com/forum/#!forum/opentripplanner-dev
https://groups.google.com/forum/#!forum/opentripplanner-users

Expected behavior

Observed behavior

OTP throws an ArrayIndexOutOfBoundsException when applying trip updates on the Dutch graph.

11:04:24.628 ERROR (GraphUpdaterManager.java:153) Error while running graph writer org.opentripplanner.updater.stoptime.TripUpdateGraphWriterRunnable: java.lang.ArrayIndexOutOfBoundsException: Index 12 out of bounds for length 12 at org.opentripplanner.model.TripPattern.setHopGeometriesFromPattern(TripPattern.java:173) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TripPatternCache.getOrCreateTripPattern(TripPatternCache.java:63) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.addTripToGraphAndBuffer(TimetableSnapshotSource.java:697) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.handleModifiedTrip(TimetableSnapshotSource.java:895) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.validateAndHandleModifiedTrip(TimetableSnapshotSource.java:861) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.applyTripUpdates(TimetableSnapshotSource.java:237) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TripUpdateGraphWriterRunnable.run(TripUpdateGraphWriterRunnable.java:46) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.GraphUpdaterManager.lambda$execute$0(GraphUpdaterManager.java:151) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] 11:04:24.655 ERROR (GraphUpdaterManager.java:153) Error while running graph writer org.opentripplanner.updater.stoptime.TripUpdateGraphWriterRunnable: java.lang.ArrayIndexOutOfBoundsException: Index 28 out of bounds for length 28 at org.opentripplanner.model.TripPattern.setHopGeometriesFromPattern(TripPattern.java:173) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TripPatternCache.getOrCreateTripPattern(TripPatternCache.java:63) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.addTripToGraphAndBuffer(TimetableSnapshotSource.java:697) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.handleModifiedTrip(TimetableSnapshotSource.java:895) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.validateAndHandleModifiedTrip(TimetableSnapshotSource.java:861) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.applyTripUpdates(TimetableSnapshotSource.java:237) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TripUpdateGraphWriterRunnable.run(TripUpdateGraphWriterRunnable.java:46) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.GraphUpdaterManager.lambda$execute$0(GraphUpdaterManager.java:151) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] 11:04:24.656 ERROR (GraphUpdaterManager.java:153) Error while running graph writer org.opentripplanner.updater.stoptime.TripUpdateGraphWriterRunnable: java.lang.ArrayIndexOutOfBoundsException: Index 8 out of bounds for length 8 at org.opentripplanner.model.TripPattern.setHopGeometriesFromPattern(TripPattern.java:173) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TripPatternCache.getOrCreateTripPattern(TripPatternCache.java:63) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.addTripToGraphAndBuffer(TimetableSnapshotSource.java:697) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.handleModifiedTrip(TimetableSnapshotSource.java:895) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.validateAndHandleModifiedTrip(TimetableSnapshotSource.java:861) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TimetableSnapshotSource.applyTripUpdates(TimetableSnapshotSource.java:237) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.stoptime.TripUpdateGraphWriterRunnable.run(TripUpdateGraphWriterRunnable.java:46) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at org.opentripplanner.updater.GraphUpdaterManager.lambda$execute$0(GraphUpdaterManager.java:151) ~[otp-2.0.0-SNAPSHOT-shaded.jar:1.1] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] 11:04:24.740 ERROR (GraphUpdaterManager.java:153) Error while running graph writer org.opentripplanner.updater.stoptime.TripUpdateGraphWriterRunnable: java.lang.ArrayIndexOutOfBoundsException: Index 6 out of bounds for length 6

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

Latest dev-2.x

Data sets in use (links to GTFS and OSM PBF files)

I don't know it these are public, so I will leave it up to @sven4all to provide them.

Command line used to start OTP

Router config and graph build config JSON

Steps to reproduce the problem

Start up OTP with the Dutch graph and realtime updaters.

Metadata

Metadata

Assignees

Labels

!BugApply to issues describing a bug and PRs witch fixes it.StaleThis issue is stale, no activity for 90 days. Remove stale label or comment within 30 days.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions