mapbox / mapbox/mapbox-navigation-android

Uncaught exception of type std::runtime_error: AttachCurrentThread() failed

Open
#3,588 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

archived bug
Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

When testing `master` run into the following Maps native crash 💥

```
09-23 12:43:45.252 23745-23745/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-23 12:43:45.252 23745-23745/? A/DEBUG: Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/M4B30Z/3437181:user/release-keys'
09-23 12:43:45.252 23745-23745/? A/DEBUG: Revision: '11'
09-23 12:43:45.252 23745-23745/? A/DEBUG: ABI: 'arm'
09-23 12:43:45.252 23745-23745/? A/DEBUG: pid: 1019, tid: 10281, name: Worker 1 >>> com.mapbox.navigation.examples <<<
09-23 12:43:45.252 23745-23745/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
09-23 12:43:45.258 9689-10122/? I/BugleRcsEngine: [39738] aaqz.a: Using config server URL from znv
09-23 12:43:45.269 9689-10122/? I/BugleRcsEngine: [39738] aapp.d: RCS Configuration storage in Bugle is disabled by p/h flag, using ProvisioningEngineStateCacheUtil.getProvisioningConfigurationForGivenSim()
09-23 12:43:45.298 9689-10122/? I/BugleRcsEngine: [39738] aapp.d: RCS Configuration storage in Bugle is disabled by p/h flag, using ProvisioningEngineStateCacheUtil.getProvisioningConfigurationForGivenSim()
09-23 12:43:45.348 9689-10122/? I/BugleRcsEngine: [39738] abgl.c: Checking if using CarrierServices.apk is possible. Enabled: true, isAtLeastM: true, runningInsideBugle: true
09-23 12:43:45.361 9689-10122/? W/BugleRcsEngine: [39738] abgl.d: Carrier Services Apk was not found.
09-23 12:43:45.379 9689-10122/? I/BugleRcsEngine: [39738] abgl.a: Cannot get service version because CS.apk was not found, not pre-loaded or disabled.
09-23 12:43:45.399 4391-4531/? I/NearbyDiscovery: Show notifications: 0 total, no changes since last shown, no-op. [CONTEXT service_id=49 ]
09-23 12:43:45.418 9689-10122/? W/BugleRcsEngine: [39738] abgl.a: Service with meta data key: JibeServiceApiVersions is not compatible. Service Version 1 is not supported. Supported versions: []
09-23 12:43:45.436 9689-10122/? I/BugleRcsEngine: [39738] zhy.onCsLibPhenotypeUpdated: BindingManager: binding and reset P/H Flag stay same
09-23 12:43:45.454 9689-10122/? I/BugleRcsEngine: [39738] aanw.a: RcsAvailabilityManager: Rcs Availability still CARRIER_SETUP_PENDING (Carrier RCS is not set up)
09-23 12:43:45.558 23745-23745/? A/DEBUG: Abort message: '/usr/local/google/buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:72: abort_message: assertion "terminating with uncaught exception of type std::runtime_error: AttachCurrentThread() failed" failed'
09-23 12:43:45.558 23745-23745/? A/DEBUG: r0 00000000 r1 00002829 r2 00000006 r3 7f0ec978
09-23 12:43:45.558 23745-23745/? A/DEBUG: r4 7f0ec980 r5 7f0ec930 r6 00000018 r7 0000010c
09-23 12:43:45.558 23745-23745/? A/DEBUG: r8 9f6f387d r9 b6d65ec0 sl 7efee000 fp 9f5f36dd
09-23 12:43:45.558 23745-23745/? A/DEBUG: ip 00000006 sp 7f0ec330 lr b6d2bb61 pc b6d2df50 cpsr 40070010
09-23 12:43:45.587 23745-23745/? A/DEBUG: backtrace:
09-23 12:43:45.587 23745-23745/? A/DEBUG: #00 pc 00041f50 /system/lib/libc.so (tgkill+12)
09-23 12:43:45.588 23745-23745/? A/DEBUG: #01 pc 0003fb5d /system/lib/libc.so (pthread_kill+32)
09-23 12:43:45.588 23745-23745/? A/DEBUG: #02 pc 0001c30f /system/lib/libc.so (raise+10)
09-23 12:43:45.588 23745-23745/? A/DEBUG: #03 pc 000194c1 /system/lib/libc.so (__libc_android_abort+34)
09-23 12:43:45.588 23745-23745/? A/DEBUG: #04 pc 000174ac /system/lib/libc.so (abort+4)
09-23 12:43:45.588 23745-23745/? A/DEBUG: #05 pc 0001af23 /system/lib/libc.so (__libc_fatal+16)
09-23 12:43:45.588 23745-23745/? A/DEBUG: #06 pc 00019549 /system/lib/libc.so (__assert2+20)
09-23 12:43:45.588 23745-23745/? A/DEBUG: #07 pc 0027d92b /data/app/com.mapbox.navigation.examples-1/lib/arm/libmapbox-gl.so
09-23 12:43:45.589 23745-23745/? A/DEBUG: #08 pc 0027da2d /data/app/com.mapbox.navigation.examples-1/lib/arm/libmapbox-gl.so
09-23 12:43:45.589 23745-23745/? A/DEBUG: #09 pc 0027c17d /data/app/com.mapbox.navigation.examples-1/lib/arm/libmapbox-gl.so
09-23 12:43:45.589 23745-23745/? A/DEBUG: #10 pc 0027ba2b /data/app/com.mapbox.navigation.examples-1/lib/arm/libmapbox-gl.so
09-23 12:43:45.589 23745-23745/? A/DEBUG: #11 pc 0027b9f3 /data/app/com.mapbox.navigation.examples-1/lib/arm/libmapbox-gl.so (__cxa_throw+74)
09-23 12:43:45.589 23745-23745/? A/DEBUG: #12 pc 0018fde1 /data/app/com.mapbox.navigation.examples-1/lib/arm/libmapbox-gl.so
09-23 12:43:45.589 23745-23745/? A/DEBUG: #13 pc 00191a2d /data/app/com.mapbox.navigation.examples-1/lib/arm/libmapbox-gl.so
09-23 12:43:45.589 23745-23745/? A/DEBUG: #14 pc 0017d785 /data/app/com.mapbox.navigation.examples-1/lib/arm/libmapbox-gl.so
09-23 12:43:45.589 23745-23745/? A/DEBUG: #15 pc 0003f45f /system/lib/libc.so (_ZL15__pthread_startPv+30)
09-23 12:43:45.590 23745-23745/? A/DEBUG: #16 pc 00019b43 /system/lib/libc.so (__start_thread+6)
```

The crash happened suddenly when testing `SimpleMapboxNavigationKt` in _Active Guidance_ without moving (sitting at the same original location mocked by `Mock Locations`).

It seems a regression after merging https://github.com/mapbox/mapbox-navigation-android/pull/3586 which brings the shared HTTP Service from Common and NN.

cc @LukasPaczos @SiarheiFedartsou @mskurydin @mapbox/maps-android

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the shared HTTP Service brought in from Common and NN by pull request #3586, then reproduce the crash in SimpleMapboxNavigationKt during Active Guidance while stationary with Mock Locations. Use the AttachCurrentThread() failure and native backtrace to trace the regression; done means the stationary scenario no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.