jImageView Cause App Crash lazarus / 43-Android ---------------------------------------------------------------------- Sirius Black · 2020-04-04 03:50 Hi Guys, I tried to create new sample app using the same method of the sample "App Compat Navigation Drawer Demo1" Everything is working normally when I used jButton or jImageButton. But app always crash if I using jImageView as a button. I replace the jButton with the jImageView  in order to swith another panel (just like the demo), and when I click the jImageView the app will stopped. I tried to see the log cat, and here are the logs: Code: [Select]04-04 08:53:32.038  1628  2272 D WindowManager: Input focus has changed to Window{1a011f5 u0 org.lamw.applamwproject3/org.lamw.applamwproject3.App} 04-04 08:53:32.074  1628  1792 I ActivityTaskManager: Displayed org.lamw.applamwproject3/.App: +306ms 04-04 08:53:32.141  1628  1741 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{678ada3 u0 org.lamw.applamwproject3/.App t73207} time:77922603 04-04 08:53:36.392 17527 17527 F DEBUG   : pid: 17450, tid: 17450, name: applamwproject3  >>> org.lamw.applamwproject3 <<< 04-04 08:53:36.393 17527 17527 F DEBUG   :       #00 pc 000000000003bc9c  /data/app/org.lamw.applamwproject3- x4r7abcg__4KYfJExJWqtg==/lib/arm64/libcontrols.so (BuildId: aa275db9e290e5b1a1ff69d3d26e9050b0e1b410) 04-04 08:53:36.697  1628 17530 W ActivityTaskManager:   Force finishing activity org.lamw.applamwproject3/.App 04-04 08:53:36.710  1628  2114 W InputDispatcher: channel '1a011f5 org.lamw.applamwproject3/org.lamw.applamwproject3.App (server)' ~ Consumer closed input channel or an error occurred.  events=0x9 04-04 08:53:36.710  1628  2114 E InputDispatcher: channel '1a011f5 org.lamw.applamwproject3/org.lamw.applamwproject3.App (server)' ~ Channel is unrecoverably broken and will be disposed! 04-04 08:53:36.711  1628  2747 I ActivityManager: Process org.lamw.applamwproject3 (pid 17450) has died: vis TOP 04-04 08:53:36.712  1628  5063 I WindowManager: WIN DEATH: Window{1a011f5 u0 org.lamw.applamwproject3/org.lamw.applamwproject3.App} 04-04 08:53:36.712  1628  5063 W InputDispatcher: Attempted to unregister already unregistered input channel '1a011f5 org.lamw.applamwproject3/org.lamw.applamwproject3.App (server)' when the error occured, the log cat display: Code: [Select]04-04 08:53:36.710  1628  2114 W InputDispatcher: channel '1a011f5 org.lamw.applamwproject3/org.lamw.applamwproject3.App (server)' ~ Consumer closed input channel or an error occurred.  events=0x9 04-04 08:53:36.710  1628  2114 E InputDispatcher: channel '1a011f5 org.lamw.applamwproject3/org.lamw.applamwproject3.App (server)' ~ Channel is unrecoverably broken and will be disposed! I attached the .pas dan .lfm files ---------------------------------------------------------------------- DonAlfredo · 2020-04-04 05:22 I just compiled your app. API 26. Works as expected. No crash when using image or button to get menu2. I added this line to show more info: 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 procedure TAndroidModule1.ivmenuClick(Sender: TObject);begin  Menu2;  AndroidModule2.jTextView1.SetText('Got here by imageview');end; ---------------------------------------------------------------------- Sirius Black · 2020-04-04 05:38 I'm using API 28 with aarch64. Can it cause the problem? Btw, have you tried several time? close the app, and running again for several times ---------------------------------------------------------------------- DonAlfredo · 2020-04-04 05:53 No problem on aarch64. Here is my apk: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/patc hes_v1.0/AppLAMWProject23-arm64-v8a-debug.apk if you want to try for yourself. ---------------------------------------------------------------------- Sirius Black · 2020-04-04 06:05 Thanks for the APK. I tried to run it on my phone (mi 9), but it still force close. I attached the screenshots ---------------------------------------------------------------------- DonAlfredo · 2020-04-04 06:16 Mmmm ... I am running on Android 8. You are running on Android 9. Both aarch64. (nice phone btw) The apk is build with API28. For me, the crash is a mystery. There are no permissions involved. So, we need a better crash log. I am using monitor.bat, located here: C:\.......\AppData\Local\Android\Sdk\tools\monitor.bat ---------------------------------------------------------------------- Sirius Black · 2020-04-04 06:49 Quote from: DonAlfredo on April 04, 2020, 08:16:04 am(nice phone btw) thank you  Quote from: DonAlfredo on April 04, 2020, 08:16:04 amThe apk is build with API28. For me, the crash is a mystery. There are no permissions involved. So, we need a better crash log. I am using monitor.bat, located here: C:\.......\AppData\Local\Android\Sdk\tools\monitor.bat how to use it? ---------------------------------------------------------------------- DonAlfredo · 2020-04-04 06:59 You need the logcat. See screenshot included. ---------------------------------------------------------------------- Sirius Black · 2020-04-04 07:33 Since I can't run monitor.bat, so I grab the logcat from adb shell, here are the results ---------------------------------------------------------------------- DonAlfredo · 2020-04-04 08:03 I am sorry, but this is by far not enough debug-info (for me). The info must contain (detailed) messages about the null-pointer and more. ---------------------------------------------------------------------- Sirius Black · 2020-04-04 08:13 so that's mean I have to grab all the logcat information without filter the app only? ---------------------------------------------------------------------- DonAlfredo · 2020-04-04 09:03 Yes. All the red lines, without filtering !! ---------------------------------------------------------------------- Sirius Black · 2020-04-04 09:38 I attached the logcat file. Is this contain the information that you need? thanks ---------------------------------------------------------------------- DonAlfredo · 2020-04-04 10:04 That is a good log ! Now the next step. I have made a debug-apk of your app. https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/patc hes_v1.0/AppLAMWProject23-arm64-v8a-debug.apk Install and run it. Show this type of log-lines: 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 04-04 16:32:07.623 23884 23884 I crash_dump64: performing dump of process 22667 (target tid = 22667)04-04 16:32:07.628 23884 23884 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***04-04 16:32:07.628 23884 23884 F DEBUG   : Build fingerprint: 'Xiaomi/cepheu s_eea/cepheus:10/QKQ1.190825.002/V11.0.8.0.QFAEUXM:user/release- keys'04-04 16:32:07.628 23884 23884 F DEBUG   : Revision: '0'04-04 16:32:07.628 23884 23884 F DEBUG   : ABI: 'arm64'04-04 16:32:07.628 23884 23884 F DEBUG   : Timestamp: 2020-04-04 16:32:07+070004-04 16:32:07.628 23884 23884 F DEBUG   : pid: 22667, tid: 22667, name: pplamwproject23  >>> org.lamw.applamwproject23 <<<04-04 16:32:07.628 23884 23884 F DEBUG   : uid: 1049204-04 16:32:07.628 23884 23884 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x904-04 16:32:07.628 23884 23884 F DEBUG   : Cause: null pointer dereference04-04 16:32:07.628 23884 23884 F DEBUG   :     x0  0000000000000001  x1  b967c15efe884b89  x2  0000000000000000  x3  0000007204a4aa2704-04 16:32:07.628 23884 23884 F DEBUG   :     x4  0000007204a4a924  x5  0000000000000000  x6  0000007204a4a924  x7  000000000000000004-04 16:32:07.628 23884 23884 F DEBUG   :     x8  0000007fea05e948  x9  b967c15efe884b89  x10 0000000000430000  x11 0000007203fa31dc ---------------------------------------------------------------------- Sirius Black · 2020-04-04 10:27 Here is the logcat for the debug-apk 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 04-04 17:22:36.473 29866 29866 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x9 in tid 29866 (pplamwproject23), pid 29866 (pplamwproject23)04-04 17:22:36.570 30706 30706 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone04-04 17:22:36.571  1275  1275 I /system/bin/tombstoned: received crash request for pid 2986604-04 17:22:36.572 30706 30706 I crash_dump64: performing dump of process 29866 (target tid = 29866)04-04 17:22:36.577 30706 30706 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***04-04 17:22:36.577 30706 30706 F DEBUG : Build fingerprint: 'Xiaomi/cepheus_eea/cepheus:10/QKQ1.190825.002/V 11.0.8.0.QFAEUXM:user/release-keys'04-04 17:22:36.577 30706 30706 F DEBUG   : Revision: '0'04-04 17:22:36.577 30706 30706 F DEBUG   : ABI: 'arm64'04-04 17:22:36.577 30706 30706 F DEBUG   : Timestamp: 2020-04-04 17:22:36+070004-04 17:22:36.577 30706 30706 F DEBUG   : pid: 29866, tid: 29866, name: pplamwproject23  >>> org.lamw.applamwproject23 <<<04-04 17:22:36.577 30706 30706 F DEBUG   : uid: 1049204-04 17:22:36.577 30706 30706 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x904-04 17:22:36.577 30706 30706 F DEBUG   : Cause: null pointer dereference04-04 17:22:36.577 30706 30706 F DEBUG   :     x0  0000000000000001  x1  b967c15efe884b89  x2  0000000000000000  x3  0000007204a4aa2704-04 17:22:36.577 30706 30706 F DEBUG   :     x4  0000007204a4a924  x5  0000000000000000  x6  0000007204a4a924  x7  000000000000000004-04 17:22:36.577 30706 30706 F DEBUG   :     x8  0000007fea05eff8  x9  b967c15efe884b89  x10 0000000000430000  x11 0000007203fa31dc04-04 17:22:36.577 30706 30706 F DEBUG   :     x12 0000007203fa3224  x13 0000007203fa326c  x14 0000007203fa32cc  x15 000000000000000004-04 17:22:36.577 30706 30706 F DEBUG   :     x16 0000007fea05f740  x17 0000000000000000  x18 000000728af52000  x19 0000007fea05e8d804-04 17:22:36.577 30706 30706 F DEBUG   :     x20 0000007fea05e8e0  x21 0000000000000001  x22 000000719c4b7a58  x23 0000007204a4aa4004-04 17:22:36.577 30706 30706 F DEBUG   :     x24 00000071fb6774b0  x25 0000007289d3a020  x26 0000007205069cb0  x27 000000000000000404-04 17:22:36.577 30706 30706 F DEBUG   :     x28 0000000000000005  x29 0000007fea05e8c004-04 17:22:36.577 30706 30706 F DEBUG   :     sp  0000007fea05e8a0  lr  000000719c41025c  pc  000000719c4069dc04-04 17:22:36.578 30706 30706 F DEBUG   :04-04 17:22:36.578 30706 30706 F DEBUG   : backtrace:04-04 17:22:36.578 30706 30706 F DEBUG   :       #00 pc 000000000003d9dc  /data/app/org.lamw.applamwproject23-- MrpdCzAYydbf2NoLxRE5w==/lib/arm64/libcontrols.so (BuildId: 04624591f5928e1875d99b4f861a290b7b5bafce)04-04 17:22:36.788   563   563 I chatty  : uid=1000(system) hwservicemanage expire 16 lines04-04 17:22:37.057 30706 30706 E crash_dump64: cannot open libmiuindbg.so: No such file or directory04-04 17:22:37.059  1275  1275 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_09 ---------------------------------------------------------------------- DonAlfredo · 2020-04-04 11:44 Mmmmm ... due to debug-info included into the Android library, I expect much more debug-info. What is shown in this post does not help me at all (its the same info as the previous one). Perhaps you can send the whole log again, for me to look through. ---------------------------------------------------------------------- Sirius Black · 2020-04-04 11:46 Ok, Here is the logcat file. Thanks