getUserData android crash

Hello, we are currently encountering crashes on Android devices. It appears that these issues are not tied to a specific Android OS version or device. Typically, they occur after the application enters the ‘on pause’ mode. Here is the stack trace:

libc +0x609dc __memcpy_a53
split_config.armeabi_v7a.apk +0xb31ec FMOD::Geometry::getUserData

A few questions:

  • What version of FMOD (and relevant engine, if you’re using an official integration) are you using?
  • Are you making any calls to FMOD::Geometry::getUserData, or any calls to FMOD::Geometry in general? If so, can you post snippets of these calls?
  • If you haven’t already, can you swap to the logging version of the libs (“L” suffix), enable logging with Debug_Initialize, and see whether this reveals any more information when the crash occurs?
  • Can I get you to post the full stack trace and any relevant logs? You can post them here, or upload it to your FMOD user profile.
  1. 2.02.19, we have our custom engine.
  2. We have such process to call getUserData():
    at the begining:
    _eventInstance->setCallback(&SoundEffectFModEvent::EventCallback, mask);
    later call from your API:
FMOD_RESULT F_CALLBACK SoundEffectFModEvent::EventCallback(FMOD_STUDIO_EVENT_CALLBACK_TYPE type, FMOD_STUDIO_EVENTINSTANCE* event, void * /*parameters*/) {
FMOD::Studio::EventInstance *eventInstance = reinterpret_cast<FMOD::Studio::EventInstance*>(event);
	SoundEffectFModEvent* soundEffect = nullptr;
  1. We can not switch to logging version because we have found these issues only in production logs of the application.
  2. It’s full stack trace, we don’t have anything more and there are no usefull logs.

Apologies for the delayed response.

Are you making any calls to Geometry, not just to user data in general?

What’s the latest Android version the crash occurs on? While we don’t use Google’s Oboe API, there is a known issue (which was scheduled for fixing in Android T) with Oboe where other applications can cause a crash when backgrounded, which sounds like it may be what you’re describing. Does anything described here and in the linked github issue line up with your experience? Fmod crash on android crash stack - #12 by jeff_fmod

Thank you for continuing the investigation.
We don’t have any geometry calls.
We are experiencing such crashes on Android 13. As I understand, it means that it’s not connected to the Oboe issue.

I’ve given it another test on my end with an example project that makes use of user user data and event callbacks, but unfortunately I’ve been unable to reproduce the issue. Could I get you to upload your project and a crash stack to your FMOD User profile so I can take a look and try to diagnose the issue? Also, can I get you to provide me with the names of the Android devices, or a selection of them, that the crash occurs on?

We cannot reproduce it ourselves; we only have crash statistics from our crash collector services. So, it’s quite useless to upload any build, I think.
You can find the names of the devices with the highest crash rates, but there are many more. I think this case is not device-specific.
Redmi Note 11 5%
Redmi 10C 2%
Galaxy A12 2%
Galaxy A51 2%

Thanks for the device info, I’d agree that it’s probably not device specific.

Unfortunately, it’s a little difficult to dig into this any further without more information. Given that you’re not making any calls to Geometry::getUserData, it’s likely that the symbols aren’t resolving correctly - if you’re able to provide me with a full crash stack/log and your exact NDK version, I should be able to track down the issue.