Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Crash on Android with signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 000000f0

Discussion in 'Android' started by ercion, Sep 23, 2017.

  1. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    69
  2. Mese

    Mese

    Joined:
    Dec 13, 2015
    Posts:
    13
    I faced this issue again.
    In this case was because of the rewarded and close callback from the Admob SDK.
    Admob SDK callbacks might get called from another thread if Multithreaded Rendering is Active on PlayerSettings.
    If you order your UI or something graphic related from a thread that isnt the main thread it will crash.
    So, if you modify any Graphic from an Admob Callback you might get this error.

    Of course it can happen for other reasons. But in my case was because of a miss-use of these Callbacks.
    Fixes:
    A. Disable Multithreaded Rendering as stated in another response
    or
    B. Instead of calling the UI from the Callback, start a Coroutine, wait one frame ( "yield return null") then call the UI. Coroutine will the switch to the main thread.

    I have tested both, and both works. (In my case).
    Hope it helps.
     
  3. dreyyy07

    dreyyy07

    Joined:
    May 7, 2017
    Posts:
    8
    I got a similar crash every time I launched my app.

    Caused by java.lang.Error
    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000071f1f99ff8

    I tried clearing the app cache an then data, the app now launches properly.
     
    MD_Reptile likes this.
  4. shadowthunder24

    shadowthunder24

    Joined:
    Jun 19, 2019
    Posts:
    8
    I had the same problem and I think I've figured out a way of solving it in my case:

    Usually when we download a Unity Editor we also end up using the SDK, NDK and JDK that are installed through the Unity Hub via 'Add Modules'.

    I have come to realise during my time dealing with hours and hours of problems ranging from this current issue to 'Strip Engine Code' not working and AdSize.SmartBanner chucking an error and crashing the app during launch, these problems are coming from the NDK and SDK that are installed via Unity Editor 'Add Modules'.

    Yes, I am saying that Unity provides buggy NDK and SDK package installs that lead to build errors and even issues inside the Google Play Console running tests which can lead to a native crash such as the signal 11 (SIGSEGV).

    How I solved the problem?

    I simply downloaded the SDK and NDK directly from their original source and override the SDK and NDK in which Unity would use if you were to download it from there. So go to Edit > Preferences > External Tools and replace the SDK and NDK with the ones you manually had to download.

    Hopefully this helps some of you.
     
  5. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,582
    This solution worked for me on Unity 2019.1.9f1 while building IL2CPP and gettings the "signal 11 (SIGSEGV)" error in ADB logcat.

    I just cleared the apps data and cache (which made little sense, as it was recently reinstalled, but apparently that does not clear the data) in the app settings, and then the app began working just fine! Thanks for the solution!
     
  6. Bibzball

    Bibzball

    Joined:
    Sep 26, 2015
    Posts:
    20
    Damn, thank you SO MUCH!
    I can't believe reinstalling does not clear the data.
     
    MD_Reptile likes this.
  7. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,582
    I wanted to follow up here and mention a more permanent fix.

    If your app is crashing after an update of the unity editor, and requires you to delete app cache and data before the app will launch - the solution is to create an android manifest (or edit an existing one) like this:

    Code (XML):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    3.    package="com.YourAppPackage.NameHere>
    4.    <application
    5.        android:allowBackup="false"
    6.        android:fullBackupContent="false"
    7.        <activity android:name=".MainActivity">
    8.            <intent-filter>
    9.                <action android:name="android.intent.action.MAIN" />
    10.                <category android:name="android.intent.category.LAUNCHER" />
    11.            </intent-filter>
    12.        </activity>
    13.    </application>
    14. </manifest>
    The important lines are android:allowBackup="false" and android:fullBackupContent="false". I assumed this would prevent playerprefs from carrying over to the new version - but it does still keep playerprefs. This prevents the crash on startup without the user needing to clear app data or cache!

    The "AndroidManifest.xml" file will need to be inside the "Plugins" folder of your project!