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

[Android] crash with SIGABRT in release builds #8432

Closed
dbrant opened this issue Mar 15, 2017 · 7 comments
Closed

[Android] crash with SIGABRT in release builds #8432

dbrant opened this issue Mar 15, 2017 · 7 comments
Assignees
Labels
Android Mapbox Maps SDK for Android

Comments

@dbrant
Copy link

dbrant commented Mar 15, 2017

Platform: Android
Mapbox SDK version: 5.0.0.beta3

Steps to trigger behavior

  1. Build the app as "release" flavor (minifyEnabled = true).
  2. Use MapView as intended.

Logcat

03-15 17:29:30.396 5852-5852/? E/libc++abi: terminating with uncaught exception of type jni::PendingJavaException
03-15 17:29:30.396 5852-5852/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 5852 (wikipedia.alpha)
03-15 17:29:30.456 983-983/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-15 17:29:30.456 983-983/? A/DEBUG: Build fingerprint: 'Verizon/heroqltevzw/heroqltevzw:6.0.1/MMB29M/G930VVRU4API3:user/release-keys'
03-15 17:29:30.456 983-983/? A/DEBUG: Revision: '14'
03-15 17:29:30.456 983-983/? A/DEBUG: ABI: 'arm64'
03-15 17:29:30.456 983-983/? A/DEBUG: pid: 5852, tid: 5852, name: wikipedia.alpha >>> org.wikipedia.alpha <<<
03-15 17:29:30.456 983-983/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
03-15 17:29:30.496 983-983/? A/DEBUG: x0 0000000000000000 x1 00000000000016dc x2 0000000000000006 x3 0000000000000000
03-15 17:29:30.496 983-983/? A/DEBUG: x4 0000000000000000 x5 0000000000000001 x6 0000000000000000 x7 0000000000000000
03-15 17:29:30.496 983-983/? A/DEBUG: x8 0000000000000083 x9 fefeff6d6e68736f x10 7f7f7f7f7f7f7f7f x11 0101010101010101
03-15 17:29:30.496 983-983/? A/DEBUG: x12 0000000000000028 x13 0000000000000000 x14 0000000000000045 x15 0000007faf875888
03-15 17:29:30.496 983-983/? A/DEBUG: x16 0000007faf86f568 x17 0000007faf80142c x18 00000000ffffffe0 x19 0000007fafc91290
03-15 17:29:30.496 983-983/? A/DEBUG: x20 0000007fafc911d0 x21 0000000000000002 x22 0000000000000006 x23 00000000ffffffc8
03-15 17:29:30.496 983-983/? A/DEBUG: x24 0000007fc907e760 x25 0000007fc907e630 x26 0000007fc907e670 x27 000000000020001d
03-15 17:29:30.496 983-983/? A/DEBUG: x28 0000007f9007c2cc x29 0000007fc907e4f0 x30 0000007faf7febc8
03-15 17:29:30.496 983-983/? A/DEBUG: sp 0000007fc907e4f0 pc 0000007faf801434 pstate 0000000020000000
03-15 17:29:30.506 983-983/? A/DEBUG: backtrace:
03-15 17:29:30.506 983-983/? A/DEBUG: #00 pc 0000000000069434 /system/lib64/libc.so (tgkill+8)
03-15 17:29:30.506 983-983/? A/DEBUG: #1 pc 0000000000066bc4 /system/lib64/libc.so (pthread_kill+68)
03-15 17:29:30.506 983-983/? A/DEBUG: #2 pc 0000000000023a28 /system/lib64/libc.so (raise+28)
03-15 17:29:30.506 983-983/? A/DEBUG: #3 pc 000000000001e358 /system/lib64/libc.so (abort+60)
03-15 17:29:30.506 983-983/? A/DEBUG: #4 pc 0000000000437f38 /data/app/org.wikipedia.alpha-1/lib/arm64/libmapbox-gl.so
03-15 17:29:30.506 983-983/? A/DEBUG: #5 pc 0000000000438060 /data/app/org.wikipedia.alpha-1/lib/arm64/libmapbox-gl.so
03-15 17:29:30.506 983-983/? A/DEBUG: #6 pc 0000000000435988 /data/app/org.wikipedia.alpha-1/lib/arm64/libmapbox-gl.so
03-15 17:29:30.506 983-983/? A/DEBUG: #7 pc 00000000004351b0 /data/app/org.wikipedia.alpha-1/lib/arm64/libmapbox-gl.so (__cxa_throw+204)
03-15 17:29:30.506 983-983/? A/DEBUG: #8 pc 000000000006cd6c /data/app/org.wikipedia.alpha-1/lib/arm64/libmapbox-gl.so
03-15 17:29:30.506 983-983/? A/DEBUG: #9 pc 00000000000af7a4 /data/app/org.wikipedia.alpha-1/lib/arm64/libmapbox-gl.so
03-15 17:29:30.506 983-983/? A/DEBUG: #10 pc 00000000000af6dc /data/app/org.wikipedia.alpha-1/lib/arm64/libmapbox-gl.so
03-15 17:29:30.506 983-983/? A/DEBUG: #11 pc 000000000006555c /data/app/org.wikipedia.alpha-1/lib/arm64/libmapbox-gl.so
03-15 17:29:30.506 983-983/? A/DEBUG: #12 pc 00000000000652d4 /data/app/org.wikipedia.alpha-1/lib/arm64/libmapbox-gl.so (JNI_OnLoad+8)
03-15 17:29:30.506 983-983/? A/DEBUG: #13 pc 000000000030fefc /system/lib64/libart.so (ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP8_jobjectPS9+1596)
03-15 17:29:30.506 983-983/? A/DEBUG: #14 pc 00000000003af3a4 /system/lib64/libart.so (ZN3artL18Runtime_nativeLoadEP7_JNIEnvP7_jclassP8_jstringP8_jobjectS5+296)
03-15 17:29:30.506 983-983/? A/DEBUG: #15 pc 000000000324ab6c /system/framework/arm64/boot.oat (offset 0x2f5a000)

