Recent

Author Topic: App Crash Problem only with Android 15  (Read 1401 times)

rafman

  • New Member
  • *
  • Posts: 10
App Crash Problem only with Android 15
« on: October 12, 2025, 01:44:03 am »
Hello Everyone I made an application with LAMW that runs smoothly with Android versions 8 until Android 14. (Tested on multiple devices)
with Android 15 (Redmi Note 13) the same APK Crash instantly after launch.

As Android 15 supports both 4 KB and 16 KB page sizes i suspect the the NDK version of LAMW.
I download the latest version of LAMW and the problem remains.

is this a Known Problem ? 
Has anyone faced the same issue with LAMW on Android 15 ?

nicelybrewed

  • New Member
  • *
  • Posts: 26
Re: App Crash Problem only with Android 15
« Reply #1 on: October 12, 2025, 10:30:15 am »
Using Lazarus v3.8 LAMW v0.8.6.4-blue on Android 15 here with NDK v22b (LAMW Manager) using a Samsung A14 and runs fine with my app built on older API/Android version, although recommend you create a new app add a button or something and see if that runs, that will rule out if it's something in your app causing an issue or something else.
Also copy the error that's generated by right clicking and 'Copy' > 'Copy All/Original Messages to clipboard' in the 'Messages' window, into Notepad or another text editor to see where the error is occurring, that's normally a good start to see what's happening.

Page size won't affect the app running, this is for Google Play compatibility.
« Last Edit: October 13, 2025, 08:30:32 am by nicelybrewed »
Lazarus v3.8, LAMW v0.8.6.4-blue, NDK v22b, Android 15, Windows 11 mainly but also use LAMW on Linux.

dseligo

  • Hero Member
  • *****
  • Posts: 1601
Re: App Crash Problem only with Android 15
« Reply #2 on: October 12, 2025, 12:59:44 pm »
Hello Everyone I made an application with LAMW that runs smoothly with Android versions 8 until Android 14. (Tested on multiple devices)
with Android 15 (Redmi Note 13) the same APK Crash instantly after launch.

As Android 15 supports both 4 KB and 16 KB page sizes i suspect the the NDK version of LAMW.
I download the latest version of LAMW and the problem remains.

is this a Known Problem ? 
Has anyone faced the same issue with LAMW on Android 15 ?

Try to debug with adb. Something like:
Code: Text  [Select][+][-]
  1. adb logcat --buffer=crash

Or save logs to file (you can stop it with Ctrl+C after crash):
Code: Text  [Select][+][-]
  1. adb logcat -v time > c:\temp\logfile.txt

rafman

  • New Member
  • *
  • Posts: 10
Re: App Crash Problem only with Android 15
« Reply #3 on: October 12, 2025, 01:22:40 pm »
The application had no issues with previous versions of Android (8 -14).
My device is: Redmi Note 13
My Application is : org.lamw.greenmanagerl

From the logcat i can see a
Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb400007692482ff8 in tid 32310 (w.greenmanagerl), pid 32310 (w.greenmanagerl) ....
...
repeated many times

I attach the crash.txt file from logcat. (on file crash.txt.zip)
« Last Edit: October 12, 2025, 01:31:18 pm by rafman »

Thaddy

  • Hero Member
  • *****
  • Posts: 18376
  • Here stood a man who saw the Elbe and jumped it.
Re: App Crash Problem only with Android 15
« Reply #4 on: October 12, 2025, 02:13:10 pm »
I know that there is now an alignment change, but I don't know if that was already the case for 15. It is now mandatory 16 byte. This an Android requirement not directly related to fpc.
« Last Edit: October 12, 2025, 02:17:40 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

rafman

  • New Member
  • *
  • Posts: 10
Re: App Crash Problem only with Android 15
« Reply #5 on: October 12, 2025, 02:36:08 pm »
FYI : I have created a new Application an empty form with just a button on it and I have the same Behavior on android 15 (instant crash on launch) --> on Android 14 everything works fine.
« Last Edit: October 12, 2025, 03:16:58 pm by rafman »

dseligo

  • Hero Member
  • *****
  • Posts: 1601
Re: App Crash Problem only with Android 15
« Reply #6 on: October 12, 2025, 05:13:32 pm »
FYI : I have created a new Application an empty form with just a button on it and I have the same Behavior on android 15 (instant crash on launch) --> on Android 14 everything works fine.

It is frustrating that even empty app doesn't work.

But it is probably more than just Android 15 (I have Android 15 on Samsung S23 and LAMW apps are working).

