Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Android crashes when execute UnityAds initialization

Discussion in 'Unity Ads & User Acquisition' started by marcast, Aug 23, 2021.

  1. marcast

    marcast

    Joined:
    Dec 23, 2018
    Posts:
    2
    Hi everyone, I'm trying to test my game on an Android device, but when my game execute
    Code (CSharp):
    1. Advertisement.Initialize(_gameId, _testMode, _enablePerPlacementMode);
    it crashes with the next exception:

    Code (CSharp):
    1.     --------- beginning of crash
    2. 2021-08-22 20:32:12.819 5801-5816/? E/AndroidRuntime: FATAL EXCEPTION: UnityMain
    3.     Process: com.marcast.crazyjewells, PID: 5801
    4.     java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    5.     Version '2020.3.16f1 (049d6eca3c44)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'armeabi-v7a'
    6.     Build fingerprint: 'motorola/addison/addison:8.0.0/OPNS27.76-12-22-9/10:user/release-keys'
    7.     Revision: 'p700'
    8.     ABI: 'arm'
    9.     Timestamp: 2021-08-22 20:32:12-0300
    10.     pid: 5801, tid: 5816, name: UnityMain  >>> com.marcast.crazyjewells <<<
    11.     uid: 10214
    12.     signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x6a
    13.     Cause: null pointer dereference
    14.         r0  00000060  r1  9192b800  r2  aff80040  r3  00000080
    15.         r4  90b772d8  r5  9e995c60  r6  00000001  r7  9e978ed8
    16.         r8  00000001  r9  9e97ecc0  r10 00000003  r11 8fabf498
    17.         ip  ae56bd64  sp  8fabf470  lr  90e093ef  pc  90e394be
    18.    
    19.     backtrace:
    20.           #00 pc 000f54be  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    21.           #01 pc 00d49b8c  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libil2cpp.so (BuildId: 8cd467e4cbd1b1247d73939742b74633e43d1198)
    22.           #02 pc 003cb61c  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libil2cpp.so (BuildId: 8cd467e4cbd1b1247d73939742b74633e43d1198)
    23.           #03 pc 003cb2f0  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libil2cpp.so (BuildId: 8cd467e4cbd1b1247d73939742b74633e43d1198)
    24.           #04 pc 0017b8b4  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libil2cpp.so (BuildId: 8cd467e4cbd1b1247d73939742b74633e43d1198)
    25.           #05 pc 0024c49c  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libil2cpp.so (BuildId: 8cd467e4cbd1b1247d73939742b74633e43d1198)
    26.           #06 pc 001e7d15  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    27.           #07 pc 001f1e65  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    28.           #08 pc 001f321b  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    29.           #09 pc 0021ba19  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    30.           #10 pc 001fa2c9  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    31.           #11 pc 001fa593  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    32.           #12 pc 001fa273  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    33.           #13 pc 00226f4d  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    34.           #14 pc 00226e91  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    35.           #15 pc 00226e33  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    36.           #16 pc 0017de33  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    37.           #17 pc 0017e01f  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    38.           #18 pc 0017dbf9  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    39.           #19 pc 0017dc97  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    40. 2021-08-22 20:32:12.819 5801-5816/? E/AndroidRuntime:       #20 pc 0017da4f  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    41.           #21 pc 0017e597  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    42.           #22 pc 0017ea07  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    43.           #23 pc 0023d133  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    44.           #24 pc 0024c2e5  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
    45.           #25 pc 000114e3  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/oat/arm/base.odex
    46.    
    47.         at libunity.0xf54be(Native Method)
    48.         at libil2cpp.0xd49b8c(Native Method)
    49.         at libil2cpp.0x3cb61c(Native Method)
    50.         at libil2cpp.0x3cb2f0(Native Method)
    51.         at libil2cpp.0x17b8b4(Native Method)
    52.         at libil2cpp.0x24c49c(Native Method)
    53.         at libunity.0x1e7d15(Native Method)
    54.         at libunity.0x1f1e65(Native Method)
    55.         at libunity.0x1f321b(Native Method)
    56.         at libunity.0x21ba19(Native Method)
    57.         at libunity.0x1fa2c9(Native Method)
    58.         at libunity.0x1fa593(Native Method)
    59.         at libunity.0x1fa273(Native Method)
    60.         at libunity.0x226f4d(Native Method)
    61.         at libunity.0x226e91(Native Method)
    62.         at libunity.0x226e33(Native Method)
    63.         at libunity.0x17de33(Native Method)
    64.         at libunity.0x17e01f(Native Method)
    65.         at libunity.0x17dbf9(Native Method)
    66.         at libunity.0x17dc97(Native Method)
    67.         at libunity.0x17da4f(Native Method)
    68.         at libunity.0x17e597(Native Method)
    69.         at libunity.0x17ea07(Native Method)
    70.         at libunity.0x23d133(Native Method)
    71.         at libunity.0x24c2e5(Native Method)
    72.         at base.0x114e3(Native Method)
    I disabled Strip Engine code becase I read that it might be the problem, but it continues crashing.

    I'm using unity 2020.3.16f and UnityAds 3.75.0

    thanks you!
     
  2. Mamoon178

    Mamoon178

    Joined:
    Jul 26, 2017
    Posts:
    36
    Same issue you find any solution?
     
  3. Unity_Quinn

    Unity_Quinn

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    102
    Hi everyone!

    This crash happens when you are not connected to a project via the services window.

    In the editor, please click Window -> General -> Services. From here, click on "General settings" or click to toggle "Ads" On and fill in the information in the window that opens up. Once you're connected via the service window, try building the project again and see if this fixes the issue.

    I hope this helps!
     
  4. Mamoon178

    Mamoon178

    Joined:
    Jul 26, 2017
    Posts:
    36
    Issue solve thanks for Reply
     
    Unity_Quinn likes this.