Search Unity

[Unity 2017.3.0f3] Native thread exiting without having called DetachCurrentThread

Discussion in 'Android' started by Nyankoooo, Feb 1, 2018.

  1. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    I'm getting the following crash on Google's pre-launch report for a few devices (not all).
    I also attached the full logcat below to check if necessary.

    Does anyone has an idea why this is happening?


    Code (CSharp):
    1.  
    2. *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    3. Build fingerprint: 'Huawei/ALE-L23/hwALE-H:5.0.1/HuaweiALE-L23/C605B150:user/release-keys'
    4. Revision: '0'
    5. ABI: 'arm'
    6. pid: 15112, tid: 15497, name: Thread-239  >>> com.myproject <<<
    7. signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    8. Abort message: 'art/runtime/thread.cc:1019] Native thread exited without calling DetachCurrentThread: Thread[40,tid=15497,Native,Thread*=0xac714c30,peer=0x12c012e0,"Thread-239"]'
    9.     r0 00000000  r1 00003c89  r2 00000006  r3 00000000
    10.     r4 d89f8dd8  r5 00000006  r6 00000002  r7 0000010c
    11.     r8 00000001  r9 ab2bfa18  sl 00000000  fp ac07b9a0
    12.     ip 00003c89  sp d89f8750  lr f73c5699  pc f73eba94  cpsr 68070010
    13. backtrace:
    14.     #00 pc 0003ca94  /system/lib/libc.so (tgkill+12)
    15.     #01 pc 00016695  /system/lib/libc.so (pthread_kill+52)
    16.     #02 pc 000172a7  /system/lib/libc.so (raise+10)
    17.     #03 pc 00013be5  /system/lib/libc.so (__libc_android_abort+36)
    18.     #04 pc 000123bc  /system/lib/libc.so (abort+4)
    19.     #05 pc 002281f3  /system/lib/libart.so (art::Runtime::Abort()+170)
    20.     #06 pc 000a74b9  /system/lib/libart.so (art::LogMessage::~LogMessage()+1360)
    21.     #07 pc 002359af  /system/lib/libart.so (art::Thread::ThreadExitCallback(void*)+186)
    22.     #08 pc 000164f5  /system/lib/libc.so (pthread_key_clean_all()+80)
    23.     #09 pc 00016173  /system/lib/libc.so (pthread_exit+30)
    24.     #10 pc 0028826c  /data/app/com.myproject-1/lib/arm/libmono.so
    25.     #11 pc 00288bf8  /data/app/com.myproject-1/lib/arm/libmono.so
    26.     #12 pc 00239188  /data/app/com.myproject-1/lib/arm/libmono.so (mono_thread_exit+92)
    27.     #13 pc 002433d0  /data/app/com.myproject-1/lib/arm/libmono.so
    28.     #14 pc 00243954  /data/app/com.myproject-1/lib/arm/libmono.so
    29.     #15 pc 00243998  /data/app/com.myproject-1/lib/arm/libmono.so (mono_thread_force_interruption_checkpoint+12)
    30.     #16 pc 0000206c  <unknown>
    31.  
     

    Attached Files:

  2. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    Anyone?
     
  3. Inevio

    Inevio

    Joined:
    Sep 21, 2017
    Posts:
    1
    I started getting this exact behavior in my latest build, but I am still using 2017.2.0f3
    I thought it might be related to Admob failing to deliver ads during the google test, but I see you aren't having that problem. I am attaching my logcat in case you want to compare them - Nothing really stood out to me.

    Not sure if this will help you, but my problem went away after I added

    Code (CSharp):
    1.     private void OnApplicationQuit()
    2.     {
    3.        
    4.         bannerView.Destroy();
    5.     }
    where bannerView is my Banner Ad
     

    Attached Files:

    Last edited: Feb 26, 2018