Lots of crashes on Android

I recently updated my game Sint Nicolaas after 5 years. I used to rarely see a crash report, but now it has a crash rate of 25%! Almost all of this is on Android 7, which I don’t have.
I haven’t received actual complaints (or reviews) about it, so maybe it is always on exit or something. I’ve been searching, but have no clue what this is about or how to fix it. Does anyone here know?

The main clusters are:

Backtrace (in tgkill)

#00  pc 000000000004ad30  /system/lib/libc.so (tgkill+12)
#01  pc 00000000000484c3  /system/lib/libc.so (pthread_kill+34)
#02  pc 000000000001dd99  /system/lib/libc.so (raise+10)
#03  pc 0000000000019521  /system/lib/libc.so (__libc_android_abort+34)
#04  pc 0000000000017160  /system/lib/libc.so (abort+4)
#05  pc 000000000080cee3  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so (_ZN9__gnu_cxx27__verbose_terminate_handlerEv+230)
#06  pc 0000000000808509  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so (_ZN10__cxxabiv111__terminateEPFvvE+4)
#07  pc 0000000000808611  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so (_ZSt9terminatev+8)
#08  pc 00000000008087a3  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so (__cxa_throw+110)
#09  pc 00000000007b3cc0  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#10  pc 00000000007b2e0c  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#11  pc 00000000005f1b80  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#12  pc 00000000007861f0  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#13  pc 0000000000086f34  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/liblime.so
#14  pc 0000000000087218  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/liblime.so
#15  pc 000000000003a1d0  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/liblime.so
#16  pc 00000000003101a4  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#17  pc 000000000059276c  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#18  pc 0000000000596108  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#19  pc 0000000000596160  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#20  pc 00000000007cf9c0  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#21  pc 0000000000569340  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#22  pc 0000000000373f38  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#23  pc 00000000003745d4  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#24  pc 00000000007cf888  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#25  pc 00000000007b6e40  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#26  pc 0000000000047f93  /system/lib/libc.so (_ZL15__pthread_startPv+22)
#27  pc 000000000001a161  /system/lib/libc.so (__start_thread+6)

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) in libApplicationMain.so

#00  pc 00000000007b51ac  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#01  pc 000000000008675c  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/liblime.so
#02  pc 000000000006e1ec  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/liblime.so
#03  pc 000000000006e298  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/liblime.so
#04  pc 000000000006b6f0  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/liblime.so
#05  pc 00000000007199b8  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#06  pc 0000000000711ac0  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#07  pc 00000000000a2ec8  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so
#08  pc 0000000000782710  /data/app/nl.wieringsoftware.sintnicolaas-1/lib/arm/libApplicationMain.so (hxcpp_main+36)
#09  pc 000000000043aa55  /data/app/nl.wieringsoftware.sintnicolaas-1/oat/arm/base.odex

What version of the Android NDK are you using? I remember that there was a newer SDK that was needed to build for Android 7 without crashing… maybe you’re doing that already

A quick question. :slight_smile:
What is preferred Android SDK/NDK now?

1 Like

Thanks, sounds like it could have to do with that then.
Actually I did replace a very old version with r15c at the time, but I’m not sure if just replacing the SDK files is enough to make it be used. Is there a command I need to run to integrate the new version?

You should be able to just point to a newer Android NDK, and it will use those files. Do you know anything about the kind of devices that are crashing? Are they all running Android 7?

Here are some charts from the play console, it’s mainly Android 7.0. I don’t know if it’s anything specific to those devices or if those are just the most commonly used devices among my users.


signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) libApplicationMain.so:

I have a Galaxy S7 I can use to test, but it is running Android 6. I will try and upgrade it.

I had a project, and used to preload swf. Not huge number, but 13 swf. Each swf with background audios. I had similar issue, where it worked well on browsers and IOS devices. But used to crash on Android, at the time of preloading only. I later, found out the issues with audios (.ogg ones) . Removing them solved the problem, such that atleast I was able to load the app. And crash did not occur at preloading atleast.

Thanks, I guess I could try making a version without .ogg files and see if it helps.

I would actually suggest, remove all the audios, not just ogg. And see if crashes get lesser .

What version of Lime/OpenFL did you use?

I don’t think the other 75% would be happy with an update that removes all sound.

I just checked and my android version already uses .wav only, no .ogg.

openfl: 5.1.3 and lime 5.1.0

