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 0x10 in tid 25592 (om.map.goong.v2) #8826

Closed
kingfisherphuoc opened this issue Apr 26, 2017 · 6 comments
Labels
Android Mapbox Maps SDK for Android needs information

Comments

@kingfisherphuoc
Copy link

Platform: Android
Mapbox SDK version: 5.0.2

Steps to trigger behavior

  1. Draw FeatureCollections in GeoJson to Map and change it many times (once per 3 seconds) as below:
mapboxMap.addSource(geoJsonSource);
mapboxMap.addLayerBelow(routeLayer, ROUTE_MAIN_LAYER_BORDER_ID);
mapboxMap.addLayerBelow(routeBorderLayer, ROUTE_SECOND_LAYER_ID);
  1. Get fatal Error:
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x10 in tid 25592 (om.map.goong.v2)
04-26 18:39:20.099 592-592/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-26 18:39:20.099 592-592/? A/DEBUG: Build fingerprint: 'samsung/on7xltezh/on7xltechn:6.0.1/MMB29M/G6100ZHU1AQC1:user/release-keys'
04-26 18:39:20.099 592-592/? A/DEBUG: Revision: '5'
04-26 18:39:20.099 592-592/? A/DEBUG: ABI: 'arm64'
04-26 18:39:20.099 592-592/? A/DEBUG: pid: 25592, tid: 25592, name: om.map.goong.v2  >>> com.map.goong.v2 <<<
04-26 18:39:20.099 592-592/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10
04-26 18:39:20.139 592-592/? A/DEBUG:     x0   0000000000000000  x1   0000007f86248de4  x2   0000000000000001  x3   0000005582a14730
04-26 18:39:20.139 592-592/? A/DEBUG:     x4   0000000000000000  x5   0000000000000001  x6   0000000000000000  x7   0000000000000000
04-26 18:39:20.139 592-592/? A/DEBUG:     x8   0000000000000000  x9   0000007f86248a70  x10  0000000000000003  x11  0000000000000400
04-26 18:39:20.139 592-592/? A/DEBUG:     x12  0000007f86248b58  x13  0000005583858d70  x14  00000055807cd000  x15  73746e696f702e73
04-26 18:39:20.139 592-592/? A/DEBUG:     x16  0000007f86241a58  x17  0000000000000000  x18  0000000000000014  x19  0000007fc90f3d28
04-26 18:39:20.139 592-592/? A/DEBUG:     x20  0000005583b06c00  x21  000000558114bb30  x22  0000000000000003  x23  0000005582a146f0
04-26 18:39:20.139 592-592/? A/DEBUG:     x24  0000005581260498  x25  0000005582a14720  x26  00000055812604a8  x27  0000000000000000
04-26 18:39:20.139 592-592/? A/DEBUG:     x28  0000000000000001  x29  0000007fc90f3c80  x30  0000007f620f8ab0
04-26 18:39:20.139 592-592/? A/DEBUG:     sp   0000007fc90f3bc0  pc   0000007f620f8804  pstate 0000000080000000
04-26 18:39:20.149 592-592/? A/DEBUG: backtrace:
04-26 18:39:20.149 592-592/? A/DEBUG:     #00 pc 00000000000e1804  /data/app/com.map.goong.v2-2/lib/arm64/libmapbox-gl.so
04-26 18:39:20.149 592-592/? A/DEBUG:     #01 pc 00000000000b6050  /data/app/com.map.goong.v2-2/lib/arm64/libmapbox-gl.so
04-26 18:39:20.149 592-592/? A/DEBUG:     #02 pc 00000000000acaa4  /data/app/com.map.goong.v2-2/lib/arm64/libmapbox-gl.so
04-26 18:39:20.149 592-592/? A/DEBUG:     #03 pc 000000000007b4f4  /data/app/com.map.goong.v2-2/lib/arm64/libmapbox-gl.so
04-26 18:39:20.149 592-592/? A/DEBUG:     #04 pc 0000000000086a54  /data/app/com.map.goong.v2-2/lib/arm64/libmapbox-gl.so
04-26 18:39:20.149 592-592/? A/DEBUG:     #05 pc 0000000000128068  /system/lib64/libart.so (art_quick_generic_jni_trampoline+152)
04-26 18:39:20.149 592-592/? A/DEBUG:     #06 pc 000000000011e424  /system/lib64/libart.so (art_quick_invoke_stub+580)
04-26 18:39:20.149 592-592/? A/DEBUG:     #07 pc 00000000001302dc  /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+176)
04-26 18:39:20.149 592-592/? A/DEBUG:     #08 pc 00000000004ceea4  /system/lib64/libart.so (artInterpreterToCompiledCodeBridge+212)
04-26 18:39:20.149 592-592/? A/DEBUG:     #09 pc 00000000002aa084  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+480)
04-26 18:39:20.149 592-592/? A/DEBUG:     #10 pc 00000000000dd780  /system/lib64/libart.so (_ZN3art11interpreter15ExecuteGotoImplILb0ELb0EEENS_6JValueEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameES2_+22320)
04-26 18:39:20.149 592-592/? A/DEBUG:     #11 pc 0000000000287e78  /system/lib64/libart.so (artInterpreterToInterpreterBridge+220)
04-26 18:39:20.149 592-592/? A/DEBUG:     #12 pc 00000000002aa084  /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+480)
04-26 18:39:20.149 592-592/? A/DEBUG:     #13 pc 00000000002ad270  /system/lib64/libart.so (_ZN3art11interpreterL8DoInvokeILNS_10InvokeTypeE2ELb0ELb0EEEbPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+268)
04-26 18:39:20.149 592-592/? A/DEBUG:     #14 pc 00000000000dd9bc  /system/lib64/libart.so (_ZN3art11interpreter15ExecuteGotoImplILb0ELb0EEENS_6JValueEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameES2_+22892)
04-26 18:39:20.149 592-592/? A/DEBUG:     #15 pc 0000000000287a80  /system/lib64/libart.so (_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameE+96)
04-26 18:39:20.149 592-592/? A/DEBUG:     #16 pc 000000000053a9b8  /system/lib64/libart.so (artQuickToInterpreterBridge+632)
04-26 18:39:20.149 592-592/? A/DEBUG:     #17 pc 00000000001281a4  /system/lib64/libart.so (art_quick_to_interpreter_bridge+100)
04-26 18:39:20.149 592-592/? A/DEBUG:     #18 pc 00000000047d4668  /system/framework/arm64/boot.oat (offset 0x3023000)
04-26 18:39:20.829 592-592/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_04

