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

NullPointerException when loading StreetEdgePair #6387

Open
miklcct opened this issue Jan 16, 2025 · 5 comments · May be fixed by #6410
Open

NullPointerException when loading StreetEdgePair #6387

miklcct opened this issue Jan 16, 2025 · 5 comments · May be fixed by #6410

Comments

@miklcct
Copy link
Contributor

miklcct commented Jan 16, 2025

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

@leonardehrenfried
Copy link
Member

I have now encountered this problem in one of my data sets. Are you going to work on it?

@miklcct
Copy link
Contributor Author

miklcct commented Jan 28, 2025

Yes probably next week

@leonardehrenfried
Copy link
Member

That's to late for me so I will take this issue over.

@miklcct
Copy link
Contributor Author

miklcct commented Jan 28, 2025

sorry as the only full-time developer in the Aubin project I have both the frontend and the data part of the project piling on me this month with deadlines to catch so I can't do it earlier.

@leonardehrenfried
Copy link
Member

Don't worry - it's fine. It will not be a hard fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants