[GraphHopper] Call load error

Daniele Germano danielegermano77 at gmail.com
Mon Sep 1 10:00:12 UTC 2014


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/c3ddf491/attachment.html>


More information about the GraphHopper mailing list