Skip to content

NullPointerException when loading StreetEdgePair #6387

@miklcct

Description

@miklcct

Expected behavior

The graph builds and loads

Observed behavior

The graph build fails.

02:11:02.858 INFO [main]  (OsmModule.java:440) Build street graph progress: 345,000 of 7,116,995 ( 4%)
02:11:08.300 INFO [main]  (OsmModule.java:440) Build street graph progress: 375,000 of 7,116,995 ( 5%)
02:11:13.873 INFO [main]  (OsmModule.java:440) Build street graph progress: 405,000 of 7,116,995 ( 5%)
02:11:19.797 INFO [main]  (OsmModule.java:440) Build street graph progress: 435,000 of 7,116,995 ( 6%)
02:11:25.087 INFO [main]  (OsmModule.java:440) Build street graph progress: 465,000 of 7,116,995 ( 6%)
02:11:30.670 INFO [main]  (OsmModule.java:440) Build street graph progress: 495,000 of 7,116,995 ( 6%)
02:11:30.907 ERROR [main]  (OTPMain.java:61) An uncaught error occurred inside OTP: null
java.lang.NullPointerException: null
	at java.base/java.util.Objects.requireNonNull(Objects.java:233)
	at org.opentripplanner.service.osminfo.internal.DefaultOsmInfoGraphBuildRepository.addPlatform(DefaultOsmInfoGraphBuildRepository.java:23)
	at org.opentripplanner.graph_builder.module.osm.OsmModule.lambda$buildBasicGraph$1(OsmModule.java:429)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.opentripplanner.graph_builder.module.osm.OsmModule.buildBasicGraph(OsmModule.java:427)
	at org.opentripplanner.graph_builder.module.osm.OsmModule.build(OsmModule.java:174)
	at org.opentripplanner.graph_builder.module.osm.OsmModule.buildGraph(OsmModule.java:125)
	at org.opentripplanner.graph_builder.GraphBuilder.run(GraphBuilder.java:202)
	at org.opentripplanner.standalone.OTPMain.startOTPServer(OTPMain.java:144)
	at org.opentripplanner.standalone.OTPMain.main(OTPMain.java:56)
02:11:30.919 INFO [server-shutdown-info]  (OtpStartupInfo.java:48) OTP SHUTTING DOWN - Build Street & Transit Graph - Version: 2.7.0-SNAPSHOT-aubin-23, ser.ver.id: 176, commit: bef1c2de7b0c363a30c6064f3068214c78534992, branch: aubin-test

I suspect that may be my fault in #6247 after the new repository is introduced in 3825a02 , and digging into the source the null, the IDE shows a warning in OsmModule::getEdgesForStreet that null arguments are passed to parameters annotated as @NotNull , which is the source of the bug.

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

2.7.0-SNAPSHOT

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

Great Britain OSM

Command line used to start OTP

Router config and graph build config JSON

boardingLocations are enabled

Steps to reproduce the problem

Build the graph

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions