Crash on many Android devices

Our game Skate & Strike is getting bad ranks because of crashes on launch and crashes when opening a level. Here I share you some crash reports, reviews and callstacks.

devices that launched the game more than once but was not able to play in a level(timeplayed corresponds to play time in levels except main menu): http://i.hizliresim.com/MoQYB6.jpg

Reviews that are reporting that game always crashes on launch:

Galaxy Tab A 9.7 (gt5note10wifi) - Android 5.0 - ATC: https://zerobin.net/?e3830333513d84e0#JHGT5JVQcHRR/1ri98qya1UTrzfIAR1mdLFqSdaEPTU=

Galaxy Tab4 10.1 (matissewifi) - Android 5.0 - ATC: https://zerobin.net/?ec866f5dfd72bdc4#bd1mzfuEyzrf9U4JFdI6VxsUptJmU/62CZKrS4FcjlE=

(hammerhead) - Android 6.0 - ATC: https://zerobin.net/?cf43e12c87a5740c#QicqEtGQkh7jwGjKlOccX+smzBttHK0UgxxBpEFjp3U=

Review of (hammerhead): Crash beim level starten

,

I have tested this on a and have not ran into a crash while streaming the level.

Android 5.0 and up use a different virtual machine. One of the checks that’s made in programs now is that you’re not allowed to call native code from within an exception. Here is some [documentation][1] that should be of great assistance to you.

If you do not feel this is the case, please provide ample reproduction steps so that we can further investigate this.

Thanks!

JNI tips  |  Android NDK  |  Android Developers

Unfortunately I haven’t got a crashing device.

Many Android 5.0 and up devices running the game fine. Does it differ by model? Only native plugin that is working on GameActivity is Universal Mobile Ads v1, however there are many jars in it, which are not open source. I am also using audio setter and another minor native functions from other plugins (VaRest and LE Ext Std Lib) but I am almost sure that they are not the guilties.

I will try to update Universal Mobile Ads to it’s new edition which is completely rewritten by it’s publisher, and share results with you. Collecting enough data will take more than one month.

Please try obtaining any logs possible. Finding a device you can test with that’s on a lower Android version would be very helpful in obtaining logs. I’d also try to disable the plugins if possible, to see if they help lower the amount of crashes or not.

Please provide me more details when you can. If you want to share your project with me to test on a device here, I’d be more than happy to do that. You can upload it and provide a link through a private message on the forums.

Thanks!

Okay I will do these.

For every 100 downloads, we lose 10 players without playing the game, but at least a few frames that are enough to notify their existence to our server. Do you have any data on Tappy Chicken, etc? I’ve seen bad reviews about crashing in Tappy Chickens Play page, too.

I do not have any data on Tappy Chicken. It’s possible that certain devices are not compatible with your game but without seeing logs, it’s hard to say what’s going on.

Hi ,
After collecting more crash reports, I’ve seen that many devices are crashing because of my GetDeviceID function. It looks like Unreal or OS gives a null value from a function that I used in this.

Apparently a null check will be enough here, but by doing so I won’t be able to get unique device id. I think this I should open a topic in java forums instead of here. But, a valid device ID getter would be very fine in Unreal Engine, such as blueprint node or C++ function.

Crash report: ZeroBin.net

Relative code inside MyBlueprintFunctionLibrary.cpp ZeroBin.net

Relative code inside MyBlueprintFunctionLibrary.cpp, as a picture:

I would highly suggest watching this [ video][1] because it’ll explain how to do it, why it’s difficult to do, etc. There are some devices that spit out a null value while devices such as Motorola all have the same device ID. So using this in general might be a bad idea.

If you watch from the tutorial link I posted, you’ll find there is another way to obtain what you’re trying to in your game. Give it a try, let me know your outcome.

Thanks!

Google I/O 2011: Android Protips: Advanced Topics for Expert Android App Developers - YouTube

Hi , thanks for taking your time into this.

My opinion is, random device id that is generated by Android is looking very unnecessary. This week I implemented a mixture of deviceId and server-generated client id, and it is working well on all platforms.

Device ID: Guarantees constancy. This is useful for preventing save game downloading from the internet. Also it is useful for banning more than 90% of cheaters that have a unique device id on a non-rooted device. If there are more than one deviceId with the same device model in the server database, it is safe to ban by deviceId.

Client ID: Provides very high uniqueness. It is assigned by our server, if client requests. Client only requests this ID if it doesn’t have assigned it yet. This ID is useful for gift delivery.

In most of the cases, I think there should be two device ID getters. “Probably Unique Device ID” and “Client ID”. However client id needs a server.

By the way problem is resolved for me :slight_smile:

Thank you for describing what has been going on with your project. I’m hoping it’ll be useful to others in the future. Let me know if you run into any further complications.

Thanks!