Untiy ads causing A/libc: Fatal signal 11 on Android

Hey everyone, having a strange issue.

before I begin I have looked on serval threads to no avail, most suggest disabling stripping (mine already is)

I recently performed a build of my game and imported it into android studio, it seems since switching on Untiy ads it causes a fatal signal error and crashes straight after the unity splash screen. To ensure that it was unity ads creasing this issue I started a clean, empty project and re-ran without unity ads and there was no issue, I then enabled the ads service and the issue then presented itself on a clean build.

What i find strange about this is if i build and run directly to the device (cutting out android studio (non google project)) then I dont find any issue at all with either build, things run just run, ads are displayed and its nice and smooth, but if I involve Android studio in the process then I get the fatal signal 11.

Im building a rather time sensitive project, there is a cultural window that I need to release during and im worried im running out of time.

the game was built using Unity 5.3.4 and I have tried two devices.

I will send a case of beer to any man or woman that can help me solve this!! help! :face_with_spiral_eyes:

Hi,

Let’s check these first:

  • Do you have the developer setting “don’t keep activities” set on? If so - remove it and try again.
  • Can you provide us with the adb logcat logs from this crash?

Hey, I dont have that setting switched on, but i did try the game with it on just out of interest and still no joy. I also removed unity Analytics and now I have a different issue…

05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: java_class == null
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] in call to GetMethodID
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] from boolean com.unity3d.player.UnityPlayer.nativeRender()
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] “UnityMain” prio=5 tid=16 Runnable
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] | group=“main” sCount=0 dsCount=0 obj=0x12df3ba0 self=0xb4a90400
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] | sysTid=1082 nice=0 cgrp=default sched=0/0 handle=0xb360c000
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] | state=R schedstat=( 1553371632 181617164 1548 ) utm=133 stm=22 core=0 HZ=100
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] | stack=0xaeafe000-0xaeb00000 stackSize=1036KB
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] | held mutexes= “mutator lock”(shared held)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] native: #00 pc 0000484c /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] native: #01 pc 00003031 /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] native: #02 pc 00242f8b /system/lib/libart.so (art::smile:umpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits >&, int, char const*, art::mirror::ArtMethod*, BacktraceMap*)+70)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] native: #03 pc 002276af /system/lib/libart.so (art::thread::smile:ump(std::__1::basic_ostream<char, std::__1::char_traits >&, BacktraceMap*) const+154)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] native: #04 pc 000b006d /system/lib/libart.so (art::JniAbort(char const*, char const*)+584)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] native: #05 pc 000b07b5 /system/lib/libart.so (art::JniAbortF(char const*, char const*, …)+60)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] native: #06 pc 001b3e79 /system/lib/libart.so (art::JNI::GetMethodID(_JNIEnv*, _jclass*, char const*, char const*)+764)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] native: #07 pc 0092ba4f /data/app/com.PerrinoStudios.Game-1/lib/arm/libunity.so (???)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] native: #08 pc 0092bcc5 /data/app/com.PerrinoStudios.Game-1/lib/arm/libunity.so (???)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] native: #09 pc 004eddb4 /data/app/com.PerrinoStudios.Game-1/lib/arm/libunity.so (???)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] native: #10 pc 00006804 (???)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] at com.unity3d.player.UnityPlayer.nativeRender(Native method)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] at com.unity3d.player.UnityPlayer.a(unavailable:-1)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65] at com.unity3d.player.UnityPlayer$b.run(unavailable:-1)
05-25 13:53:46.185 837-1082/? A/art: art/runtime/check_jni.cc:65]
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] Runtime aborting…
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] Aborting thread:
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] “UnityMain” prio=5 tid=16 Native
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] | group=“” sCount=0 dsCount=0 obj=0x12df3ba0 self=0xb4a90400
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] | sysTid=1082 nice=0 cgrp=default sched=0/0 handle=0xb360c000
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] | state=R schedstat=( 1587501058 188491228 1564 ) utm=136 stm=22 core=3 HZ=100
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] | stack=0xaeafe000-0xaeb00000 stackSize=1036KB
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] | held mutexes= “abort lock” “mutator lock”(shared held)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #00 pc 0000484c /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #01 pc 00003031 /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #02 pc 00242f8b /system/lib/libart.so (art::smile:umpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits >&, int, char const*, art::mirror::ArtMethod*, BacktraceMap*)+70)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #03 pc 002276af /system/lib/libart.so (art::thread::smile:ump(std::__1::basic_ostream<char, std::__1::char_traits >&, BacktraceMap*) const+154)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #04 pc 0021765d /system/lib/libart.so (art::AbortState::smile:umpThread(std::__1::basic_ostream<char, std::__1::char_traits >&, art::Thread*)+24)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #05 pc 0021790d /system/lib/libart.so (art::AbortState::smile:ump(std::__1::basic_ostream<char, std::__1::char_traits >&)+436)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #06 pc 00217ae1 /system/lib/libart.so (art::Runtime::Abort()+72)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #07 pc 000a654b /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #08 pc 000b025b /system/lib/libart.so (art::JniAbort(char const*, char const*)+1078)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #09 pc 000b07b5 /system/lib/libart.so (art::JniAbortF(char const*, char const*, …)+60)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #10 pc 001b3e79 /system/lib/libart.so (art::JNI::GetMethodID(_JNIEnv*, _jclass*, char const*, char const*)+764)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #11 pc 0092ba4f /data/app/com.PerrinoStudios.Game-1/lib/arm/libunity.so (???)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #12 pc 0092bcc5 /data/app/com.PerrinoStudios.Game-1/lib/arm/libunity.so (???)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #13 pc 004eddb4 /data/app/com.PerrinoStudios.Game-1/lib/arm/libunity.so (???)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] native: #14 pc 00006804 (???)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] at com.unity3d.player.UnityPlayer.nativeRender(Native method)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] at com.unity3d.player.UnityPlayer.a(unavailable:-1)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] at com.unity3d.player.UnityPlayer$b.run(unavailable:-1)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] Pending exception java.lang.ClassNotFoundException thrown by ‘unknown throw location’
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] java.lang.ClassNotFoundException: Didn’t find class “com.unity3d.ads.android.unity3d.UnityAdsUnityEngineWrapper” on path: DexPathList[[dex file “/data/data/com.PerrinoStudios.Game/files/instant-run/dex/slice-unity-classes_3df20d57ab555799052277359172eca5971eb29b-classes.dex”, dex file “/data/data/com.PerrinoStudios.Game/files/instant-run/dex/slice-slice_9-classes.dex”, dex file “/data/data/com.PerrinoStudios.Game/files/instant-run/dex/slice-slice_8-classes.dex”, dex file “/data/data/com.PerrinoStudios.Game/files/instant-run/dex/slice-slice_7-classes.dex”, dex file “/data/data/com.PerrinoStudios.Game/files/instant-run/dex/slice-slice_6-classes.dex”, dex file “/data/data/com.PerrinoStudios.Game/files/instant-run/dex/slice-slice_5-classes.dex”, dex file “/data/data/com.PerrinoStudios.Game/files/instant-run/dex/slice-slice_4-classes.dex”, dex file "/data/data/com.PerrinoStudios.Game/files/instant-run/dex/s
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] at java.lang.Class com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader.findClass(java.lang.String) (IncrementalClassLoader.java:90)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:511)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:469)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] at boolean com.unity3d.player.UnityPlayer.nativeRender() ((null):-2)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] at boolean com.unity3d.player.UnityPlayer.a(com.unity3d.player.UnityPlayer) ((null):-1)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] at void com.unity3d.player.UnityPlayer$b.run() ((null):-1)
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295] Dumping all threads without appropriate locks held: thread list lock mutator lock
05-25 13:53:46.205 837-1082/? A/art: art/runtime/runtime.cc:295]
05-25 13:53:46.206 837-1082/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 1082 (UnityMain)

