App works when launch from editor :: Crashes when installing package

Bit of a misterious problem here.

The app was doing fine, both installing from .bat on PC or installing from the PlayStore. But something happened in some version packaging (trying to get the ads working) and now the app crashes right after the splash screen.

It still works fine when I launch from the editor to the phone (Nexus5), but installed packages no longer work.

As far as I remember I’ve been playing around with the AndroidManifest.xml, using ManifestRequirementsOverride.txt to remove some permissions I didn’t use, I’ve introduced the AdMob Ad ID in the project settings, added achievments which I’m not yet using, added the extra permission com.android.vending.BILLING (apparently required even if I only have ads)…don’t know what more I could have done.

Any of this can possibly cause such a problem?

BTW I’m doing it all in blueprints.

As additional info, I did a pre-launch report on the last beta APK on the Play Store dev console and it says out of 11 devices 6 had issues. No more info than that.

I also reported one of the crashes, also with the last APK, on the phone with the app downloaded from the store. This is what the report says:

Native crash at /system/lib/libc.so

in /system/lib/libc.so (tgkill+12), /system/lib/libc.so (pthread_kill+32)

There is also a whole lot of lines in the Stack Traces tab. No idea what that means.

Any help or opinion here is welcome, this is really driving me crazy.

Some of the lines in the Stack Traces. The last one repeats itself to the end changing the text in the brackets.

There must something wrong with libUE4.so and libc.so

#00 pc 00041f50 /system/lib/libc.so (tgkill+12)
#01 pc 0003fb5d /system/lib/libc.so (pthread_kill+32)
#02 pc 0001c30f /system/lib/libc.so (raise+10)
#03 pc 000194c1 /system/lib/libc.so (__libc_android_abort+34)
#04 pc 000174ac /system/lib/libc.so (abort+4)
#05 pc 0001af23 /system/lib/libc.so (__libc_fatal+16)
#06 pc 00055373 /system/lib/libc.so (ifree+202)
#07 pc 00058257 /system/lib/libc.so (je_free+374)
#08 pc 01434e10 /data/app/company.project-1/lib/arm/libUE4.so (_ZN13FMallocBinned7Private12FreeInternalERS_Pv+708)

SulXo,

  • Are you experiencing this in more than one project?
  • Can you reproduce it in a blank template?
  • Could you please provide me with the full logs?
  • Does this occur in 4.13 Preview 3?

If you’re able to get the package installed on the device, but the game crashes when launched from the application, please go through these steps to get the logs:

  • Attach your phone to the computer
  • Go here: C:\android-sdk-windows\tools
  • Open up Monitor.bat
  • Launch the program and save the logs

If you cannot get Monitor.bat to open, please go to:

  • C:\android-sdk-windows\tools\lib\monitor-x86
  • Open up Monitor.exe
  • Follow the instructions above

Make sure that you highlight all of the logs, because they do not save unless they’re highlighted.

Thank you!

I only tried in 4.12

I avoided the problem by packaging for Android(All) instead of Android(MultiETC1). It’s not a fix but it’s a workaround.
Weird thing is that in project settings I have unchecked all textures except ETC1, to the problem must be coming from some of the packaging settings.

I bet a blank project would work because my own project worked before I fiddled with some files in the build folder. (like the manifest). I’ll test it on 4.13 and see what the logs say

I tested the Android packaging builds on my PC and I’m not running into this issue, so it must be something project specific. You could try to delete the Intermediate, Saved and Config files and see if that fixes the issue. Keep in mind that the Config file will delete all configurations you may have changed in the project so some people don’t like to delete that folder.

I did that when I had the problem but it didn’t work.

I think it was because of a problem with plugins. I had disabled some to reduce the size of the app.
Since I reactivated one of them that seemed important as well as eliminating the “plugins[]” lines from the .project file in the project folder it now works. I think it was some online subsystems plugin.

I’ll report back if I encounter the problem again, I bet I will.