Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Fatal signal 11 (SIGSEGV), code 1, fault addr 0x1b8 in tid 31104 (GLThread 8660) #12617

Closed
rahulabrol opened this issue Aug 13, 2018 · 8 comments
Labels
Android Mapbox Maps SDK for Android archived Archived because of inactivity

Comments

@rahulabrol
Copy link

here is the detail of this issue

A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x1b8 in tid 31104 (GLThread 8660)
08-13 17:30:46.522 31656-31656/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-13 17:30:46.523 31656-31656/? A/DEBUG: Build fingerprint: 'Xiaomi/santoni/santoni:7.1.2/N2G47H/V9.6.2.0.NAMMIFD:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 30641, tid: 31104, name: GLThread 8660 >>> com.trackthat.driver <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1b8
x0 336419a481375236 x1 000000000000001d x2 000000000000001d x3 0000000000000005
x4 0000000000000000 x5 0000000000000000 x6 0000007f62ffc19d x7 6e6f697461746f6e
x8 5127ab1df442edab x9 5127ab1df442edab x10 9ddfea08eb382d69 x11 b3ac55f559d8221e
x12 56760887aceb157d x13 c3a5c85c97cb3127 x14 be41013c00000000 x15 6e6f697461746f6e
x16 0000007f8f9fc440 x17 0000007f8f9a7edc x18 0000000000000000 x19 0000007f69403e60
x20 00000000000001b0 x21 0000000000000000 x22 0000007f62ffc0c0 x23 0000007f62ffc0c0
x24 00000000000001b0 x25 0000007f694054e8 x26 0000007f62ffc0d8 x27 5127ab1df442edab
x28 0000000000000001 x29 0000007f69403ce0 x30 0000007f69f2ed44
sp 0000007f69403ca0 pc 0000007f69f2ed44 pstate 0000000060000000
08-13 17:30:46.532 31656-31656/? A/DEBUG: backtrace:
#00 pc 000000000023bd44 /data/app/com.trackthat.driver-1/lib/arm64/libmapbox-gl.so
#1 pc 000000000023174c /data/app/com.trackthat.driver-1/lib/arm64/libmapbox-gl.so
#2 pc 000000000022d1b8 /data/app/com.trackthat.driver-1/lib/arm64/libmapbox-gl.so
#3 pc 000000000022d31c /data/app/com.trackthat.driver-1/lib/arm64/libmapbox-gl.so
#4 pc 00000000003a015c /data/app/com.trackthat.driver-1/lib/arm64/libmapbox-gl.so
#5 pc 0000000000223a80 /data/app/com.trackthat.driver-1/lib/arm64/libmapbox-gl.so
#6 pc 0000000000223c24 /data/app/com.trackthat.driver-1/lib/arm64/libmapbox-gl.so
#7 pc 00000000000a70b4 /data/app/com.trackthat.driver-1/lib/arm64/libmapbox-gl.so
#8 pc 00000000000a7b60 /data/app/com.trackthat.driver-1/lib/arm64/libmapbox-gl.so
08-13 17:30:46.533 31656-31656/? A/DEBUG: #9 pc 00000000000a7bb0 /data/app/com.trackthat.driver-1/lib/arm64/libmapbox-gl.so
#10 pc 00000000008572c0 /data/app/com.trackthat.driver-1/oat/arm64/base.odex (offset 0x7df000)
08-13 17:30:46.544 1522-1928/? E/LocSvc_eng: E/Calling gnss_sv_status_cb
08-13 17:30:46.821 696-1143/? E/AudioFlinger: open /proc/1734/cmdline error
08-13 17:30:47.424 1982-1982/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
isCarrierConfigEnabled bundle is null
08-13 17:30:47.485 1522-1632/? E/InputDispatcher: channel '9a95ca7 com.trackthat.driver/com.trackthat.driver.ui.activity.tripdetail.TripDetailActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
08-13 17:30:47.544 1522-1928/? E/LocSvc_eng: E/Calling gnss_sv_status_cb
08-13 17:30:48.468 31666-31666/com.trackthat.driver E/settingsrequest: Comes
08-13 17:30:48.569 1734-1734/? E/Icon: Unable to load resource 0x00000000 from pkg=com.android.systemui
android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:201)
at android.content.res.MiuiResourcesImpl.getValue(MiuiResourcesImpl.java:94)
at android.content.res.Resources.getDrawable(Resources.java:788)
at android.graphics.drawable.Icon.loadDrawableInner(Icon.java:316)
at android.graphics.drawable.Icon.loadDrawable(Icon.java:272)
at android.graphics.drawable.Icon.loadDrawableAsUser(Icon.java:380)
at com.android.systemui.statusbar.ExpandedIcon.getDrawable(ExpandedIcon.java:59)
at com.android.systemui.statusbar.StatusBarIconView.getIcon(StatusBarIconView.java:190)
at com.android.systemui.statusbar.StatusBarIconView.setIcon(StatusBarIconView.java:137)
at com.android.systemui.statusbar.StatusBarIconView.set(StatusBarIconView.java:104)
at com.android.systemui.statusbar.phone.SimpleStatusBar.updateIcon(SimpleStatusBar.java:270)
at com.android.systemui.statusbar.phone.PhoneStatusBar.updateIcon(PhoneStatusBar.java:2448)
at com.android.systemui.statusbar.CommandQueue$H.handleMessage(CommandQueue.java:474)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6228)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
08-13 17:30:48.572 1734-1734/? E/Icon: Unable to load resource 0x00000000 from pkg=com.android.systemui
android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:201)
at android.content.res.MiuiResourcesImpl.getValue(MiuiResourcesImpl.java:94)
at android.content.res.Resources.getDrawable(Resources.java:788)
at android.graphics.drawable.Icon.loadDrawableInner(Icon.java:316)
at android.graphics.drawable.Icon.loadDrawable(Icon.java:272)
at android.graphics.drawable.Icon.loadDrawableAsUser(Icon.java:380)
at com.android.systemui.statusbar.ExpandedIcon.getDrawable(ExpandedIcon.java:59)
at com.android.systemui.statusbar.StatusBarIconView.getIcon(StatusBarIconView.java:190)
at com.android.systemui.statusbar.StatusBarIconView.setIcon(StatusBarIconView.java:137)
at com.android.systemui.statusbar.StatusBarIconView.set(StatusBarIconView.java:104)
at com.android.systemui.statusbar.phone.SimpleStatusBar.updateIcon(SimpleStatusBar.java:270)
at com.android.systemui.statusbar.phone.PhoneStatusBar.updateIcon(PhoneStatusBar.java:2448)
at com.android.systemui.statusbar.CommandQueue$H.handleMessage(CommandQueue.java:474)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6228)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)