P.s. I have just removed Unity Ads from the main project, the game functions pefectly…

This looks like the ads sdk is trying to access the Unity main thread, which is unavailable.

Which Ads SDK are you using? Are you integrating it using the native SDK, Asset Store package or the services window?

Why do you need to roll it through Android Studio?

Hey Mikaisomma,

I first started the project by importing the asset store package, but I then moved to the Native SDK by switching on the advertisment service and then removing the imported package. Just to say this project runs perfectly fine on xcode and ios.

When you say why do I need to roll it through Android studio I must beg for your forgiveness, this is my first Android project, I thought putting the project through Android studio was much the same as having to run the project via Xcode.

Say I wanted to export the project and cut out Android studio and upload to google play is that possible? If so, how?

Once again, I must ask for you to treat my noob status with understanding :slight_smile:

Hi,

The integration should be as straightforward as this: Go to window → Unity services → select ads and enable them.

This way Unity Ads gets initialized automatically with the game IDs in services → ads → advanced - there’s no need to run the initialize() -function with this integration method.

Then, just run the code testing whether ads are ready and show the ad: Unity developer integration guides

Just build the .apk from Unity and run it. You have to sign it in order to send it to Google Play.

You’re good to go - no need to visit Android Studio. This works differently for iOS, where you have to go through XCode.

I hope this helps!

So, just to confirm, build settings without Google Android Project ticked?

sign the project via PlayerSettings > Publishing settings?

The Apk is generated and can be uploaded?

Exactly!

I will give it a go, if it works I will give you such a cuddle… or send you the aforementioned case of beer (Actually serious)

Hey Mikaisomma, Google rejected the APK because it was in debug mode, I did tick create new key and entered a password and confirmed it, apparently another window is due to pop up? but it doesnt.

Im an idiot, disregard this. Wait was failing to sign it in unity causing the issue in Android studio do you think?

Signing the apk most likely had nothing to do with the issue with Android studio. You had development mode on in build settings and that’s why it got rejected?

Did you manage to get it sent to Google Play?

Yea all good Mikaisomma, shameless plug incoming! Thank you so much!

https://play.google.com/store/apps/details?id=com.PerrinoStudios.TheWallOfTrump

1 Like

Glad to hear you got it live!

That trailer music though! :smile: