App Crash Problem only with Android 15 lazarus / 43-Android ---------------------------------------------------------------------- rafman · 2025-10-11 23:44 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 · 2025-10-12 08:30 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. ---------------------------------------------------------------------- dseligo · 2025-10-12 10:59 Quote from: rafman on October 12, 2025, 01:44:03 amHello 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i adb logcat --buffer=crash Or save logs to file (you can stop it with Ctrl+C after crash): Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i adb logcat -v time > c:\temp\logfile.txt ---------------------------------------------------------------------- rafman · 2025-10-12 11:22 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) ---------------------------------------------------------------------- Thaddy · 2025-10-12 12:13 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. ---------------------------------------------------------------------- rafman · 2025-10-12 12:36 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. ---------------------------------------------------------------------- dseligo · 2025-10-12 15:13 Quote from: rafman on October 12, 2025, 02:36:08 pmFYI : 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 · 2025-10-12 16:05 Quote from: dseligo on October 12, 2025, 05:13:32 pmIt 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 ---------------------------------------------------------------------- nicelybrewed · 2025-10-12 20:36 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 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.AppActiveStatService10-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]10-11 21:01:53.148  2538  9530 W ForegroundServiceTypeLoggerModule: Foreground service start for UID: 10232 does not have any types10-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. Quote from: rafman on October 12, 2025, 02:36:08 pmFYI : 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. ---------------------------------------------------------------------- rafman · 2025-10-13 01:02 Quote from: nicelybrewed on October 12, 2025, 10:36:24 pmThe 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. Quote from: rafman on October 12, 2025, 02:36:08 pmFYI : 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.applam wproject2-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. ---------------------------------------------------------------------- nicelybrewed · 2025-10-13 06:17 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 ---------------------------------------------------------------------- dseligo · 2025-10-13 09:09 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 · 2025-10-13 10:44 Quote from: dseligo on October 13, 2025, 11:09:25 amPlease 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. ---------------------------------------------------------------------- dseligo · 2025-10-13 11:28 Quote from: rafman on October 13, 2025, 12:44:13 pmDownload 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 · 2025-10-13 11:54 Quote from: dseligo on October 13, 2025, 01:28:17 pmQuote from: rafman on October 13, 2025, 12:44:13 pmDownload 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. ---------------------------------------------------------------------- nobody.00 · 2025-10-14 17:25 Hello, I need some info about this, Do you use: lamw_manager (windows or linux)  or other ? ---------------------------------------------------------------------- rafman · 2025-10-14 22:11 Quote from: nobody.00 on October 14, 2025, 07:25:17 pmHello, I need some info about this, Do you use: lamw_manager (windows or linux)  or other ? Hello I am using latest LAMW Manager on Linux. However I resolve The Problem source,  is my Device (Redmi None 13) Not an android 15 or LAMW NDK problem. I check the the Application On other Phones with Android 15 and it works without issues. Probably some other App on my phone make memory problems  during the time I need to find it. ---------------------------------------------------------------------- nobody.00 · 2025-10-15 12:25 I did a brief analysis of your APK. You're using compressed libs, and this can cause errors: To resolve this, you need to update AGP to >= 8.5.1. Check your build.gradle to see if there's a legacyPackaging option. This should be removed.