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

foot with turn restrictions leads to NPE for CH preparation #2916

Open
karussell opened this issue Dec 16, 2023 · 0 comments
Open

foot with turn restrictions leads to NPE for CH preparation #2916

karussell opened this issue Dec 16, 2023 · 0 comments
Labels

Comments

@karussell
Copy link
Member

karussell commented Dec 16, 2023

Did a planet-wide import with 8.0, foot and turn restrictions and this leads to:

Caused by: java.lang.NullPointerException: Cannot read field "prepareEdge" because "edgeTo.parent" is null
        at com.graphhopper.routing.ch.EdgeBasedNodeContractor.addShortcutsToPrepareGraph(EdgeBasedNodeContractor.java:304)
        at com.graphhopper.routing.ch.EdgeBasedNodeContractor.addShortcutsToPrepareGraph(EdgeBasedNodeContractor.java:307)
        at com.graphhopper.routing.ch.EdgeBasedNodeContractor.addShortcutsToPrepareGraph(EdgeBasedNodeContractor.java:307)
        at com.graphhopper.routing.ch.EdgeBasedNodeContractor.findAndHandlePrepareShortcuts(EdgeBasedNodeContractor.java:224)
        at com.graphhopper.routing.ch.EdgeBasedNodeContractor.contractNode(EdgeBasedNodeContractor.java:143)
        at com.graphhopper.routing.ch.PrepareContractionHierarchies.contractNode(PrepareContractionHierarchies.java:354)
        at com.graphhopper.routing.ch.PrepareContractionHierarchies.contractNodesUsingHeuristicNodeOrdering(PrepareContractionHierarchies.java:285)
        at com.graphhopper.routing.ch.PrepareContractionHierarchies.runGraphContraction(PrepareContractionHierarchies.java:163)
        at com.graphhopper.routing.ch.PrepareContractionHierarchies.doWork(PrepareContractionHierarchies.java:133)

(foot with turn restriction might look nonsensical at the first look but curbside might be interesting)

after several hours of CH preparation:

2023-12-15 01:00:56.266 [foot] INFO  c.g.r.c.PrepareContractionHierarchies - edge, nodes: 370,124,857, shortcuts:          0, updates:  0, checked-nodes:          0, t(total): 3584.44,  t(period): 3251.41, t(lazy):   0.00, t(neighbor):   0.00, t(contr):   0.00, t(other) : 333.02, dijkstra-ratio:  45.44%, degree_approx: 1.3, priority   : time: 3189.68s, nodes: 350,952,257, trees: 1,552,461,849, searches:   6,610,614,793, capped: 4,156,515,492 (62.88%), polled: avg   5.2 max      6, explored: avg  11.2 max    180, updated: avg   0.0 max    283, contraction: time:    0.00s, nodes:          0, trees:            0, searches:               0, capped:            0 (  NaN%), polled: avg NaN max      0, explored: avg NaN max      0, updated: avg NaN max      0, totalMB:156374, usedMB:116501
...
2023-12-15 19:28:59.464 [foot] INFO  c.g.r.c.PrepareContractionHierarchies - edge, nodes: 24,623,911, shortcuts: 1,153,441,847, updates:  0, checked-nodes: 444,149,832, t(total): 70067.63,  t(period): 3251.41, t(lazy): 15359.44, t(neighbor): 33873.68, t(contr): 17078.82, t(other) : 504.28, dijkstra-ratio:  66.95%, degree_approx: 6.2, priority   : time: 51993.98s, nodes: 1,148,440,623, trees: 8,099,636,315, searches:  74,234,426,796, capped: 25,540,019,909 (34.40%), polled: avg  13.0 max     74, explored: avg  31.1 max    214, updated: avg   2.8 max    685, contraction: time: 17064.84s, nodes: 345,500,946, trees: 1,719,077,983, searches:  13,315,667,557, capped:   13,244,000 ( 0.10%), polled: avg  26.9 max   2393, explored: avg  47.4 max   2665, updated: avg   5.2 max  10448, totalMB:203788, usedMB:188303

config:

graphhopper:

  # OpenStreetMap input file PBF or XML, can be changed via command line -Ddw.graphhopper.datareader.file=some.pbf
  datareader.file: ""
  # Local folder used by graphhopper to store its data
  graph.location: graph-cache


  profiles:
    - name: foot
      vehicle: foot
      turn_costs: true
      custom_model:
        distance_influence: 70

  profiles_ch:
    - profile: foot

  profiles_lm: []

  prepare.min_network_size: 200
  prepare.subnetworks.threads: 1

  # You can limit the max distance between two consecutive waypoints of flexible routing requests to be less or equal
  # the given distance in meter. Default is set to 1000km.
  routing.non_ch.max_waypoint_distance: 1000000

  import.osm.ignored_highways: '' # typically useful for motorized-only routing

  graph.dataaccess.default_type: RAM_STORE
@karussell karussell added the bug label Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant