ReinhardPrix / FreedroidClassic

The original Freedroid, a free & open-source clone of the C64 classic 'Paradroid'.
GNU General Public License v2.0
39 stars 6 forks source link

Android App 1.2.2 crashes on older Android (7, 8) versions #40

Closed ZebsTheCat closed 9 months ago

ZebsTheCat commented 11 months ago

Version 1.2.2 crashes on launch. SDL splash shows then app throws "Freedroids keeps stoppng" message.

Phone is Galaxy A7 runnig Android 8.

Asking for 9yo who I got obsessed with this Andrew Braybrook classic.

ReinhardPrix commented 11 months ago

@ZebsTheCat thank you for the report. So just making sure: the Freedroid app worked fine on that same Android Phone before the recent app-upgrade?

ZebsTheCat commented 11 months ago

Yes, Freedroid app worked fine until the update a few weeks ago. It crashes straight after the SDL splash screen. It is an older phone, so understand that it is no longer supported.

ReinhardPrix commented 11 months ago

According to the play-store developer console, this phone+Android version is still considered 'supported' for this app though, so something else seems to be going wrong.

ReinhardPrix commented 10 months ago

Progress! I've found an old phone with Android 7.1 and could reproduce the crash there! Should then hopefully make it possible to find and fix the bug :crossed_fingers:

ReinhardPrix commented 10 months ago

Ok, just to document the origin for the crash and fixes for myself:

Running the app on Android 7, adb logcat shows:

AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "inflateValidate" referenced by "/data/app/net.sourceforge.freedroid-2/lib/arm64/libsdl_image.so"

and digging further shows that newer libpng versions rely on newer (>1.2.8) version of zlib, due to using symbol inflateValidate, which older zlib versions didn't have. Older Androids versions 7, 8 seem to have an older zlib version installed which is why the newer dependency does not get resolved and crashes.

Easiest solution I found was to downgrade to libpng version 1.2.25, which didn't use that newer-zlib functionality, and therefore seems to work fine even on the old Android 7.1.2 phone I tested this one.

This was done checking out tag v1.6.25 of libpng and providing a suitable Android.mk file to make the build work.

Bug-fix release Freedroid-1.2.3 is being prepared.

ReinhardPrix commented 9 months ago

My own testing and user feedback so far indicates the problem is fixed in v1.2.3, so closing the issue.