<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-7">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Peter,<br>
    <br>
    I use the various Genymotion VMs for debugging Android apps.<br>
    These VMs have the very useful feature 'Shared folders'.<br>
    i.e. at VirtualBox VM's settings you can define a shared folder from
    host OS<br>
    and see it inside the Android environment as mounted read/write
    folder.<br>
    <br>
    This can be help a lot during testing large mapsforge maps or GH
    graphs.<br>
    They can remain at host OS disk and not needed to copy them to
    device / emulator sdcard.<br>
    With the Mapsforge map library this feature works fine.<br>
    <br>
    But when I try loading a graph that exists at this read/write
    mounted folder the following exceptions are thrown:<br>
    <br>
    Couldn't map buffer 0 of 31 at position 100 for 32505756 bytes with
    offset 100, new fileLength:32505956<br>
    java.lang.RuntimeException: Couldn't map buffer 0 of 31 at position
    100 for 32505756 bytes with offset 100, new fileLength:32505956<br>
        at
    com.graphhopper.storage.MMapDataAccess.mapIt(MMapDataAccess.java:159)<br>
        at
com.graphhopper.storage.MMapDataAccess.loadExisting(MMapDataAccess.java:241)<br>
        at
com.graphhopper.storage.GraphHopperStorage.loadExisting(GraphHopperStorage.java:1355)<br>
        at com.graphhopper.GraphHopper.load(GraphHopper.java:670)<br>
        ...<br>
    Caused by: java.io.IOException: mmap failed: EINVAL (Invalid
    argument)<br>
        at java.nio.MemoryBlock.mmap(MemoryBlock.java:119)<br>
        at java.nio.FileChannelImpl.map(FileChannelImpl.java:253)<br>
        at
com.graphhopper.storage.MMapDataAccess.newByteBuffer(MMapDataAccess.java:177)<br>
        at
    com.graphhopper.storage.MMapDataAccess.mapIt(MMapDataAccess.java:151)<br>
        ... 14 more<br>
    Caused by: libcore.io.ErrnoException: mmap failed: EINVAL (Invalid
    argument)<br>
        at libcore.io.Posix.mmap(Native Method)<br>
        at libcore.io.ForwardingOs.mmap(ForwardingOs.java:94)<br>
        at java.nio.MemoryBlock.mmap(MemoryBlock.java:116)<br>
        ... 17 more<br>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <font color="#000000">Emux</font><br>
      <a href="http://wiki.openstreetmap.org/wiki/Cruiser">Cruiser</a> -
      <a
href="http://wiki.openstreetmap.org/wiki/Atlas_%28navigation_application%29">Atlas</a></div>
  </body>
</html>