Expected behavior

Do not crash when remove and re-add new layers.

Actual behavior

Get error log as above.

@tobrun
Copy link
Member

tobrun commented Apr 26, 2017

@kingfisherphuoc instead of readding the source you can reload the content of geojson source with setUrl or setGeoJSON. An example of this can be found in here.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Apr 26, 2017
@tobrun
Copy link
Member

tobrun commented Apr 26, 2017

@kingfisherphuoc do you have a bit more information how to reproduce?

The following code snipper doesn't crash for me:

    @Override
    public void run() {
      mapboxMap.removeSource(source);
      mapboxMap.removeLayer(layer);
      mapboxMap.addSource(source);
      mapboxMap.addLayer(layer);
      handler.postDelayed(this, 3000);
    }

The following does, but with a valid java exception:

    @Override
    public void run() {
      mapboxMap.addSource(source);
      mapboxMap.addLayer(layer);
      handler.postDelayed(this, 3000);
    }
04 - 26 20: 44: 37.172 3778 - 3778 / com.mapbox.mapboxsdk.testapp E / AndroidRuntime: FATAL EXCEPTION: main
Process: com.mapbox.mapboxsdk.testapp, PID: 3778
com.mapbox.mapboxsdk.style.sources.CannotAddSourceException: Cannot add source twice
at com.mapbox.mapboxsdk.maps.NativeMapView.nativeAddSource(Native Method)
at com.mapbox.mapboxsdk.maps.NativeMapView.addSource(NativeMapView.java: 797)
at com.mapbox.mapboxsdk.maps.MapboxMap.addSource(MapboxMap.java: 409)
at com.mapbox.mapboxsdk.testapp.activity.style.RealTimeGeoJsonActivity$RefreshGeoJsonRunnable.run(RealTimeGeoJsonActivity.java: 124)
at android.os.Handler.handleCallback(Handler.java: 751)
at android.os.Handler.dispatchMessage(Handler.java: 95)
at android.os.Looper.loop(Looper.java: 154)
at android.app.ActivityThread.main(ActivityThread.java: 6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java: 776)

@kingfisherphuoc
Copy link
Author

I can solve it by changing source geoJsonSource.setGeoJson(featureCollection);. However, I got another problem when adding source and layer to the map. It takes quite a long time to add, about 2328 milliseconds for adding 850 coordinates featureCollection (geoJsonSource) to the map. Can we speed it up? I can use a new thread for adding. however, the line appears in the map too slow.

@cavarzan
Copy link

@kingfisherphuoc I got same problem here, The application freezes by adding ~50 geometries.
Sometimes I also got the SIGSEGV, it's random

@JustSayBien
Copy link

Same problem here. Updating GeoJsonSource with a geoJson-String blocks the main thread. Using a thread to invoke geoJsonSource.setGeoJson(jsonString) sometimes ends in SIGSEGV:

Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 17305 (Thread-44)

@jfirebaugh
Copy link
Contributor

It's not supported to call methods such as setGeoJson except on the main thread. Performance improvements are tracked in #8484.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android needs information
Projects
None yet
Development

No branches or pull requests

5 participants