Do you have chipset set to Aarch64?
What is your 'Target SDK version'? Did you try to change it to see if it does any change?

I also have in my notes that I removed string 'android:name="androidx.multidex.MultiDexApplication"' from 'application' tag in AndroidManifest.xml file when I had crash problems.

rafman

  • New Member
  • *
  • Posts: 10
Re: App Crash Problem only with Android 15
« Reply #7 on: October 12, 2025, 06:05:50 pm »
It is frustrating that even empty app doesn't work.

But it is probably more than just Android 15 (I have Android 15 on Samsung S23 and LAMW apps are working).

Do you have chipset set to Aarch64?
What is your 'Target SDK version'? Did you try to change it to see if it does any change?

I also have in my notes that I removed string 'android:name="androidx.multidex.MultiDexApplication"' from 'application' tag in AndroidManifest.xml file when I had crash problems.

1> The chipset is set to: AARCH64
2> Target SDK is version: 35
3> Try removing: "androidx.multidex.MultiDexApplication" from Application tag  in AndroidManifest.xml has no effect.

4> all produced apps works on Android 14 on multiple devices
« Last Edit: October 12, 2025, 06:09:54 pm by rafman »

nicelybrewed

  • New Member
  • *
  • Posts: 26
Re: App Crash Problem only with Android 15
« Reply #8 on: October 12, 2025, 10:36:24 pm »
The logs you sent may point to a ForegroundService issue which has a new behaviour requirement in Android 15, but could also just be info, and not causing the actual segfault.
https://developer.android.com/about/versions/15/behavior-changes-15

Code: Pascal  [Select][+][-]
  1. 10-11 21:01:53.148  2538  9530 W ActivityManager: Foreground service started from background can not have location/camera/microphone access: service com.xiaomi.mipicks/com.xiaomi.market.service.AppActiveStatService
  2. 10-11 21:01:53.148  2538  9530 I ActivityManager: Background started FGS: Allowed [callingPackage: com.xiaomi.mipicks; callingUid: 10232; uidState: FGS ; uidBFSL: [BFSL]; intent: Intent { cmp=com.xiaomi.mipicks/com.xiaomi.market.service.AppActiveStatService }; code:PROC_STATE_FGS; tempAllowListReason:<,reasonCode:SYSTEM_ALLOW_LISTED,duration:9223372036854775807,callingUid:-1>; targetSdkVersion:35; callerTargetSdkVersion:35; startForegroundCount:0; bindFromPackage:null: isBindService:false]
  3. 10-11 21:01:53.148  2538  9530 W ForegroundServiceTypeLoggerModule: Foreground service start for UID: 10232 does not have any types
  4. 10-11 21:01:53.225 14391 14391 F libc    : Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb400007692482ff8 in tid 14391 (w.greenmanagerl), pid 14391 (w.greenmanagerl)

Send the debug logs for a fresh app with just a button, would be interesting to see, ensure no permissions are set on the new app too, see if the segfault occurs with no permissions set and just a basic component.

FYI : I have created a new Application an empty form with just a button on it and I have the same Behavior on android 15 (instant crash on launch) --> on Android 14 everything works fine.
Lazarus v3.8, LAMW v0.8.6.4-blue, NDK v22b, Android 15, Windows 11 mainly but also use LAMW on Linux.

rafman

  • New Member
  • *
  • Posts: 10
Re: App Crash Problem only with Android 15
« Reply #9 on: October 13, 2025, 03:02:00 am »
The logs you sent may point to a ForegroundService issue which has a new behaviour requirement in Android 15, but could also just be info, and not causing the actual segfault.
https://developer.android.com/about/versions/15/behavior-changes-15

Send the debug logs for a fresh app with just a button, would be interesting to see, ensure no permissions are set on the new app too, see if the segfault occurs with no permissions set and just a basic component.

FYI : I have created a new Application an empty form with just a button on it and I have the same Behavior on android 15 (instant crash on launch) --> on Android 14 everything works fine.

The Apllication Name is : applamwproject2 (new application with just a button )
The chipset is set to: AARCH64

the App is running fine on Android 14


I attach the logcat  on file messages.txt.zip

however the source of problem is the same.
Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb400007692482ff8 in tid 24959 (applamwproject2), pid 24959 (applamwproject2)

and it happens when libcontrols.so is attempt to be loaded.

10-13 03:27:42.553 24986 24986 F DEBUG   : backtrace:
10-13 03:27:42.553 24986 24986 F DEBUG   :       #00 pc 0000000000046074  /data/app/~~t6uZCHCqPgY4p5aAnb2sOA==/org.lamw.applamwproject2-WoN_zDsgG-BcA_4ySNLQeg==/lib/arm64/libcontrols.so (BuildId: d18c6778ab2cf0befb00244a902b053646432242)

