[Galaxy A3, A5, A7, A8, A9 Original Android Develop] impasta:
Thank you so much!

Honestly, I have given up trying to get a log for this. As for us here, it seems that few people (or maybe just me) who use A72016 and have encountered this (hence the lack of reports?)

It always hits me in the least fortunate time when it is not possible to extract some meaningful logs. It also happens so rarely like once every 2-3 months.

That has been the case for the last few months until I've tried building the unofficial LineageOS 18.1 for a7xelte which lets me experience that random crash everyday. The backtrace is quite similar to this one but it straight out pointed it as:

F DEBUG : Cause: null pointer dereference

Anyways, is it okay if I could I test this for personal use? I really hope your solution could prevent further crashes.

Also, If anyone would like to see the logs, I've pasted it below.

It might be on LineageOS 18.1 but I believe the semantics are similar:

10-13 15:18:00.731 2868 2868 W ConstraintSet: id unknown center_vertical_guideline
10-13 15:18:00.731 2868 2868 W ConstraintSet: id unknown media_action_barrier
10-13 15:18:00.731 2868 2868 W ConstraintSet: id unknown media_text
10-13 15:18:00.731 2868 2868 W ConstraintSet: id unknown remove_text
10-13 15:18:00.731 2868 2868 W ConstraintSet: id unknown settings
10-13 15:18:00.732 2868 2868 W ConstraintSet: id unknown cancel
10-13 15:18:00.732 2868 2868 W ConstraintSet: id unknown dismiss
10-13 15:19:26.336 26013 26116 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=0ee2b290-7b84-496d-be02-1d88b8004137, tags={ com.reddit.frontpage.sync.ExperimentsSyncWorker } ]
10-13 15:19:53.677 26013 26024 W eddit.frontpag: Reducing the number of considered missed Gc histogram windows from 545 to 100
10-13 15:20:13.186 2691 4640 I bsthal : bhy_batch: handle=49, flags=0, period_ns=1000000, timeout=0
10-13 15:20:13.186 2691 4640 D bsthal : Replace period_ns to maxDelay = 0
10-13 15:20:13.186 2691 4640 D bsthal : Replace timeout to 0
10-13 15:20:13.266 2691 2706 I bsthal : bhy_batch: handle=1, flags=0, period_ns=20000000, timeout=0
10-13 15:20:13.266 2691 2706 D bsthal : Replace timeout to 0
10-13 15:20:13.271 2691 2706 I bsthal : bhy_flush: handle=1
10-13 15:20:13.271 2691 2706 I bsthal : Sensor [1] flush complete.
10-13 15:20:13.281 2691 2706 I Sensors : LightSensor(4) setDelay : 200000000(ns)
10-13 15:20:13.281 2691 2706 I Sensors : LightSensor enable: mEnabled 0, handle 4, en 1
10-13 15:20:13.287 2691 2770 I bsthal : Sensor [1] sample rate changed, type is 254
10-13 15:20:13.291 3432 9779 D BluetoothAdapter: isLeEnabled(): ON
10-13 15:20:13.293 2845 3349 I bt_stack: [INFO:gatt_api.cc(947)] GATT_Register 8b916a0a-3365-7fe7-df39-e969f144dea6
10-13 15:20:13.293 2845 3349 I bt_stack: [INFO:gatt_api.cc(967)] allocated gatt_if=6
10-13 15:20:13.293 3432 4127 D BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=6 mScannerId=0
10-13 15:20:15.672 2482 2654 D AF::Track: interceptBuffer: took 1160us to intercept 0 tracks
10-13 15:20:16.513 2482 2654 D AF::Track: interceptBuffer: took 3598us to intercept 0 tracks
10-13 15:20:16.699 2691 2706 I Sensors : LightSensor enable: mEnabled 1, handle 4, en 0
10-13 15:20:16.702 2691 2706 I bsthal : bhy_batch: handle=1, flags=0, period_ns=160000000, timeout=0
10-13 15:20:16.702 2691 2706 D bsthal : Replace timeout to 0
10-13 15:20:16.857 2691 2770 I bsthal : Sensor [1] sample rate changed, type is 254
10-13 15:20:17.323 3432 9779 D BluetoothAdapter: isLeEnabled(): ON
10-13 15:20:25.627 2691 2770 D bsthal : BOSCH Tilt Detector Sensor data
10-13 15:20:25.643 2691 2706 I bsthal : bhy_activate: handle=54, enabled=0
10-13 15:20:26.301 2691 2775 D MediaSessionService: dispatchVolumeKeyEvent, pkg=android, opPkg=android, pid=2691, uid=1000, asSystem=false, event=KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_VOLUME_DOWN, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, source=0x0, displayId=0 }, stream=-2147483648, musicOnly=true
10-13 15:20:26.301 2691 2775 D MediaSessionService: Adjusting com.poupa.vinylmusicplayer/VinylMusicPlayer (userId=0) by -1. flags=4608, suggestedStream=-2147483648, preferSuggestedStream=false
10-13 15:20:26.364 2868 3222 I vol.Events: writeEvent level_changed STREAM_MUSIC 4
10-13 15:20:26.365 2868 3222 I vol.Events: writeEvent key STREAM_MUSIC 4
10-13 15:20:26.377 2845 29807 D BluetoothDatabase: getBondedDevicesOrdered: Invalid address for device LocalStorage
10-13 15:20:26.379 2868 19260 E CachedBluetoothDevice: no BCProfileClass: exists
10-13 15:20:26.383 2868 19260 I chatty : uid=10118(com.android.systemui) identical 5 lines
10-13 15:20:26.384 2868 19260 E CachedBluetoothDevice: no BCProfileClass: exists
10-13 15:20:26.693 2482 2654 D AF::Track: interceptBuffer: took 3272us to intercept 0 tracks
10-13 15:20:26.988 3812 10177 I ConnectivityReport: signalStrength of #1 updated to 4
10-13 15:20:32.113 3812 10177 I ConnectivityReport: signalStrength of #1 updated to 4
10-13 15:20:33.391 3812 10177 I ConnectivityReport: signalStrength of #1 updated to 3
10-13 15:20:35.947 3812 10177 I chatty : uid=10219(org.kde.kdeconnect_tp) identical 2 lines
10-13 15:20:37.237 3812 10177 I ConnectivityReport: signalStrength of #1 updated to 3
10-13 15:20:38.311 2482 2654 D AF::Track: interceptBuffer: took 1049us to intercept 0 tracks
10-13 15:20:39.774 3812 10177 I ConnectivityReport: signalStrength of #1 updated to 3
10-13 15:20:40.163 2691 2770 D bsthal : Samsung Significant Motion Sensor data
10-13 15:20:40.206 2691 2708 W GnssHAL_GnssInterface: setCallback called more than once. Unexpected unless test.
10-13 15:20:40.206 2691 2708 D GnssLocationProvider: gnssSetCapabilitesCb: 6u
10-13 15:20:40.222 2530 2530 D gpsd : WakeLock(Acquire,GPSD)
10-13 15:20:40.222 2530 2530 D gpsd : WakeLock(Release,GPSD)
10-13 15:20:40.223 2691 3063 D libgps : proxy__set_system_info_cb: called.
10-13 15:20:40.223 2691 3063 D GnssLocationProvider: gnssSetSystemInfoCb: yearOfHw=0
10-13 15:20:40.223 2691 3063 I libgps : proxy__gps_set_capabilities_cb: capabilities=0x06
10-13 15:20:40.200 2359 2359 W auditd : type=1325 audit(0.0:9205): table=filter family=2 entries=357
10-13 15:20:40.200 2359 2359 W auditd : type=1320 audit(0.0:9205):
10-13 15:20:40.260 2359 2359 W auditd : type=1325 audit(0.0:9206): table=filter family=10 entries=368
10-13 15:20:40.223 2691 3063 D GnssLocationProvider: gnssSetCapabilitesCb: 6u
10-13 15:20:40.223 2691 3063 V GnssLocationProvider: Converting IPv4 address byte array (net_order) 0
10-13 15:20:40.223 2691 3063 D GnssLocationProvider: AGPS IP is v4: 0.0.0.0
10-13 15:20:40.223 2691 3063 V GnssLocationProvider: Passing AGPS IP addr: size 4
10-13 15:20:40.225 2691 2708 D libgps : [proxy__gps_init][line = 1072]: called.
10-13 15:20:40.225 2691 2708 I GnssLocationProvider: Unable to initialize IGnssGeofencing interface.
10-13 15:20:40.225 2691 2708 I GnssLocationProvider: Unable to find IMeasurementCorrections.
10-13 15:20:40.225 2691 2708 I libgps : Save: type=1, hostname=supl.google.com, port=7275, ssl=0, ssl_version=0, ssl_type=0
10-13 15:20:40.225 2691 2708 E GnssBatchingProvider: Failed to initialize GNSS batching
10-13 15:20:40.244 2868 2868 D KeyguardClockSwitch: Updating clock: 3:20
10-13 15:20:40.260 2359 2359 W auditd : type=1320 audit(0.0:9206):
10-13 15:20:40.333 2691 2708 I GnssLocationProvider: restartRequests
10-13 15:20:40.333 2691 2708 I GnssLocationProvider: restartRequests
10-13 15:20:40.566 2691 4640 W system_server: Long monitor contention with owner android.bg (2718) at java.lang.String com.android.server.pm.PackageManagerService.getInstantAppPackageName(int)(PackageManagerService.java:7208) waiters=0 in int com.android.server.pm.permission.PermissionManagerService.checkUidPermission(java.lang.String, int) for 222ms
10-13 15:20:40.568 2691 3817 W system_server: Long monitor contention with owner android.bg (2718) at java.lang.String com.android.server.pm.PackageManagerService.getInstantAppPackageName(int)(PackageManagerService.java:7208) waiters=1 in int com.android.server.pm.permission.PermissionManagerService.checkUidPermission(java.lang.String, int) for 227ms
10-13 15:20:40.583 2691 10678 W system_server: Long monitor contention with owner android.bg (2718) at java.lang.String com.android.server.pm.PackageManagerService.getInstantAppPackageName(int)(PackageManagerService.java:7208) waiters=2 in boolean com.android.server.pm.PackageManagerService$PackageManagerInternalImpl.isPermissionsReviewRequired(java.lang.String, int) for 221ms
10-13 15:20:40.590 2691 8527 W system_server: Long monitor contention with owner android.bg (2718) at java.lang.String com.android.server.pm.PackageManagerService.getInstantAppPackageName(int)(PackageManagerService.java:7208) waiters=3 in int com.android.server.pm.PackageManagerService.getPackageUidInternal(java.lang.String, int, int, int) for 242ms
10-13 15:20:40.637 2691 4637 I bsthal : bhy_batch: handle=1, flags=0, period_ns=20000000, timeout=0
10-13 15:20:40.637 2691 4637 D bsthal : Replace timeout to 0
10-13 15:20:40.639 2691 4637 I bsthal : bhy_flush: handle=1
10-13 15:20:40.640 2691 4637 I bsthal : Sensor [1] flush complete.
10-13 15:20:40.659 2691 2770 I bsthal : Sensor [1] sample rate changed, type is 254
10-13 15:20:40.679 2526 2539 I adbd : jdwp connection from 21242
10-13 15:20:40.763 21242 21242 D ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
10-13 15:20:40.773 21242 21242 I com.whatsapp: The ClassLoaderContext is a special shared library.
10-13 15:20:40.962 21259 21259 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
10-13 15:20:40.984 2442 2442 I tombstoned: received crash request for pid 3063
10-13 15:20:41.000 21259 21259 I crash_dump32: performing dump of process 2691 (target tid = 3063)
10-13 15:20:41.017 21242 21242 D NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: false
10-13 15:20:41.024 21242 21242 D NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: false
10-13 15:20:41.066 21242 21242 I MultiDex: Installing application
10-13 15:20:41.066 21242 21242 I MultiDex: VM with version 2.1.0 has multidex support
10-13 15:20:41.066 21242 21242 I MultiDex: VM has multidex support, MultiDex support library is disabled.
10-13 15:20:41.072 3432 20762 I GCoreUlr: Successfully inserted 1 locations [CONTEXT service_id=22 ]

