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

[Android] Crash on start Turn-by-turn Navigation UI #387

Closed
bicho19 opened this issue Oct 17, 2017 · 4 comments
Closed

[Android] Crash on start Turn-by-turn Navigation UI #387

bicho19 opened this issue Oct 17, 2017 · 4 comments

Comments

@bicho19
Copy link

bicho19 commented Oct 17, 2017

Platform: Android 7.1.2
Mapbox SDK version: 5.2.0-beta.1@aar'

Steps to trigger behavior

  1. Create an activity with the simple turn-by-turn Navigation UI.
  2. Launch the app and press a button to start navigation activity

Expected behavior

Start turn-by-turn navigation UI

Actual behavior

Crash

I'm trying to implement a turn-by-turn navigation in my app using Mapbox sdk.

Here is the code in my MainActivity class which extends AppCompatActivity ( i am using Kotlin):

        Mapbox.getInstance(this,"pk.eVMeKk")
        val navigation: MapboxNavigation = MapboxNavigation(this, "pk.eyJ1IjP")
        val orign: Position = Position.fromLngLat(-77.03613, 38.90992)
        val destination : Position = Position.fromLngLat(-77.0365, 38.8977)
        val simulateRoute : Boolean = true
        NavigationLauncher.startNavigation(this,orign, destination,"",simulateRoute)

Here is my log:

10-17 16:16:51.841 29041-29041/? V/MapboxTelemetry: Initializing telemetry.
10-17 16:16:51.910 29041-29041/? V/MapboxTelemetry: Enabling telemetry.
10-17 16:16:51.930 29041-29041/? I/art: Thread[1,tid=29041,Native,Thread*=0x7fb0e40a00,peer=0x767de528,"main"] recursive attempt to load library "/data/app/com....driver-1/lib/arm64/libmapbox-gl.so"
10-17 16:16:51.946 29041-29041/? I/art: Thread[1,tid=29041,Native,Thread*=0x7fb0e40a00,peer=0x767de528,"main"] recursive attempt to load library "/data/app/com.....driver-1/lib/arm64/libmapbox-gl.so"
10-17 16:16:51.947 29041-29041/? I/art: Thread[1,tid=29041,Native,Thread*=0x7fb0e40a00,peer=0x767de528,"main"] recursive attempt to load library "/data/app/com....driver-1/lib/arm64/libmapbox-gl.so"
10-17 16:16:52.002 1406-9206/? I/ActivityManager: START u0 {cmp=com....driver/com.mapbox.services.android.navigation.ui.v5.NavigationView (has extras)} from uid 10213 on display 0
10-17 16:16:52.963 1406-1495/? I/ActivityManager: Displayed com....driver/com.mapbox.services.android.navigation.ui.v5.NavigationView: +910ms (total +1s227ms)
10-17 16:16:53.227 1406-1495/? I/Timeline: Timeline: Activity_windows_visible id: ActivityRecord{a6e104a u0 com....driver/com.mapbox.services.android.navigation.ui.v5.NavigationView t6747} time:50583876
10-17 16:16:53.372 29673-29673/? A/DEBUG: #4 pc 0000000000467db4 /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.372 29673-29673/? A/DEBUG: #5 pc 0000000000467edc /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.372 29673-29673/? A/DEBUG: #6 pc 0000000000465584 /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.372 29673-29673/? A/DEBUG: #7 pc 0000000000464ea0 /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.372 29673-29673/? A/DEBUG: #8 pc 00000000000999bc /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.372 29673-29673/? A/DEBUG: #9 pc 0000000000092384 /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.372 29673-29673/? A/DEBUG: #10 pc 000000000026897c /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.372 29673-29673/? A/DEBUG: #11 pc 00000000002d9db4 /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.372 29673-29673/? A/DEBUG: #12 pc 00000000002dbfd4 /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.373 29673-29673/? A/DEBUG: #13 pc 000000000013df7c /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.373 29673-29673/? A/DEBUG: #14 pc 0000000000265ac8 /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.373 29673-29673/? A/DEBUG: #15 pc 0000000000265bfc /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.373 29673-29673/? A/DEBUG: #16 pc 000000000032fe18 /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.373 29673-29673/? A/DEBUG: #17 pc 000000000032f448 /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.373 29673-29673/? A/DEBUG: #18 pc 000000000032e978 /data/app/com....driver-1/lib/arm64/libmapbox-gl.so
10-17 16:16:53.971 1406-29679/? W/ActivityManager: Force finishing activity com....driver/com.mapbox.services.android.navigation.ui.v5.NavigationView
10-17 16:16:54.081 1406-2463/? I/WindowManager: WIN DEATH: Window{fc4f27c u0 SurfaceView - com....driver/com.mapbox.services.android.navigation.ui.v5.NavigationView}
10-17 16:16:54.089 1406-2516/? I/WindowManager: WIN DEATH: Window{32341c6 u0 com.../com.mapbox.services.android.navigation.ui.v5.NavigationView}

Do you have any idea what can be wrong or what I'm missing?

@cammace
Copy link
Contributor

cammace commented Oct 18, 2017

Can you try moving Mapbox.getInstance(this,"pk.eVMeKk") into your Application class so it gets initialized before your activity view is created? It's also probably better to pass in null for the awsPoolId rather than an empty string.

cc: @tobrun

@yasirtahir
Copy link

I am facing the same issue. But I wrote Mapbox.getInstance(this,"pk.eVMeKk") into my Application class and passing null for awsPoolId. But still sometimes, on navigation UI the app crashes.

Have you solved it?

@hoangphan
Copy link

I am facing the same issue as well.

and the navigation UI ALWAYS crashes.

kindly hint if this issue is fixed?

@danesfeder
Copy link
Contributor

Should be fixed in 0.7.1 with #511, feel free to re-open if you run into this again

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

No branches or pull requests

5 participants