actuate: 1.7.2 1.7.3 1.7.5 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.6 [1.8.7]
admob-openfl: [0.0.3]
air3: [0.0.1]
away3d-examples: [1.1.0]
away3d: 1.1.0 1.2.0 1.3.2 5.0.0 5.0.1 5.0.2 [5.0.3]
box2d: [1.2.3]
cairo: [0.7.1]
castle: git [dev:d:\haxetoolkit\haxe\lib/castle/git]
extension-admob: [1.6.4]
extension-android-support-v4: [1.0.0]
extension-googleplaygames: [1.5.7]
extension-googleplayservices-basement: [1.1.0]
firetongue: [2.0.0]
flixel-addons: 1.1.0 1.1.1 2.0.0 2.1.0 2.2.0 2.3.0 2.4.1 [2.5.0]
flixel-demos: 1.1.1 1.1.2 2.1.0 2.2.0 2.3.0 2.4.0 [2.4.1]
flixel-templates: 1.0.2 2.0.1 2.1.0 2.2.2 2.3.1 2.4.1 [2.4.3]
flixel-tools: 1.0.2 1.0.4 1.0.5 1.1.0 1.1.2 1.1.3 1.2.1 [1.3.0]
flixel-ui: 1.0.2 2.0.0 2.1.0 [2.2.0]
flixel: 4.1.0 4.1.1 4.2.0 4.2.1 [4.3.0]
flow: git [dev:d:\haxetoolkit\haxe\lib/flow/git]
format: 3.1.2 3.2.1 [3.3.0]
google-play-services: [1.1.0]
haxelib: [3.3.0]
haxelib_client: [3.2.0-rc.3]
haxeui: 1.7.10 1.7.13 1.8.3 1.8.17 [1.8.21]
heaps: 0.9.0 git [dev:d:\haxetoolkit\haxe\lib/heaps/git]
hscript: 2.0.4 2.0.5 2.0.7 [2.1.1]
hxcpp: 3.1.22 3.1.30 3.1.37 3.1.39 3.1.48 3.1.68 3.2.81 3.2.102 3.2.205 3.3.49 3.4.2 3.4.43 3.4.49 [3.4.64]
hxsl: git [dev:d:\haxetoolkit\haxe\lib/hxsl/git]
ImageMagick: 1.5.1 1.6.0 1.6.2 1.6.3 [1.6.4]
layout: 1.2.0 [1.2.1]
lime-samples: 2.3.0 2.6.0 3.4.0 [4.0.1]
lime-tools: 1.4.0 1.5.4 1.5.6 [1.5.7]
lime: 2.9.1 3.2.1 3.5.2 3.7.4 4.0.3 [5.1.0] 5.3.0 (old).dev
luxe: git [dev:d:\haxetoolkit\haxe\lib/luxe/git]
nape: [2.0.20]
nme: 5.0.37 5.1.8 5.2.7 5.2.13 5.3.1 5.4.2 5.5.7 5.6.4 [5.7.1]
openfl-bitfive: 3.0.0 [3.3.3]
openfl-html5: 1.0.5 1.4.1-beta [1.4.2-beta]
openfl-native: [1.4.0]
openfl-samples: 1.3.0 2.1.0 2.2.0 2.2.1 2.2.2 3.3.1 4.0.0 4.5.1 4.7.0 4.9.0 5.1.0 [6.0.0]
openfl: 3.6.0 3.6.1 4.2.0 4.5.2 4.7.0 4.7.1 4.7.3 5.1.0 [5.1.3] git
snow: git [dev:d:\haxetoolkit\haxe\lib/snow/git]
spinehaxe: [git]
steamwrap: [git]
svg: 1.0.8 1.0.9 1.1.0 [1.1.1]
swf: 1.6.5 1.7.0 1.7.3 1.7.5 1.7.6 1.7.7 1.8.4 1.8.8 2.1.6 2.2.0 2.2.4 [2.3.1]
systools: [1.1.0]
yagp: [1.1.4]

I meant to say, this way you will know if audio is root reason. ( Or something else ).

I just got my Galaxy S7 updated, and played the game. It’s very fun :slight_smile:

The first time I played through, after several levels, I eventually did see a crash. However, I had just recently updated (so a lot of things were installing in the back) and I had a game overlay that Samsung made, which is new on Android 7.

I disabled the overlay and tried again, and I could not get it to crash. I also saw multiple video ads and other ads I did not see the first time (there’s a chance(?) that the crash could be caused by the overlay + video ad, but I think the crash happened when it was not time for an ad), but I did notice that the adb log does appear to say WIN DEATH when I exit the game. Perhaps it is possible that this is triggering the crash notification somehow

Thank you singmajesty for testing my game! It seems likely to me that the crashes have something to do with that Samsung overlay then. I don’t think it’s the ads, because my other game Charlie the Duck also gets those same crashes in the paid version, which doesn’t have ads.
Since nobody is actually reporting these crashes, it’s probably not really hindering people from playing the game. From what I can find of the WIN DEATH message is that it is from ANR. I hardly ever get ANR reports, but maybe those somehow result in these crashes.
Anyway, thanks for your help, really appreciated.

I’m willing to test more, but I probably need a debug version, or may need to be able to build from source to really test it. I think this is occurring due to the exit code, but I’m not sure. I don’t know if that reports back to the console at all. Do you know if you have a way of knowing if the “Quit” button triggers something in the console?

I also had those “tgkill” crashes in my older version.
Updating to Openfl 6.5.0 - lime 5.8.2 - haxe 3.4 - nkd r15c solved those.
As a side note, i had those crashes also on Android 6 (~30%).

Now i got some new ones tho :confused: "/liblime.so (alcDeviceResumeSOFT+328)"
But i will get into them soon, when i got the time.

When you receive the alcDeviceResumeSOFT error, does it result in a visible crash for the user?

And I see same crashes as Vega and Wiering, lots of them.
Don’t know if those are real, cause I didn’t experience any crashes myself.