@tobrun
Copy link
Member

tobrun commented Mar 16, 2017

@dbrant thank you for reaching out and reporting this proguard issue.
Adding this to the 5.0.0 milestone to look into before the 5.0.0 release.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Mar 16, 2017
@tobrun tobrun added this to the android-v5.0.0 milestone Mar 16, 2017
@tobrun tobrun self-assigned this Mar 16, 2017
@tobrun
Copy link
Member

tobrun commented Mar 16, 2017

You can workaround this issue for now by including:

-keep class com.mapbox.mapboxsdk.style.functions.** { *; }
-keep class com.mapbox.mapboxsdk.storage.** { *; }

in your proguard configuration.

@dbrant
Copy link
Author

dbrant commented Mar 16, 2017

Thanks! The workaround works.

@tobrun
Copy link
Member

tobrun commented Mar 16, 2017

Landed on release branch with #8437

@tobrun tobrun closed this as completed Mar 16, 2017
wmfgerrit pushed a commit to wikimedia/apps-android-wikipedia that referenced this issue Mar 16, 2017
This adds a workaround to our ProGuard rules to prevent a SIGABRT crash
from the Mapbox library.
mapbox/mapbox-gl-native#8432

Please remove when Mapbox updates its own ProGuard configuration.

This also removes an unused ProGuard rule, since we're no longer using the
PhotoView component.

Bug: T160587
Change-Id: I63f297fcc60394df68e53335946c735c3a4fc19c
@HovsepShhakaryan
Copy link

Hello
I using Mapbox on android, when I don't touch device 5 to 10 minutes application is crashed and give me issue like this.
E/libc++abi: terminating
A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 4987 (Worker 1), pid 19586
How to fix it, thank you in advance.

@tobrun
Copy link
Member

tobrun commented Jan 9, 2020

@HovsepShhakaryan instead of commenting on old closed issues could you open a new one instead? Comments on closed issues often go unnoticed. Would you be able to include the full stacktrace of your crash and mention the used library version? Thank you!

@karanveer0802
Copy link