FYI:
A "Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR)" error is a segmentation fault that means a program is trying to access a memory location it doesn't have permission to access. This often happens due to a bug in the code, such as trying to access an invalid memory address, a corrupted pointer, or a data type issue, but it can also be related to hardware memory problems or specific system configurations.

If I use a non NDK app from Android Studio it runs fine on Android 15, for this reason I suspect the NDK and possibly the Gradle version of LAMW.
« Last Edit: October 13, 2025, 03:15:33 am by rafman »

nicelybrewed

  • New Member
  • *
  • Posts: 26
Re: App Crash Problem only with Android 15
« Reply #10 on: October 13, 2025, 08:17:39 am »
You probably need to let us know what your operating environment is.

- OS
- Memory
- LAMW Version e.g. v0.8.6.4
- Lazarus version e.g. v3.8
- Gradle version e.g. v8.5
- Java version e.g. v21
- Exact NDK version? e.g. v22b
- I'm assuming android-35 is in you SDK platforms directory

Check paths in Lazarus: Tools > [LAMW] Android Module Wizard > Path settings    this will help getting the exact versions.

That being said, I think you're possibly looking at a reinstall of LAMW, I recommend a reinstall of LAMW using LAMW_Manager:

- LAMW Manager Linux - https://github.com/dosza/LAMWManager-linux
- LAMW Manager Windows - https://github.com/dosza/LAMWManager-win
« Last Edit: October 13, 2025, 08:21:59 am by nicelybrewed »
Lazarus v3.8, LAMW v0.8.6.4-blue, NDK v22b, Android 15, Windows 11 mainly but also use LAMW on Linux.

dseligo

  • Hero Member
  • *****
  • Posts: 1601
Re: App Crash Problem only with Android 15
« Reply #11 on: October 13, 2025, 11:09:25 am »
Please send also AndroidManifest.xml from the new application (the one with just a button).

Since it works on Android 15 on my phone (and probably a few others), I think there is something wrong with your setup. Maybe some permissions as @nicelybrewed said.

P.S.: My son just tried my app and it works on his phone with Android 16.

rafman

  • New Member
  • *
  • Posts: 10
Re: App Crash Problem only with Android 15
« Reply #12 on: October 13, 2025, 12:44:13 pm »
Please send also AndroidManifest.xml from the new application (the one with just a button).

Since it works on Android 15 on my phone (and probably a few others), I think there is something wrong with your setup. Maybe some permissions as @nicelybrewed said.

P.S.: My son just tried my app and it works on his phone with Android 16.

I Upload the AndroidManifest.xml and the APK (AppLAMWProject2-arm64-v8a-debug.apk.zip)(Tested and it works on Android 14 but not on Android 15)

Unfortunately I can't upload the compressed APK directly Here due to site restrictions (size 4.40mb) compressed

My APK is uploaded Here: https://limewire.com/d/tW7nO#0xR7miggvf

Download it and test it on Android 15+

NOTE:
For everyone who has Android 15+ Please Test the uploaded APK on your device. It will be very useful in order to verify that is not a Phone / Device configuration specific Problem  but but an Android 15 OS problem.

PS: I searched the internet and lot of people have app crashing problems with Android 15.
« Last Edit: October 13, 2025, 01:21:02 pm by rafman »

dseligo

  • Hero Member
  • *****
  • Posts: 1601
Re: App Crash Problem only with Android 15
« Reply #13 on: October 13, 2025, 01:28:17 pm »
Download it and test it on Android 15+

NOTE:
For everyone who has Android 15+ Please Test the uploaded APK on your device. It will be very useful in order to verify that is not a Phone / Device configuration specific Problem  but but an Android 15 OS problem.

It works on my phone, screenshots attached.

rafman

  • New Member
  • *
  • Posts: 10
Re: App Crash Problem only with Android 15
« Reply #14 on: October 13, 2025, 01:54:20 pm »
Download it and test it on Android 15+

NOTE:
For everyone who has Android 15+ Please Test the uploaded APK on your device. It will be very useful in order to verify that is not a Phone / Device configuration specific Problem  but but an Android 15 OS problem.

It works on my phone, screenshots attached.

Thank you for your feedback, so probably the problem is Device oriented,  maybe an other app cause memory leaks or something in the specific device configuration causes the problem.
I will investigate the problem further.

Thanks a lot for your feedback.

 

TinyPortal © 2005-2018