Search Unity

Android app crashing after upgrading to 2018.3 from 2018.2(.6f1)

Discussion in 'Android' started by schauer93, Feb 4, 2019.

  1. schauer93

    schauer93

    Joined:
    Jan 8, 2019
    Posts:
    3
    Hi,

    I tried to upgrade my unity project to Untiy 2018.3 from 2018.2 but it's crashing on our test device(Mi A2 running Android 8.1) and produces the following stacktrace:

    Code (CSharp):
    1. 2019-02-04 21:18:53.667 17776-17993/com.company.projectname.mi D/Unity: NativeCrashSerializer::EndReport() Success!
    2. 2019-02-04 21:18:53.674 17776-17993/com.company.projectname.mi E/CRASH:     #00  pc 003a6e10  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (UnityEngine::PlatformWrapper::GetRendererAPI()+28)
    3. 2019-02-04 21:18:53.674 17776-17993/com.company.projectname.mi E/CRASH:     #01  pc 003d189c  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (CrashReporting::CrashReport::CaptureMetadata()+852)
    4. 2019-02-04 21:18:53.674 17776-17993/com.company.projectname.mi E/CRASH:     #02  pc 003d4b78  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (CrashReporting::CrashReporter::PopulateReportSharedData(CrashReporting::CrashReport&, bool)+40)
    5. 2019-02-04 21:18:53.674 17776-17993/com.company.projectname.mi E/CRASH:     #03  pc 003d47fc  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (CrashReporting::CrashReporter::SendReport(CrashReporting::CrashReport&, bool)+36)
    6. 2019-02-04 21:18:53.674 17776-17993/com.company.projectname.mi E/CRASH:     #04  pc 003d473c  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (CrashReporting::CrashReporter::HandleLog(core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, LogType)+468)
    7. 2019-02-04 21:18:53.674 17776-17993/com.company.projectname.mi E/CRASH:     #05  pc 003d444c  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (CrashReporting::CrashReporter::OnLogCallbackStatic(DebugStringToFileData const&, LogType, bool)+108)
    8. 2019-02-04 21:18:53.674 17776-17993/com.company.projectname.mi E/CRASH:     #06  pc 003a57c4  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (CallbackArray3<DebugStringToFileData const&, LogType, bool>::Invoke(DebugStringToFileData const&, LogType, bool)+104)
    9. 2019-02-04 21:18:53.675 17776-17993/com.company.projectname.mi E/CRASH:     #07  pc 0133641c  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&)+200)
    10. 2019-02-04 21:18:53.675 17776-17993/com.company.projectname.mi E/CRASH:     #08  pc 01336b54  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (DebugStringToFile(DebugStringToFileData const&)+484)
    11. 2019-02-04 21:18:53.675 17776-17993/com.company.projectname.mi E/CRASH:     #09  pc 00c63074  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (Scripting::LogExceptionFromManaged(ScriptingExceptionPtr, int, char const*, bool)+444)
    12. 2019-02-04 21:18:53.675 17776-17993/com.company.projectname.mi E/CRASH:     #10  pc 00c61878  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (Scripting::LogException(ScriptingExceptionPtr, int, char const*, bool)+96)
    13. 2019-02-04 21:18:53.675 17776-17993/com.company.projectname.mi E/CRASH:     #11  pc 00d3b17c  /data/app/com.company.projectname.mi-lSdr2cHhYqhqz2We0ZvKYw==/lib/arm/libunity.so (UnityJavaProxy_LogLastJNIInvokeException(_JNIEnv*, _jobject*)+52)
    14. 2019-02-04 21:18:53.697 17776-17825/com.company.projectname.mi E/AndroidRuntime: FATAL EXCEPTION: UnityMain
    15.     Process: com.company.projectname.mi, PID: 17776
    16.     java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 000024a0
    17.     Build fingerprint: 'xiaomi/daisy/daisy_sprout:8.1.0/OPM1.171019.019/V9.6.11.0.ODLMIFF:user/release-keys'
    18.     Revision: '0'
    19.     pid: 17776, tid: 17993, name: Thread-29  >>> com.company.projectname.mi <<<
    20.         r0 00000000  r1 000024a0  r2 00000000  r3 80000000
    21.         r4 00000000  r5 c05735c8  r6 c05735c8  r7 e89a5210
    22.         r8 c0573718  r9 e89a524c  sl e89a5238  fp e89a5240
    23.         ip d596ad68  sp c05735c0  lr d4db95f4  pc d41e8e10  cpsr 00004649
    24.    
    25.         at libunity.UnityEngine::PlatformWrapper::GetRendererAPI()(PlatformWrapper:28)
    26.         at libunity.CrashReporting::CrashReport::CaptureMetadata()(CrashReport:852)
    27.         at libunity.CrashReporting::CrashReporter::PopulateReportSharedData(CrashReporting::CrashReport&, bool)(CrashReporter:40)
    28.         at libunity.CrashReporting::CrashReporter::SendReport(CrashReporting::CrashReport&, bool)(CrashReporter:36)
    29.         at libunity.CrashReporting::CrashReporter::HandleLog(core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, LogType)(CrashReporter:468)
    30.         at libunity.CrashReporting::CrashReporter::OnLogCallbackStatic(DebugStringToFileData const&, LogType, bool)(CrashReporter:108)
    31.         at libunity.CallbackArray3<DebugStringToFileData const&, LogType, bool>::Invoke(DebugStringToFileData const&, LogType, bool)(DebugStringToFileData:104)
    32.         at libunity.DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&)(DebugStringToFilePostprocessedStacktrace:200)
    33.         at libunity.DebugStringToFile(DebugStringToFileData const&)(DebugStringToFile:484)
    34.         at libunity.Scripting::LogExceptionFromManaged(ScriptingExceptionPtr, int, char const*, bool)(LogExceptionFromManaged:444)
    35.         at libunity.Scripting::LogException(ScriptingExceptionPtr, int, char const*, bool)(LogException:96)
    36.         at libunity.UnityJavaProxy_LogLastJNIInvokeException(_JNIEnv*, _jobject*)(UnityJavaProxy_LogLastJNIInvokeException:52)
    37.         at base.oatexec(oatexec)
    38. 2019-02-04 21:18:53.703 1634-20199/? W/ActivityManager:   Force finishing activity com.company.projectname.mi/com.unity3d.player.UnityPlayerActivity
    It crashes right after the menu scene has been loaded (some scenes actually manage to finish before the crash happens so I doubt there would be anything wrong with LoadScene calls).

    There's no unsafe code in use and I've removed every GC related call. I suspect a threading error somewhere but I'm not sure what I should look for when upgrading to 2018.3. I'm building with the following settings:
    - Scripting Runtime Version: .NET 4.x (also tried 3.5)
    - Scripting Backend: Mono (also tried IL2CPP which lead to strange errors stating that numeric_limits is not part of namespace std)
    - Api Compatibility Level: .NET 4.x (also tried 2.0)
    - Target Architectures: ARMv7

    Also, I've tried using 2019.1b but got the exact same error.

    Thank you for the help in advance!
     
  2. schauer93

    schauer93

    Joined:
    Jan 8, 2019
    Posts:
    3
    Fixed this by requesting android permissions manually through the Permission API. Seems like this error was caused by insufficient permissions.
     
  3. gun_man

    gun_man

    Joined:
    Sep 19, 2020
    Posts:
    16
    But how? got this error too
     
  4. OxDEADFACE

    OxDEADFACE

    Joined:
    Jul 6, 2017
    Posts:
    33
    Bump, which permissions were needed?!