With graph.do_sort getting Too many names are stored, currently limited to int pointer error

Here is my config.yml


  datareader.file: ""
  graph.location: graph-cache
  graph.flag_encoders: car

    - name: car
      vehicle: car
      weighting: fastest
#  profiles_ch:
#    - profile: car

  profiles_lm: []
  prepare.ch.threads: ${NUM_OF_CORES:8}

  prepare.min_network_size: 200
  #prepare.min_one_way_network_size: 200

  routing.non_ch.max_waypoint_distance: 1000000

  graph.dataaccess: RAM_STORE
  graph.do_sort: true
# Dropwizard server configuration
  - type: http
    port: 8989
    # for security reasons bind to localhost
    bind_host: localhost
      appenders: []
  - type: http
    port: 8990
    bind_host: localhost
# See https://www.dropwizard.io/1.3.8/docs/manual/configuration.html#logging
  - type: file
    time_zone: UTC
    current_log_filename: logs/graphhopper.log
    log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
    archive: true
    archived_log_filename_pattern: ./logs/graphhopper-%d.log.gz
    archived_file_count: 30
    never_block: true
  - type: console
    time_zone: UTC
    log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"

Without the #graph.do_sort: true, I am able to get the get Graphhopper up and running. But with graph.do_sort: true , I am getting this error.

Graphhopper version: 2.0

020-10-29 22:49:51.416 [main] INFO o.e.jetty.setuid.SetUIDListener - Opened application@26844abb{HTTP/1.1, (http/1.1)}{}
2020-10-29 22:49:51.420 [main] INFO o.e.jetty.setuid.SetUIDListener - Opened admin@1a865273{HTTP/1.1, (http/1.1)}{localhost:8990}
2020-10-29 22:49:51.424 [main] INFO org.eclipse.jetty.server.Server - jetty-9.4.28.v20200408; built: 2020-04-08T17:49:39.557Z; git: ab228fde9e55e9164c738d7fa121f8ac5acd51c9; jvm 11.0.8+10
2020-10-29 23:00:22.576 [main] ERROR io.dropwizard.cli.ServerCommand - Unable to start server, shutting down
java.lang.IllegalStateException: Too many names are stored, currently limited to int pointer
at com.graphhopper.storage.BaseGraph.setName(BaseGraph.java:826)
at com.graphhopper.storage.BaseGraph.access$600(BaseGraph.java:48)
at com.graphhopper.storage.BaseGraph$EdgeIteratorStateImpl.setName(BaseGraph.java:1182)

The code at https://github.com/graphhopper/graphhopper/blob/master/core/src/main/java/com/graphhopper/storage/BaseGraph.java shows the error.
Any idea why?

Seems like a bug as graph sorting causes the GraphHopperStorage to be rewritten into a new one with the same directory. Looks like the StringIndex ends up being the same one for the new storage which would explain the overflow.

So what does graph.do_sort do? I tried following the code but would not understand it.

When i used the graph.do_sort in previous version 0.11 i was able to remove the loop as below.


Maybe if i know what what do_sort does, i can update my custom osm file that i am creating.

Reported: https://github.com/graphhopper/graphhopper/issues/2170

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.