Skip to content

Cannot load graph on Android due to mismatching version for road_class EncodedValue #1650

Closed

Description

@karussell

See the error report here:

An error happened while creating graph:Version of EncodedValue road_class|version=1237974758|bits=5|index=0|shift=1|store_both_directions=false does not match road_class|version=-2100336611|bits=5|index=0|shift=1|store_both_directions=false. Stored 1237974758 vs. in code -2100336611

The likely reason is that we currently use hashcode as version identifier but it is not intended for that (can change in different JVMs or even different runs).

The question is why this worked in the past e.g. in BaseGraph:

edges.setHeader(2 * 4, encodingManager.hashCode());

Reproducable via

  • do import via config-example.yml
  • load with new GraphHopper().load(ghLocation) where we create the EncodingManager via EncodingManager.create(encodedValueFactory, flagEncoderFactory, ghLocation)

Update: Potential fix available at https://github.com/graphhopper/graphhopper/tree/issue_1650

Activity

  1. added this to the 0.13 milestone on Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions