NullPointerException in custom GTFS

Hi, I am new to the GraphHopper engine, and am trying to load in a custom GTFS file for the first time. It is a rather large file, representing public transit routes for London.

When starting up the server, I run into the following exception:

2021-01-17 10:40:51.083 [main] INFO  com.conveyal.gtfs.GTFSFeed - Feed ID is undefined, pester maintainers to include a feed ID. Using file name tfl-gtfs.
2021-01-17 10:40:51.083 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Loading GTFS table agency from agency.txt
2021-01-17 10:40:51.090 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Loading GTFS table calendar from calendar.txt
2021-01-17 10:40:51.093 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Table calendar_dates was missing but it is not required.
2021-01-17 10:40:51.104 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Table fare_attributes was missing but it is not required.
2021-01-17 10:40:51.104 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Table fare_rules was missing but it is not required.
2021-01-17 10:40:51.104 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Loading GTFS table routes from routes.txt
2021-01-17 10:40:51.119 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Loading GTFS table shapes from shapes.txt
2021-01-17 10:40:51.709 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Loading GTFS table stops from stops.txt
2021-01-17 10:40:51.946 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Table transfers was missing but it is not required.
2021-01-17 10:40:51.946 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Loading GTFS table trips from trips.txt
2021-01-17 10:40:52.954 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Table frequencies was missing but it is not required.
2021-01-17 10:40:52.955 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Loading GTFS table stop_times from stop_times.txt
2021-01-17 10:40:55.503 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 500.0k
2021-01-17 10:40:58.347 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 1.0M
2021-01-17 10:41:01.640 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 1.5M
2021-01-17 10:41:04.778 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 2.0M
2021-01-17 10:41:07.907 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 2.5M
2021-01-17 10:41:11.154 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 3.0M
2021-01-17 10:41:14.135 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 3.5M
2021-01-17 10:41:17.406 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 4.0M
2021-01-17 10:41:21.184 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 4.5M
2021-01-17 10:41:24.806 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 5.0M
2021-01-17 10:41:27.959 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 5.5M
2021-01-17 10:41:31.333 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 6.0M
2021-01-17 10:41:34.224 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 6.5M
2021-01-17 10:41:37.232 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 7.0M
2021-01-17 10:41:40.370 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 7.5M
2021-01-17 10:41:43.631 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 8.0M
2021-01-17 10:41:47.006 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 8.5M
2021-01-17 10:41:50.255 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 9.0M
2021-01-17 10:41:53.578 [main] INFO  c.conveyal.gtfs.model.Entity$Loader - Record number 9.5M
2021-01-17 10:42:41.848 [main] INFO  com.graphhopper.gtfs.GraphHopperGtfs - Building transit graph for feed tfl-gtfs
2021-01-17 10:42:42.525 [main] ERROR io.dropwizard.cli.ServerCommand - Unable to start server, shutting down
java.lang.RuntimeException: Error while constructing transit network. Is your GTFS file valid? Please check log for possible causes.
    at com.graphhopper.gtfs.GraphHopperGtfs.importPublicTransit(GraphHopperGtfs.java:189)
    at com.graphhopper.GraphHopper.postProcessing(GraphHopper.java:937)
    at com.graphhopper.GraphHopper.process(GraphHopper.java:665)
    at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:628)
    at com.graphhopper.http.GraphHopperManaged.start(GraphHopperManaged.java:125)
    at io.dropwizard.lifecycle.JettyManaged.doStart(JettyManaged.java:27)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
    at org.eclipse.jetty.server.Server.start(Server.java:423)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
    at org.eclipse.jetty.server.Server.doStart(Server.java:387)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
    at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:53)
    at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:45)
    at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87)
    at io.dropwizard.cli.Cli.run(Cli.java:78)
    at io.dropwizard.Application.run(Application.java:94)
    at com.graphhopper.http.GraphHopperApplication.main(GraphHopperApplication.java:36)
Caused by: java.lang.NullPointerException: null
    at com.graphhopper.gtfs.GtfsReader.lambda$null$0(GtfsReader.java:162)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1603)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
    at com.graphhopper.gtfs.GtfsReader.lambda$createTrips$3(GtfsReader.java:171)
    at com.google.common.collect.Maps$Values.lambda$forEach$0(Maps.java:3889)
    at java.base/java.util.Map.forEach(Map.java:661)
    at com.google.common.collect.Maps$Values.forEach(Maps.java:3889)
    at com.graphhopper.gtfs.GtfsReader.createTrips(GtfsReader.java:156)
    at com.graphhopper.gtfs.GtfsReader.buildPtNetwork(GtfsReader.java:142)
    at com.graphhopper.gtfs.GraphHopperGtfs.lambda$importPublicTransit$1(GraphHopperGtfs.java:184)
    at java.base/java.util.HashMap.forEach(HashMap.java:1336)
    at java.base/java.util.Collections$UnmodifiableMap.forEach(Collections.java:1505)
    at com.graphhopper.gtfs.GraphHopperGtfs.importPublicTransit(GraphHopperGtfs.java:172)
    ... 18 common frames omitted

The error message indicates that there might be more information in the logs, but I don’t see any clues other than the stacktrace posted above. Could you share any hints on how to go about debugging this? I bet there is something wrong with the GTFS file, but it’s millions of lines long and I don’t know where to start looking. Any help or hints would be greatly appreciated!

Powered by Discourse