[GraphHopper] Call load error
Daniele Germano
danielegermano77 at gmail.com
Mon Sep 1 10:35:49 UTC 2014
This is the log cat when i start the app.
09-01 12:32:45.233: I/dalvikvm(23199): Could not find method android.os.StatFs.getAvailableBytes, referenced from method org.mapsforge.map.android.util.AndroidUtil.getAvailableCacheSlots
09-01 12:32:45.233: W/dalvikvm(23199): VFY: unable to resolve virtual method 133: Landroid/os/StatFs;.getAvailableBytes ()J
09-01 12:32:45.233: D/dalvikvm(23199): VFY: replacing opcode 0x6e at 0x000b
09-01 12:32:45.233: D/TILECACHE INMEMORY SIZE(23199): 12
09-01 12:32:45.233: D/TILECACHE FILECACHE SIZE(23199): 12
09-01 12:32:45.263: D/dalvikvm(23199): GC_CONCURRENT freed 117K, 12% free 9365K/10580K, paused 2ms+3ms, total 32ms
09-01 12:32:45.293: D/libEGL(23199): loaded /vendor/lib/egl/libGLES_vc4.so
09-01 12:32:45.303: D/(23199): GPU monitor inactive - could not find libgpumonitor.so [Symbol not found: ] or not enabled (debug.egl.hw.gpumonitor = 0)
09-01 12:32:45.303: W/khrn_client(23199): init_window num_buffers 3 min undequeued buffers 1
09-01 12:32:45.303: W/khrn_client(23199): init_window window 0x4d90d408, 480x800 hintTransform 0x0 do_pre 1
09-01 12:32:45.313: D/OpenGLRenderer(23199): Enabling debug mode 0
09-01 12:32:46.104: I/brcm-gr(23199): [gralloc_lock]: new usage 0x933
About the 'log("Problem", getError()), you mean this?
private void chooseAreaFromRemote()
{
new GHAsyncTask<Void, Void, List<String>>()
{
protected List<String> saveDoInBackground( Void... params )
throws Exception
{
String[] lines = new Downloader("GraphHopper Android").
downloadAsString(fileListURL).split("\n");
List<String> res = new ArrayList<String>();
for (String str : lines)
{
int index = str.indexOf("href=\"");
if (index >= 0)
{
index += 6;
int lastIndex = str.indexOf(".ghz", index);
if (lastIndex >= 0)
res.add(prefixURL + str.substring(index, lastIndex)
+ ".ghz");
}
}
return res;
}
@Override
protected void onPostExecute( List<String> nameList )
{
if (hasError())
{
logUser("Are you connected to the internet? Problem while fetching remote area list: "
+ getErrorMessage());
return;
}
MySpinnerListener spinnerListener = new MySpinnerListener()
{
@Override
public void onSelect( String selectedArea, String selectedFile )
{
if (selectedFile == null
|| new File(mapsFolder, selectedArea + ".ghz")
.exists()
|| new File(mapsFolder, selectedArea + "-gh")
.exists())
{
downloadURL = null;
} else
{
downloadURL = selectedFile;
}
initFiles(selectedArea);
}
};
chooseArea(remoteButton, remoteSpinner, nameList,
spinnerListener);
}
}.execute();
}
Il giorno 01/set/2014, alle ore 12:29, Peter <graphhopper at gmx.de> ha scritto:
> No need to wait. Can you access the URL in your browser?
>
> Please include 'log("Problem", getError());' before this toast and report the stacktrace
>
> Peter.
>
> On 01.09.2014 12:24, Daniele Germano wrote:
>> Thanks for the help. i have change from http to https. Now when the app start, iget this toast:
>>
>> logUser("Are you connected to the internet? Problem while fetching remote area list: "
>> + getErrorMessage());
>>
>> Maybe i need to wait a while for the changes.
>>
>> Il giorno 01/set/2014, alle ore 12:21, Peter <graphhopper at gmx.de> ha scritto:
>>
>>> Should be now working without any change (using old http).
>>>
>>> HTTP support will be dropped once we release 0.4 and/or 0.3.1, so it is still wise to update the code :) (see latest commits)
>>>
>>> Regards,
>>> Peter.
>>>
>>> On 01.09.2014 12:15, Peter wrote:
>>>> Oh, the https change produced this bug. You need to adapt the map URL to https. I'll try to fix the server config too.
>>>>
>>>> You should then see a list of possible maps which you should be able to download.
>>>>
>>>> Regards,
>>>> Peter.
>>>>
>>>> On 01.09.2014 12:00, Daniele Germano wrote:
>>>>> This is the log cat error if i try to press download. It search for a null-gh folder and a null.map file
>>>>>
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334): FATAL EXCEPTION: main
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334): java.lang.IllegalArgumentException: file does not exist: /storage/emulated/0/graphhopper/maps/null-gh/null.map
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at org.mapsforge.map.layer.renderer.TileRendererLayer.setMapFile(TileRendererLayer.java:90)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at com.graphhopper.android.MainActivity.loadMap(MainActivity.java:407)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at com.graphhopper.android.MainActivity.downloadingFiles(MainActivity.java:338)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at com.graphhopper.android.MainActivity.initFiles(MainActivity.java:197)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at com.graphhopper.android.MainActivity.access$0(MainActivity.java:193)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at com.graphhopper.android.MainActivity$3$1.onSelect(MainActivity.java:283)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at com.graphhopper.android.MainActivity$4.onClick(MainActivity.java:322)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at android.view.View.performClick(View.java:4432)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at android.view.View$PerformClick.run(View.java:18338)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at android.os.Handler.handleCallback(Handler.java:725)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at android.os.Handler.dispatchMessage(Handler.java:92)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at android.os.Looper.loop(Looper.java:137)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at android.app.ActivityThread.main(ActivityThread.java:5283)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at java.lang.reflect.Method.invokeNative(Native Method)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at java.lang.reflect.Method.invoke(Method.java:511)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
>>>>> 09-01 11:59:04.001: E/AndroidRuntime(17334):
>>>>> at dalvik.system.NativeStart.main(Native Method)
>>>>>
>>>>>
>>>>> Il giorno 01/set/2014, alle ore 11:56, Peter <graphhopper at gmx.de> ha scritto:
>>>>>
>>>>>> Would you please report what the full exception trace is about? (see logs/logcat)
>>>>>>
>>>>>> Regards,
>>>>>> Peter.
>>>>>>
>>>>>> On 01.09.2014 11:53, Daniele Germano wrote:
>>>>>>> With the apk intalled, if there’s no files inside graphhopper/maps, i can’t do anything, there’s no url to download, and the app crash if i press the Download butto. Do i need some files to download a sample map?
>>>>>>> Il giorno 01/set/2014, alle ore 11:47, Peter <graphhopper at gmx.de> ha scritto:
>>>>>>>
>>>>>>>> When you install the apk and download a sample map - does this work?
>>>>>>>>
>>>>>>>> Peter.
>>>>>>>>
>>>>>>>>
>>>>>>>> On 01.09.2014 11:44, Daniele Germano wrote:
>>>>>>>>> Hello
>>>>>>>>>
>>>>>>>>> I Have created graphhopper files of paris from paris.osm. then i put paris.map in the paris-gh folder and put the folder in the graphhopper/maps folder.
>>>>>>>>> When i start the app, it load map and graphs. but it crash when i try to create route. For what i see SavedDoInBackGround is for download files, which is not my case because i already have the files.
>>>>>>>>>
>>>>>>>>> Il giorno 01/set/2014, alle ore 11:26, Peter <graphhopper at gmx.de> ha scritto:
>>>>>>>>>
>>>>>>>>>> Hi Daniele,
>>>>>>>>>>
>>>>>>>>>> hmmh, sounds more like a bug with some special circumstances with your device. Maybe it cannot access some files or disc was full etc?
>>>>>>>>>>
>>>>>>>>>> Would you check in saveDoInBackground what the result of
>>>>>>>>>> new File(mapsFolder, currentArea).getAbsolutePath()
>>>>>>>>>> is and what
>>>>>>>>>> tmpHopp.load(new File(mapsFolder, currentArea).getAbsolutePath());
>>>>>>>>>> returns?
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Peter.
>>>>>>>>>>
>>>>>>>>>> On 01.09.2014 11:13, Daniele Germano wrote:
>>>>>>>>>>> Hello
>>>>>>>>>>> I’am try to use graphhoper but i’m stuck with this problem:
>>>>>>>>>>>
>>>>>>>>>>> if i try to run the Sample or the apk (0.3), it crash. The crash happen when end route flag (red) is on the map. this is the Logcat:
>>>>>>>>>>>
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): FATAL EXCEPTION: AsyncTask #3
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): java.lang.RuntimeException: An error occured while executing doInBackground()
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at android.os.AsyncTask$3.done(AsyncTask.java:299)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at java.lang.Thread.run(Thread.java:856)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): Caused by: java.lang.IllegalStateException: Call load or importOrLoad before routing
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at com.graphhopper.GraphHopper.route(GraphHopper.java:743)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at com.graphhopper.android.MainActivity$8.doInBackground(MainActivity.java:501)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at com.graphhopper.android.MainActivity$8.doInBackground(MainActivity.java:1)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at android.os.AsyncTask$2.call(AsyncTask.java:287)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
>>>>>>>>>>> 09-01 11:10:02.051: E/AndroidRuntime(10946): ... 4 more
>>>>>>>>>>>
>>>>>>>>>>> But i see that load() already exist in the project:
>>>>>>>>>>>
>>>>>>>>>>> void loadGraphStorage()
>>>>>>>>>>> {
>>>>>>>>>>> logUser("loading graph (" + Constants.VERSION + ") ... ");
>>>>>>>>>>> new GHAsyncTask<Void, Void, Path>()
>>>>>>>>>>> {
>>>>>>>>>>> protected Path saveDoInBackground( Void... v ) throws Exception
>>>>>>>>>>> {
>>>>>>>>>>> GraphHopper tmpHopp = new GraphHopper().forMobile();
>>>>>>>>>>> tmpHopp.setCHShortcuts("fastest");
>>>>>>>>>>> tmpHopp.load(new File(mapsFolder, currentArea).getAbsolutePath());
>>>>>>>>>>> log("found graph " + tmpHopp.getGraph().toString() + ", nodes:" + tmpHopp.getGraph().getNodes());
>>>>>>>>>>> hopper = tmpHopp;
>>>>>>>>>>> return null;
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> protected void onPostExecute( Path o )
>>>>>>>>>>> {
>>>>>>>>>>> if (hasError())
>>>>>>>>>>> {
>>>>>>>>>>> logUser("An error happend while creating graph:"
>>>>>>>>>>> + getErrorMessage());
>>>>>>>>>>> } else
>>>>>>>>>>> {
>>>>>>>>>>> logUser("Finished loading graph. Press long to define where to start and end the route.");
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> finishPrepare();
>>>>>>>>>>> }
>>>>>>>>>>> }.execute();
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> How can i solve this problem?
>>>>>>>>>>>
>>>>>>>>>>> Thank you
>>>>>>
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/graphhopper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20140901/01a6a861/attachment.html>
More information about the GraphHopper
mailing list