Crash when migrating from 2019.3.3f1 to 2020.1.4f1 due to UnityAdsSettings_Get_Custom_PropTestMode()

Hi, we are trying to migrate to new version of Unity, and everything works from the editor - the game runs properly, but when we build an APK file and launch it on the phone it crashes with attached log.

The cause is null pointer dereference and the only useful line that I see in the logs is:
/data/app/com.distillgames.raceduels-HSHViyjijabkBazKU7Xsmg==/lib/arm64/libunity.so (UnityAdsSettings_Get_Custom_PropTestMode()+44) (BuildId: d915ad471ca47dbe07aa874a318b1d62c0871111)

We are using the Advertisement package and the only lines that are called in the scene that is crashing are:
Advertisement.Initialize (gameId, gameplaySettings.advertisementTestMode);
Advertisement.AddListener(this);

Is this related to Advertisement at all, or is there some other issue?

Thanks in advance.

6288524–695513–crash.txt (30.4 KB)

If anyone faces the same issue - we fixed this by configuring Unity Ads in the Editor Window “Services” - looks like it somehow got lost when migrating between Unity versions.

2 Likes

This saved me. Thanks for posting the solution. Here’s the summary of what I went through:

Unity Ads Android Game Crash On Advertisement.Initialize - Unity Forum

Thank the Maker for you sir, I can’t believe the setting to enable Ads got auto switched off. Been banging my head on this for days and just ran across this and it’s stopped the torture. =)

Hi Hope you all are good is there any Possibility to run unity ads on mobile without active the services ads Panel in the unity If anyone knows please share his/her Knowledge Please

thanks, this saved my day

The latest Unity Ads 4.4.1 doesn’t have it as it seems it automatically enables it