Steps to reproduce

  1. Open screen that use mapBox i am using SupportMapFragment
  2. Lock device for more that one minute without closing the app then open again.
  3. App is getting crashed.

Expected behavior

App should not crash.

Actual behavior

App is crashing if user unlock device after few minutes.

Configuration

Android versions: 7.1.2
Device models: Redmi 4
Mapbox SDK versions: 6.3.0

@fabian-guerra fabian-guerra added the Android Mapbox Maps SDK for Android label Aug 13, 2018
@tobrun
Copy link
Member

tobrun commented Aug 14, 2018

Haven't been able to reproduce this, is this crash specific to Redmi 4?

@rahulabrol
Copy link
Author

It might be device specific but I am testing it from last 2 days on Redmi 4 and getting it again and again. I really need some help.

@tobrun
Copy link
Member

tobrun commented Aug 14, 2018

Would you be able to provide a minimal reproducible example?

@dacheng81
Copy link

Hi @tobrun, I have been seeing a similar crash that results in A/libc: Fatal signal 11 (SIGSEGV), code 1, and here's what we do to reproduce this bug reliably:

We have a map with a person marker, which we draw using symbol layer. When the map is ready, we create a symbol layer and we don't remove it.

We would like to show the position and orientation of the person marker, so we set the source layer repeatedly as our location/compass sensors continuously update us. We call map.getSourceAs<GeoJsonSource>(sourceName).setGeoJson(feature). Our feature is created by calling Feature.fromGeometry and we call addNumberProperty("ROTATION", rotation).

It works great until it hits a certain limit -- I've seen the crash consistently on about 4500 setGeoJson() calls. I've also seen it crash at around 6700 calls, depending on device and other background apps, perhaps. But it's always reproducible, and it doesn't seem to be correlated to how fast we call setGeoJson. For instance, If we call it 5 times a second, it would crash after ~15 minutes. If we call it once per second, it would crash after ~75 minutes. Even destroying the map and recreating it seems to not extend the number of sets. e.g. I call setGeoJson() 2000 times then quit the screen which calls map.onStop() and map.onDestroy(), then recreate the fragment, and I get to 2500 sets and it crashes, rather than 4500.

I've also tried creating new source layer and symbol layers but the total setGeoJson seems to be fairly constant.

I've looked for ways to animate our marker but did not find anything.

For the time being we're optimizing our code to set source layer as infrequently as possible, but this only postpones the inevitable it seems.

Any help would be greatly appreciated!

@tobrun
Copy link
Member

tobrun commented Aug 29, 2018

@dacheng81 why are you creating the source object every time? This is an expensive operation and if possible should be avoided. Store that GeojsonSource as a field in your activity/fragment class and call setGeoJson on that instead.

Fwiw, https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-locationlayer applies this and we aren't having the issues that you are mentioning.

@dacheng81
Copy link

Hi @tobrun, let me see if I understand you correctly. You're saying the map.getSourceAs(sourceName) call is expensive and we should avoid it. So have a geoJsonSource = map.getSourceAs(sourceName) early on and then only call geoJsonSource.setGeoJson(feature).

If that's correct -- I just tried it with our code and no, it still crashes in the same way, after ~ 5000 setGeoJson(feature) calls. (As a side note, if feature is simply derived from FeatureCollection.fromFeatures(ArrayList()), i.e. empty, it still crashes.

I looked up plugin-locationlayer and if I'm not mistaken, this file: https://github.com/mapbox/mapbox-plugins-android/blob/master/plugin-locationlayer/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayer.java is what you were referring to? In there, refreshSource() calls getSourceAs(LOCATION_SOURCE) every single time. You're saying you don't see a crash even when it does create the source object every time? Is it possible that people who use this plugin don't end up modifying the feature too frequently and thus not refreshing the source into the thousands of times?

Thanks for your help!

@stale stale bot added the archived Archived because of inactivity label Feb 25, 2019
@stale
Copy link

stale bot commented Feb 25, 2019

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Feb 25, 2019
@subrotobasak
Copy link

add this two lines to your build.gradle in the android section
android{
//

compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }

}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android archived Archived because of inactivity
Projects
None yet
Development

No branches or pull requests

5 participants