Search Unity

Fatal signal 11 in UnityPreload

Discussion in 'Android' started by Qbit86, Jun 27, 2017.

  1. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Hi!

    There are a lot of SIGSEGV errors mentioned on the forum. I'm interested in that particular one that sometimes happens on loading certain scene:
    Code (csharp):
    1. A/libc(994): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x1c in tid 1070 (UnityPreload)
    2. I/DEBUG(1976): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    3. I/DEBUG(1976): Build fingerprint: 'samsung/j1xltejt/j1xlte:5.1.1/LMY47X/J120FXXU2AQC3:user/release-keys'
    4. I/DEBUG(1976): Revision: '3'
    5. I/DEBUG(1976): ABI: 'arm'
    6. I/DEBUG(1976): pid: 994, tid: 1070, name: UnityPreload >>> com.example.game <<<
    7. I/DEBUG(1976): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1c
    8. I/DEBUG(1976): r0 9e3dec10 r1 9ca87b00 r2 0000271f r3 0000042e
    9. I/DEBUG(1976): r4 00000000 r5 0000271f r6 9ca87af8 r7 8a8b80d0
    10. I/DEBUG(1976): r8 0000271f r9 0000755d sl 9ca4d010 fp 00000000
    11. I/DEBUG(1976): ip 00000000 sp 954efb90 lr 00000000 pc a14d29ac cpsr 600f0010
    12. I/DEBUG(1976): backtrace:
    13. I/DEBUG(1976): #00 pc 004b99ac /data/app/com.example.game-1/lib/arm/libunity.so
    14. I/DEBUG(1976): #01 pc 004b9698 /data/app/com.example.game-1/lib/arm/libunity.so
    15. I/DEBUG(1976): #02 pc 004b4658 /data/app/com.example.game-1/lib/arm/libunity.so
    16. I/DEBUG(1976): #03 pc 003293f8 /data/app/com.example.game-1/lib/arm/libunity.so
    17. I/DEBUG(1976): #04 pc 0032b710 /data/app/com.example.game-1/lib/arm/libunity.so
    18. I/DEBUG(1976): #05 pc 0032b538 /data/app/com.example.game-1/lib/arm/libunity.so
    19. I/DEBUG(1976): #06 pc 0032b508 /data/app/com.example.game-1/lib/arm/libunity.so
    20. I/DEBUG(1976): #07 pc 0038dbd4 /data/app/com.example.game-1/lib/arm/libunity.so
    21. I/DEBUG(1976): #08 pc 00017667 /system/lib/libc.so (_ZL15__pthread_startPv+30)
    22. I/DEBUG(1976): #09 pc 00015687 /system/lib/libc.so (__start_thread+6)
    23. I/display(1961): [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(3)
    Unity 5.5.0, IL2CPP; Android 4, 5, 7 (ARM).

    I have tried `addr2line.exe` on `armeabi-v7a\libunity.sym.so`:
    Code (csharp):
    1. 004b99ac
    2. PersistentManager::PostLoadStreamNameSpace(StreamNameSpace&, int)
    3. 004b9698
    4. PersistentManager::GetStreamNameSpaceInternal(int)
    5. 004b4658
    6. PersistentManager::GetLoadErrorMessageFromPath(std::string const&)
    7. 003293f8
    8. LoadSceneOperation::Perform()
    9. 0032b710
    10. PreloadManager::ProcessSingleOperation()
    11. 0032b538
    12. PreloadManager::Run()
    13. 0032b508
    14. PreloadManager::Run(void*)
    15. 0038dbd4
    16. Thread::RunThreadWrapper(void*)
    What makes particular scene special for Unity to load, so that Unity sometimes crashes inside `libunity.so`?
    How can I prevent crashing as workaround until this bug in Unity for Android is fixed?

    Thanks!

    @Yury-Habets

    P.S. Forum has been broken for years. It takes me dozens of attempts to fill forms and get thread posted. Authorization is completely buggy. Looks like Preview button does not work: “The following error occurred: Sign in here”. So I'm just posting text as is, unable to test layout or formatting, sorry for that.
     
  2. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    @Qbit86 can you re-check with the latest 5.5 patch release?
    Are you able to reproduce it locally, or does it happen only in the wild?
     
  3. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Thank you for response!

    Yes, I can reproduce it locally on the whole project, but cannot narrow down minimalistic repro for submit to issue tracker.

    I will download and try 5.5.4p1, if you think it may help. There was some runtime issue that had prevented us from upgrading from 5.5.0 on Android. But probably crash is more harmful so it's worth migrating, if it helps.
     
  4. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    So far I'm not able to catch this crash building with 5.5.4p1; but I'm not sure, that upgrading Unity does the trick.

    Are there any particular issues related to such crash in changelog?

    Another problem of 5.5.4p1: now scene transition can freeze for 5 min and then continues as usual.
     
  5. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    Well there were tons of fixes between the initial 5.5 release and the latest patch, so it's hard to say which one worked. Using the latest patch release against a .0 version sounds like a good idea to me.

    On the transition freeze - anything in the logcat of a development build? Are you using OBB?
     
  6. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    We are, in production. But we are experiencing freezes even in dev builds with no OBB. (Anyway, the problem happens after OBB is successfully downloaded and discovered.)

    Logcat gives nothing special, but Profiler shows huge spike (~100 seconds) in Loading.UpdatePreloading > Application.WaitForAsyncOperationToComplete on Android device. This doesn't happen in 5.5.0, but looks like smth is locking synchronously in 5.5.4.
     
  7. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
  8. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    I've got this huge spike in Profiler on Unity 5.5.4p1, which does not happen in 5.5.0p4: 105736.19 ms. What can cause such huge lag? We cannot migrate to latest patch release until this regression is solved.
     
  9. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    It's hard to say - something huge is being loaded and waited for. Do you have an idea what code is causing this? What are your scripts doing for 30+ms every frame before that?
     
  10. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Whatever it is, it should not only explain this lag on Android via Unity 5.5.4. It should also explain absence of such freeze in Unity 5.5.0 or on iOS.

    In actual project, the scene I'm testing against is basically 2D NGUI, with no 3D models in it. When I try to isolate problem and asynchronously load heavy scene (65 Mb, 28K game objects) in new project, I cannot catch this freeze in 5.5.4. (But I succeeded to catch crash in 5.5.0 while concurrent loading prefabs.)
     
  11. jecky111

    jecky111

    Joined:
    Jun 11, 2016
    Posts:
    17
    any updates about this topic? struggling with a kind of same issue :(