Android 13 NDK issue

Recently we were facing some issues on Samsung device with android 13. Unfortunately we were not able reproduce this problem and all we have is logs from google console. It can be related with putting application into background. Have you ever experienced such case? I’m adding part of logs we gets from console.

#00 pc 0x0000000000052654 /apex/ (abort+168)
#01 pc 0x00000000006d122c /apex/ (art::Runtime::Abort(char const*)+704)
#02 pc 0x0000000000016ea8 /apex/ (android::base::SetAborter(std::_1::function<void (char const*)>&&)::$_3::_invoke(char const*)+80)
#03 pc 0x0000000000016450 /apex/ (android::base::LogMessage::~LogMessage()+352)
#04 pc 0x0000000000442a24 /apex/ (art::JavaVMExt::JniAbort(char const*, char const*)+1612)
#05 pc 0x00000000005d3efc /apex/ (art::JNI<false>::CallObjectMethodV(JNIEnv*, _jobject*, _jmethodID*, std::_va_list)+832)

Hello dhbocian,

Welcome to Samsung Developers Forum.
Can you please briefly explain the nature of the issue and what triggers this issue?

Best Regards,
Samsung Developer Relations.

Hello @Ahsan

We investigated an issue little more and it looks like, when application is put into background the processes are stopped usually after one or two minutes. Then sometimes values used in Cpp code could be null and cause crash (JNI DETECTED ERROR IN APPLICATION: obj == null)

Does Android AOSP or Samsung battery improvements block in above case an access to dependencies like PackageManager or for calling native methods like popen() or different from NDK. Does JNI access is blocked somehow?

What changes battery “Deep sleeping apps” mode in above case?



Did you manage to reproduce the issue from your side? If so, I’d like to request you create a support request in the Developer Support Portal with dumpstate logs, reproduction path, and more details about the issue so that we can investigate the issue.

Follow these instructions to collect the dumpstate log:

  1. Dial *#9900#, Delete Dumstate/logcat
  2. Dial *#9900#, Select Debug Level to MID. This restarts the device.
  3. Reproduce the issue
  4. Again dial *#9900# and press “Run Dumpstate/logcat”
  5. When it is finished press “Copy To SD Card (include CP Ramdump)
  6. In the main (root) directory of the device file system, please look for the directory ‘log’. That directory would contain the dupmstate log file generated, having the name format: dumpState_<DEVICE MODEL>_<TIMESTAMP>

Best Regards,
Samsung Developer Relations.

@dhbocian @rambo Were you able to solve the problem or find its cause?

Unfortunately no cause cannot reproduce this.