Android crashes when execute UnityAds initialization

Hi everyone, I’m trying to test my game on an Android device, but when my game execute
Advertisement.Initialize(_gameId, _testMode, _enablePerPlacementMode); it crashes with the next exception:

    --------- beginning of crash
2021-08-22 20:32:12.819 5801-5816/? E/AndroidRuntime: FATAL EXCEPTION: UnityMain
    Process: com.marcast.crazyjewells, PID: 5801
    java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Version '2020.3.16f1 (049d6eca3c44)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'armeabi-v7a'
    Build fingerprint: 'motorola/addison/addison:8.0.0/OPNS27.76-12-22-9/10:user/release-keys'
    Revision: 'p700'
    ABI: 'arm'
    Timestamp: 2021-08-22 20:32:12-0300
    pid: 5801, tid: 5816, name: UnityMain  >>> com.marcast.crazyjewells <<<
    uid: 10214
    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x6a
    Cause: null pointer dereference
        r0  00000060  r1  9192b800  r2  aff80040  r3  00000080
        r4  90b772d8  r5  9e995c60  r6  00000001  r7  9e978ed8
        r8  00000001  r9  9e97ecc0  r10 00000003  r11 8fabf498
        ip  ae56bd64  sp  8fabf470  lr  90e093ef  pc  90e394be
   
    backtrace:
          #00 pc 000f54be  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #01 pc 00d49b8c  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libil2cpp.so (BuildId: 8cd467e4cbd1b1247d73939742b74633e43d1198)
          #02 pc 003cb61c  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libil2cpp.so (BuildId: 8cd467e4cbd1b1247d73939742b74633e43d1198)
          #03 pc 003cb2f0  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libil2cpp.so (BuildId: 8cd467e4cbd1b1247d73939742b74633e43d1198)
          #04 pc 0017b8b4  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libil2cpp.so (BuildId: 8cd467e4cbd1b1247d73939742b74633e43d1198)
          #05 pc 0024c49c  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libil2cpp.so (BuildId: 8cd467e4cbd1b1247d73939742b74633e43d1198)
          #06 pc 001e7d15  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #07 pc 001f1e65  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #08 pc 001f321b  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #09 pc 0021ba19  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #10 pc 001fa2c9  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #11 pc 001fa593  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #12 pc 001fa273  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #13 pc 00226f4d  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #14 pc 00226e91  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #15 pc 00226e33  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #16 pc 0017de33  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #17 pc 0017e01f  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #18 pc 0017dbf9  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #19 pc 0017dc97  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
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)
          #21 pc 0017e597  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #22 pc 0017ea07  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #23 pc 0023d133  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #24 pc 0024c2e5  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/lib/arm/libunity.so (BuildId: 4e7db3ba97adf8f51dec5446385c1f5f53c06769)
          #25 pc 000114e3  /data/app/com.marcast.crazyjewells-bfuxc02gH9pH8AEhj_m8DA==/oat/arm/base.odex
   
        at libunity.0xf54be(Native Method)
        at libil2cpp.0xd49b8c(Native Method)
        at libil2cpp.0x3cb61c(Native Method)
        at libil2cpp.0x3cb2f0(Native Method)
        at libil2cpp.0x17b8b4(Native Method)
        at libil2cpp.0x24c49c(Native Method)
        at libunity.0x1e7d15(Native Method)
        at libunity.0x1f1e65(Native Method)
        at libunity.0x1f321b(Native Method)
        at libunity.0x21ba19(Native Method)
        at libunity.0x1fa2c9(Native Method)
        at libunity.0x1fa593(Native Method)
        at libunity.0x1fa273(Native Method)
        at libunity.0x226f4d(Native Method)
        at libunity.0x226e91(Native Method)
        at libunity.0x226e33(Native Method)
        at libunity.0x17de33(Native Method)
        at libunity.0x17e01f(Native Method)
        at libunity.0x17dbf9(Native Method)
        at libunity.0x17dc97(Native Method)
        at libunity.0x17da4f(Native Method)
        at libunity.0x17e597(Native Method)
        at libunity.0x17ea07(Native Method)
        at libunity.0x23d133(Native Method)
        at libunity.0x24c2e5(Native Method)
        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!

Same issue you find any solution?

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!

2 Likes

Issue solve thanks for Reply

1 Like