mapbox enable location generates Crash and show error
Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 11676 (Worker 1):-
Code Example:-
@OverRide
public void onMapReady(@nonnull MapboxMap mapboxMaps) {
mapInProgress = true;
mflightMap = mapboxMaps;
isflightmap = true;
// mflightMap.getUiSettings().setScrollGesturesEnabled(false);
flightmapFragment = ((TouchableFlightMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));

    mflightMap.getUiSettings().setZoomGesturesEnabled(false);
    mflightMap.getUiSettings().setTiltGesturesEnabled(false);
    mflightMap.getUiSettings().setCompassEnabled(false);

    mflightMap.setStyle(new Style.Builder().fromUri("https://maps.flightmap.io/styles//style-dark.json"),
            new Style.OnStyleLoaded() {
                @Override
                public void onStyleLoaded(@NonNull Style style) {



                            enableLocationComponent(style);


                }
            });
    Location location = LocationUtils.getLastLocation(this);
    com.mapbox.mapboxsdk.geometry.LatLng currentLatlng = new com.mapbox.mapboxsdk.geometry.LatLng(location.getLatitude(), location.getLongitude());
    mflightMap.moveCamera(com.mapbox.mapboxsdk.camera.CameraUpdateFactory.newCameraPosition(new com.mapbox.mapboxsdk.camera.CameraPosition.Builder().target(currentLatlng).zoom(MAX_ZOOMFLIGHTMAP).tilt(42.25f).build()));
    mapInProgress = false;
    mflightMap.getMaxZoomLevel();

    mflightMap.setMaxZoomPreference(MAX_ZOOMFLIGHTMAP);

    new FlightMapStateListener(mflightMap, flightmapFragment, mActivity) {
        @Override
        public void onMapTouched() {// Map touched
            mapInProgress = true;
        }

        @Override
        public void onMapReleased() {// Map released
            Log.e("Map releasedflightmap", "===");
        }

        @Override
        public void onMapUnsettled() {
            Log.e("Map unsettledflightmap", "===");
            if (updateAddress) {
                tvLocation.setHint(getStrings(R.string.getting_address_v2).replace(TerminologyStrings.ADDRESS, StorefrontCommonData.getTerminology().getAddress()));
                tvLocation.setTag(tvLocation.getText());
                tvLocation.setText("");
            }
        }

        @Override
        public void onMapSettled() {

            Log.e("Map settledflightmap", "===");

// checkForMyLocationButtonVisibility();
if (updateAddress) {

                com.mapbox.mapboxsdk.geometry.LatLng latLng = mflightMap.getCameraPosition().target;
                NumberFormat formatter = NumberFormat.getNumberInstance();

//
formatter.setMaximumFractionDigits(4);
String outputLat = formatter.format(latLng.latitude);
String outputLong = formatter.format(latLng.longitude);
Log.e("outputLat", "" + outputLat);
Log.e("outputLong", "" + outputLong);

                Double distanceCalculated = Utils.getDistance(latitude, longitude, Double.valueOf(outputLat), Double.valueOf(outputLong));

                tvLocation.setHint(getStrings(R.string.pick_up_location));

                Log.e("Distance calculated flightmap ", "<<<<" + distanceCalculated);
                mflightMap.getUiSettings().setScrollGesturesEnabled(true);
                if (distanceCalculated > 0) {
                    Log.e("Distance", "new" + distanceCalculated);

// 23173.94921875
// 1.8658572464858025E-9
if (isHomeUpdate) {
homeLatLngFlightmp = new com.mapbox.mapboxsdk.geometry.LatLng(latLng.latitude, latLng.longitude);
homeLatLng = new LatLng(latLng.latitude, latLng.longitude);
} else if (isWorkUpdate) {
workLatLngFlightmp = new com.mapbox.mapboxsdk.geometry.LatLng(latLng.latitude, latLng.longitude);
workLatLng = new LatLng(latLng.latitude, latLng.longitude);

                    } else if (isOtherUpdate) {
                        otherLatLngFlightmp = new com.mapbox.mapboxsdk.geometry.LatLng(latLng.latitude, latLng.longitude);
                        otherLatLng = new LatLng(latLng.latitude, latLng.longitude);
                    } else {
                        latitude = latLng.latitude;
                        longitude = latLng.longitude;
                    }


                    executeSetAddress();
                    // String address = LocationUtils.getAddressFromLatLng(mActivity, latLng);
                    // tvLocation.setText(address.trim().isEmpty() ? getStrings(R.string.go_to_pin) : address.trim());
                } else {
                    Log.e("Nodsitance", "===");
                    tvLocation.setText(tvLocation.getTag().toString());
                }

                tvLocation.setSelected(true);
                tvLocation.setFocusable(true);
            }
            updateAddress = true;
            mflightMap.getUiSettings().setScrollGesturesEnabled(true);
            mapInProgress = false;
        }
    };
}
private void enableLocationComponent(Style style) {
    if (PermissionsManager.areLocationPermissionsGranted(this)) {
        LocationComponent locationComponent = mflightMap.getLocationComponent();

// Activate with options
locationComponent.activateLocationComponent(
LocationComponentActivationOptions.builder(AddFromMapActivity.this, style).build());

// Enable to make component visible

        locationComponent.setLocationComponentEnabled(true);
    }else {
        permissionsManager = new PermissionsManager(this);
        permissionsManager.requestLocationPermissions(this);
    } }

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

No branches or pull requests

4 participants