10-13 15:20:41.104 21259 21259 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-13 15:20:41.105 21259 21259 F DEBUG : LineageOS Version: '18.1-20211011-UNOFFICIAL-a7xelte'
10-13 15:20:41.105 21259 21259 F DEBUG : Build fingerprint: 'samsung/a7xeltedo/a7xelte:6.0.1/MMB29K/A710YZTU1BQK2:user/release-keys'
10-13 15:20:41.105 21259 21259 F DEBUG : Revision: '0'
10-13 15:20:41.105 21259 21259 F DEBUG : ABI: 'arm'
10-13 15:20:41.111 21259 21259 F DEBUG : Timestamp: 2021-10-13 15:20:41+0800
10-13 15:20:41.111 21259 21259 F DEBUG : pid: 2691, tid: 3063, name: Thread-8 >>> system_server <<<
10-13 15:20:41.111 21259 21259 F DEBUG : uid: 1000
10-13 15:20:41.111 21259 21259 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10
10-13 15:20:41.111 21259 21259 F DEBUG : Cause: null pointer dereference
10-13 15:20:41.112 21259 21259 F DEBUG : r0 00000000 r1 00000009 r2 aaabdba4 r3 aaabddd9
10-13 15:20:41.112 21259 21259 F DEBUG : r4 698d9324 r5 e43de124 r6 aaa44a78 r7 80000000
10-13 15:20:41.112 21259 21259 F DEBUG : r8 00000000 r9 aaabdba4 r10 aaac09a0 r11 e43de124
10-13 15:20:41.112 21259 21259 F DEBUG : ip aab39260 sp aaa44a28 lr aaad64b7 pc e58ae294
10-13 15:20:41.185 21259 21259 F DEBUG : backtrace:
10-13 15:20:41.185 21259 21259 F DEBUG : #00 pc 00049294 /system/lib/libhidlbase.so (std::__1::function<void (android::hardware::details::HidlInstrumentor::InstrumentationEvent, char const*, char const*, char const*, char const*, std::__1::vector<void*, std::__1::allocator<void*> >*)>::operator()(android::hardware::details::HidlInstrumentor::InstrumentationEvent, char const*, char const*, char const*, char const*, std::__1::vector<void*, std::__1::allocator<void*> >*) const+20) (BuildId: efc477e860f7d6c14c3deaccf8da9b2e)
10-13 15:20:41.185 21259 21259 F DEBUG : #01 pc 000564b3 /system/lib/android.hardware.gnss@1.0.so (android::hardware::gnss::V1_0::BsAGnssRilCallback::requestSetIdCb(unsigned int)+378) (BuildId: 829b7668af484ef683bee3456f67dfe5)
10-13 15:20:41.186 21259 21259 F DEBUG : #02 pc 0000de2f /system/vendor/lib/hw/android.hardware.gnss@1.0-impl.so (android::hardware::gnss::V1_0::implementation::AGnssRil::requestSetId(unsigned int)+50) (BuildId: b6ff2d8fd38b270b8dc8337a071dd2ff)
10-13 15:20:41.186 21259 21259 F DEBUG : #03 pc 0001817d /system/lib/hw/gps.universal7580.so (broadcom::GpsiClient::marshal_agps_ril_request_setid(broadcom::IpcIncomingMessage&)+160) (BuildId: c154e477d5e0986066dee33ae6b1f776)
10-13 15:20:41.186 21259 21259 F DEBUG : #04 pc 0001f6f5 /system/lib/hw/gps.universal7580.so (broadcom::IpcPipeTransportBase::OnSelect(int, bool, bool, bool, void*)+280) (BuildId: c154e477d5e0986066dee33ae6b1f776)
10-13 15:20:41.186 21259 21259 F DEBUG : #05 pc 0001f7ad /system/lib/hw/gps.universal7580.so (non-virtual thunk to broadcom::IpcPipeTransportBase::OnSelect(int, bool, bool, bool, void*)+12) (BuildId: c154e477d5e0986066dee33ae6b1f776)
10-13 15:20:41.186 21259 21259 F DEBUG : #06 pc 0001fd33 /system/lib/hw/gps.universal7580.so (broadcom::SelectManager::ProcessEvent(broadcom::ISelectHandler&, int, bool, bool, bool, void*)+26) (BuildId: c154e477d5e0986066dee33ae6b1f776)
10-13 15:20:41.186 21259 21259 F DEBUG : #07 pc 0001fc91 /system/lib/hw/gps.universal7580.so (broadcom::SelectManager::PerformOneWaitAndProcess()+424) (BuildId: c154e477d5e0986066dee33ae6b1f776)
10-13 15:20:41.186 21259 21259 F DEBUG : #08 pc 0001653b /system/lib/hw/gps.universal7580.so (broadcom::ipc_thread_proc(void*)+30) (BuildId: c154e477d5e0986066dee33ae6b1f776)
10-13 15:20:41.186 21259 21259 F DEBUG : #09 pc 0000d555 /system/vendor/lib/hw/android.hardware.gnss@1.0-impl.so (threadFunc(void*)+6) (BuildId: b6ff2d8fd38b270b8dc8337a071dd2ff)
10-13 15:20:41.186 21259 21259 F DEBUG : #10 pc 000815b3 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40) (BuildId: 5f11d11806ced6e016edcbac728d2b98)
10-13 15:20:41.187 21259 21259 F DEBUG : #11 pc 00039d23 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 5f11d11806ced6e016edcbac728d2b98)