Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo Crash #4

Closed
dimohamdy opened this issue Apr 17, 2015 · 18 comments
Closed

Demo Crash #4

dimohamdy opened this issue Apr 17, 2015 · 18 comments

Comments

@dimohamdy
Copy link
Contributor

There is exception when demo try to make route and this message apper
"graphHopperLocation is not specified. call init before"

graphHopperFolder is nil please help me

@clns
Copy link
Contributor

clns commented Apr 17, 2015

The "graphHopperLocation is not specified. call init before" error is in the GraphHopperTest.java#L397 file, which is part of the test suite and the iOS project doesn't call that.

  • At what point do you get this error?
  • What method are you following to get started, the main instructions or the sample app?
  • If possible, please provide a stack trace with the error.

@dimohamdy
Copy link
Contributor Author

When i run the sample App
in this method [_hopper load__WithNSString:location];

  • (jboolean)load__WithNSString:(NSString *)graphHopperFolder ;

and the stack trace

  • thread Pod file #7: tid = 0x3e35c, 0x017aca6b libobjc.A.dylibobjc_exception_throw, name = 'main', queue = 'com.apple.root.default-qos', stop reason = breakpoint 1.1 frame #0: 0x017aca6b libobjc.A.dylibobjc_exception_throw
    • frame Make tests running #1: 0x000fe917 graphhopper-ios-sample-[GraphHopper load__WithNSString:](self=0x7f8570d0, _cmd=0x005eea2e, graphHopperFolder=0x00000000) + 151 at GraphHopper.m:528 frame #2: 0x000d5be7 graphhopper-ios-sample-[Directions hopper](self=0x7a7e8e40, _cmd=0x005eea8b) + 599 at Directions.m:85
      frame RoboVM as alternative #3: 0x000d638d graphhopper-ios-sample__19-[Directions route]_block_invoke(.block_descriptor=<unavailable>) + 829 at Directions.m:109 frame #4: 0x032f230a libdispatch.dylib_dispatch_call_block_and_release + 15
      frame Fat Static library #5: 0x03312e2f libdispatch.dylib_dispatch_client_callout + 14 frame #6: 0x032fb10f libdispatch.dylib_dispatch_root_queue_drain + 634
      frame Pod file #7: 0x032fc84a libdispatch.dylib_dispatch_worker_thread3 + 115 frame #8: 0x0366e1da libsystem_pthread.dylib_pthread_wqthread + 724
      frame fix bug of archive #9: 0x0366be2e libsystem_pthread.dylib`start_wqthread + 30

@clns
Copy link
Contributor

clns commented Apr 20, 2015

This looks like a graph data import issue. If you imported the data as described in the sample app, make sure you have all the Requirements, especially Maven. Check if the import succeeded by running ls -l graphhopper/graph-data.osm-gh/ in the repository root, which should show something like this:

$ ls -l graphhopper/graph-data.osm-gh/
total 204912
-rw-r--r--  1 calin  staff    50M Apr 20 20:57 edges
-rw-r--r--  1 calin  staff    26M Apr 20 20:57 geometry
-rw-r--r--  1 calin  staff    12M Apr 20 20:56 location_index
-rw-r--r--  1 calin  staff   2.0M Apr 20 20:57 names
-rw-r--r--  1 calin  staff    10M Apr 20 20:57 nodes
-rw-r--r--  1 calin  staff    32K Apr 20 20:57 properties

If you don't have this then most probably your import failed and you need to reimport the data.

If everything checks out, try running everything again, from scratch. Below is the sequence of commands I just ran successfully on my local machine. They are exactly like in the docs but I wrote them here for convenience. Watch out for any errors.

$ git clone --recursive https://github.com/graphhopper/graphhopper-ios.git
$ cd graphhopper-ios
$ ./graphhopper-ios-sample/import-sample.sh
$ curl -L -o j2objc-0.9.6.1.zip "https://github.com/google/j2objc/releases/download/0.9.6.1/j2objc-0.9.6.1.zip" && unzip j2objc-0.9.6.1.zip && mv j2objc-0.9.6.1 j2objc && rm j2objc-0.9.6.1.zip
$ open graphhopper-ios-sample/graphhopper-ios-sample.xcodeproj
# in Xcode, Build & Run on Simulator

@dimohamdy
Copy link
Contributor Author

graph-data.osm-gh my file is graph-data.osm.pbf

@clns
Copy link
Contributor

clns commented Apr 21, 2015

graph-data.osm.pbf is the raw data file from http://download.geofabrik.de/ and if you don't have the other files it means you didn't import the data into GraphHopper. Try running the import again using ./graphhopper-ios-sample/import-sample.sh and then check if the import succeeded as described above.

@dimohamdy
Copy link
Contributor Author

i have graph-data.osm.pbf how i can make it as graph-data.osm-gh

@clns
Copy link
Contributor

clns commented Apr 21, 2015

By running ./graphhopper-ios-sample/import-sample.sh.

@dimohamdy
Copy link
Contributor Author

when i run it

Downloading http://download.geofabrik.de/europe/romania-latest.osm.pbf

@clns
Copy link
Contributor

clns commented Apr 21, 2015

If the download starts it means you don't have it in the right place. However that's fine, after the download finishes the graph data will be created automatically and you can start playing with it in Xcode. There are instructions for importing Germany as well in the sample app.

@dimohamdy
Copy link
Contributor Author

in xcode i will import romania-latest.osm.pbf file?

@clns
Copy link
Contributor

clns commented Apr 21, 2015

Yes, by default the import script imports romania-latest.osm.pbf, so you can only create routes within Romania. This is just an example, you can follow the instructions on the sample app to import any country you want.

@dimohamdy
Copy link
Contributor Author

i found the problem in marven ,did it take time when convert
Thanks

@dimohamdy
Copy link
Contributor Author

i still have problem but from marven Now

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] GraphHopper ........................................ FAILURE [03:54 min]
[INFO] GraphHopper Tools .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:36 min
[INFO] Finished at: 2015-04-21T22:59:56+02:00
[INFO] Final Memory: 15M/244M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project graphhopper: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7, org.apache.maven:maven-error-diagnostics:jar:2.0.6: Could not transfer artifact org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-7 from/to central (https://repo.maven.apache.org/maven2): Remote host closed connection during handshake: SSL peer shut down incorrectly -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

@clns
Copy link
Contributor

clns commented Apr 21, 2015

I'm not familiar with Maven, it is used by GraphHopper as its build system. Try google-ing the errors to see if you can find something useful. This popped up on a very quick search, not sure if it will be of any help.

As this error is not related to graphhopper-ios but core graphhopper maybe @karussell would know why Maven is complaining.

@dimohamdy
Copy link
Contributor Author

thanks Again I try in it

@karussell
Copy link
Member

It looks, like some HTTPS/host problems with maven central. Maybe you just try it again? If that does not help try what was suggested in @clns its link: rm -rf <home>/.m2/repository or even rm -rf <home>/.m2/

@karussell
Copy link
Member

How was this fixed? @dimohamdy

@dimohamdy
Copy link
Contributor Author

I install Maven that use to convert graph-data.osm.pbf to graph-data.osm-gh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants