<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">There is not enough memory to do the
rehash of the internally used HashMap. It could be that the Dalvik
is not releasing it fast enough (which could be slightly
workarounded via reusing the datastructures of Dijkstra).<br>
<br>
Are you using CH? And can you log or find out somehow the
visitedNodes of the dijkstra algorithm?
dijkstraBidirectionRef.getVisitedNodes()<br>
<br>
Regards,<br>
Peter.<br>
<br>
</div>
<blockquote
cite="mid:CALKz0Uks2LhsNsW__xxn_j0QdOwC97irAn4g6J2dtpWEEG8ROA@mail.gmail.com"
type="cite">
<div dir="ltr">I'm calculating several paths between a few points
of interest, i think i'm having problems with leaking memory or
somthing
<div>With the log, can you see if some problem with the gh? or
if its some problem with my proj</div>
<div><br>
</div>
<div>
<div>12-20 11:03:24.669: E/dalvikvm-heap(10791): Out of memory
on a 7830620-byte allocation.</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): "AsyncTask #3"
prio=5 tid=15 RUNNABLE</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): | group="main"
sCount=0 dsCount=0 obj=0x40774ff0 self=0x3ddfd8</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): | sysTid=10921
nice=10 sched=3/0 cgrp=default handle=3422784</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): | schedstat=(
34916079000 976208000 2523 )</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
gnu.trove.map.hash.TIntObjectHashMap.rehash(TIntObjectHashMap.java:~157)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
gnu.trove.impl.hash.THash.postInsertHook(THash.java:388)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
gnu.trove.map.hash.TIntObjectHashMap.doPut(TIntObjectHashMap.java:248)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
gnu.trove.map.hash.TIntObjectHashMap.put(TIntObjectHashMap.java:222)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
com.graphhopper.routing.DijkstraBidirectionRef.fillEdges(DijkstraBidirectionRef.java:160)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
com.graphhopper.routing.DijkstraBidirectionRef.fillEdgesFrom(DijkstraBidirectionRef.java:200)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
com.graphhopper.routing.DijkstraBidirectionRef.calcPath(DijkstraBidirectionRef.java:106)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
com.graphhopper.GraphHopper.route(GraphHopper.java:615)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
com.graphhopper.android.MainActivity$9.doInBackground(MainActivity.java:618)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
com.graphhopper.android.MainActivity$9.doInBackground(MainActivity.java:1)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
android.os.AsyncTask$2.call(AsyncTask.java:185)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
java.util.concurrent.FutureTask.run(FutureTask.java:138)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)</div>
<div>12-20 11:03:24.669: I/dalvikvm(10791): at
java.lang.Thread.run(Thread.java:1019)</div>
<div>12-20 11:03:24.669: W/dalvikvm(10791): threadid=15:
thread exiting with uncaught exception (group=0x4001d560)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): FATAL
EXCEPTION: AsyncTask #3</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791):
java.lang.RuntimeException: An error occured while executing
doInBackground()</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
android.os.AsyncTask$3.done(AsyncTask.java:200)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
java.util.concurrent.FutureTask.setException(FutureTask.java:125)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
java.util.concurrent.FutureTask.run(FutureTask.java:138)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
java.lang.Thread.run(Thread.java:1019)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): Caused by:
java.lang.OutOfMemoryError</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
gnu.trove.map.hash.TIntObjectHashMap.rehash(TIntObjectHashMap.java:157)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
gnu.trove.impl.hash.THash.postInsertHook(THash.java:388)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
gnu.trove.map.hash.TIntObjectHashMap.doPut(TIntObjectHashMap.java:248)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
gnu.trove.map.hash.TIntObjectHashMap.put(TIntObjectHashMap.java:222)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.routing.DijkstraBidirectionRef.fillEdges(DijkstraBidirectionRef.java:160)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.routing.DijkstraBidirectionRef.fillEdgesFrom(DijkstraBidirectionRef.java:200)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.routing.DijkstraBidirectionRef.calcPath(DijkstraBidirectionRef.java:106)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.GraphHopper.route(GraphHopper.java:615)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.android.MainActivity$9.doInBackground(MainActivity.java:618)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.android.MainActivity$9.doInBackground(MainActivity.java:1)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
android.os.AsyncTask$2.call(AsyncTask.java:185)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)</div>
<div>12-20 11:03:24.679: E/AndroidRuntime(10791): <span
class="" style="white-space:pre"> </span>... 4 more</div>
<div>12-20 11:03:33.827: D/dalvikvm(10791): GC_EXPLICIT freed
26435K, 89% free 3654K/32519K, external 4397K/5491K, paused
147ms</div>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Dec 17, 2013 at 10:47 PM, Ignas
Kapočius <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:kapocius.ignas@gmail.com" target="_blank">kapocius.ignas@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>What a fool of me - I somehow managed to mistaken
folders while copying them and there were
edges/geometry/etc files on my android device.</div>
<div><br>
</div>
<div>Sorry for all this spam and thank you for your help
again!</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div>----------------------</div>
<div><br>
</div>
<div>Ignas Kapočius</div>
<div><br>
</div>
</div>
<br>
<br>
<div class="gmail_quote">2013/12/17 Peter K <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:peathal@yahoo.de" target="_blank">peathal@yahoo.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div class="h5">
<div bgcolor="#FFFFFF" text="#000000">
<div> without a log file or more info of how
your code looks like we probably won't be able
to help you :)<br>
<br>
Regards,<br>
Peter.<br>
<br>
</div>
<div>
<div>
<blockquote type="cite">
<div dir="ltr">I'll look into that, thank
you!
<div><br>
</div>
<div>What about extracting routing data
for a specific city? </div>
<div>I've tried using bbike <a
moz-do-not-send="true"
href="http://download.bbbike.org/osm/"
target="_blank">http://download.bbbike.org/osm/</a>
, extracted this: <a
moz-do-not-send="true"
href="http://download.bbbike.org/osm/extract/planet_25.1591,54.6528_25.3957,54.752.osm.pbf"
style="font-size:13px;font-family:arial,sans-serif" target="_blank">http://download.bbbike.org/osm/extract/planet_25.1591,54.6528_25.3957,54.752.osm.pbf</a> (Vilnius
city, Lithuania) and executed
./graphopper.sh import
vilnius-city-latest.osm.pmf</div>
<div><br>
</div>
<div>Then I've downloaded Lithuania map
from here <a moz-do-not-send="true"
href="http://download.mapsforge.org/maps/europe/"
target="_blank">http://download.mapsforge.org/maps/europe/</a>
, created folder
vilnius-city-latest-gh and pasted it
into Android file system. </div>
<div><br>
</div>
<div>When I run app it displays a map
but when I try calculate distance
between two points (with your methods)
app crashes. </div>
<div><br>
</div>
<div>Then i've tested it with australia
map and it's routing data and it
works. So I'm guessing I have some
problems with routing data that I've
got from bbbike and I've no idea how
else to extract correct routing data. </div>
<div><br>
</div>
<div> </div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div>----------------------</div>
<div><br>
</div>
<div>Ignas Kapočius</div>
<div><br>
</div>
</div>
<br>
<br>
<div class="gmail_quote">2013/12/17
Peter K <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:peathal@yahoo.de"
target="_blank">peathal@yahoo.de</a>></span><br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div bgcolor="#FFFFFF"
text="#000000">
<div>Hi Ignas,<br>
<br>
have a look into the android/
folder. There you see how it
work. And you can set the
algorithm in the GHRequest
object. If contraction hierarchy
is enabled only bidirectional
algorithms will work. The
GHResponse contains all the
necessary information like
points and instructions.<br>
<br>
<div>
<div>> Should I first make
some kind of subgraph (due
to efficiency)?<br>
<br>
</div>
There are several techniques
to make it faster like CH, but
you could also use more
heuristical routing
algorithms, sorting the graph,
in-memory instead memory
mapped etc<br>
</div>
<br>
Regards,<br>
Peter.<br>
<br>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">Hello,
<div><br>
</div>
<div>I've got Graphhopper
going on my Android
device. </div>
<div><br>
</div>
<div>Now my goal is to
select two points on the
map, apply one of the
algorithms (Dijksta, A*,
etc) and display results
with an overlay. </div>
<div><br>
</div>
<div>Due to lack of
documentation &
being a little bit in a
hurry, could somebody
point me where/how to
start? </div>
<div><br>
</div>
<div>I understand the
basics - getting point's
coordinates, displaying
an overlay with results.
The part where I'm
confused is how to apply
search algorithms in
Graphhopper? </div>
<div><br>
</div>
<div>Should I first make
some kind of subgraph
(due to efficiency)? </div>
<div>How can I get all the
points (on streets,
i.e.) between those two
points?</div>
<div>Is there something
like getStreet(point1,
point2) that gives you
back most likely street
between your two
points? </div>
<div><br>
</div>
<div>Pardon my naivety,
but I'm new to mapping,
routing, etc & my BA
thesis' handing in
deadline is coming
really fast. ;) any help
appreciated!<br
clear="all">
<div>
<div>----------------------</div>
<div><br>
</div>
<div>Ignas Kapočius</div>
<div><br>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</div>
</div>
</div>
<br>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>