# getUserData android crash

**URL:** https://qa.fmod.com/t/getuserdata-android-crash/21139
**Category:** FMOD Engine
**Created:** [January 22, 2024, 1:44pm UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139 "2024-01-22T13:44:18Z")
**Posts on this page:** 13
**Page:** 2

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [June 14, 2024, 5:17am UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/21 "2024-06-14T05:17:22Z")

</div>

Apologies for the delayed response - after testing on multiple devices and simulators, I unfortunately haven’t been able to reproduce the issue in your video. That said, as previously mentioned I wouldn’t be concerned about your workaround of manually setting the output, but please let us know if you run into any issues with it.

The closest thing I’m able to reproduce is a similar small sound to the one in the video, but instead of occurring a small while after suspending, it occurs on resuming, just before the audio volume begins to ramp back in. Is this behavior something that you’ve experienced on your end?

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [June 24, 2024, 6:31am UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/22 "2024-06-24T06:31:50Z")

</div>

Just following up on this - was the behavior that I described with a small sound on resume before volume ramps back in something that you’ve experienced on your end?

---

<div class="post-metadata">

### Author: ![maksimomelyanchuk](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@maksimomelyanchuk](https://qa.fmod.com/u/maksimomelyanchuk)
#### Post date: [June 25, 2024, 4:09am UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/23 "2024-06-25T04:09:03Z")

</div>

No, our problem is a sound during the termination of application as shown on the video that I’ve uploaded recently.

---

<div class="post-metadata">

### Author: ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)
#### Post date: [July 2, 2024, 5:53am UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/24 "2024-07-02T05:53:15Z")

</div>

Thank you for providing the apk, I can reproduce the issue with sound returning after closing the application.  
I can see in the log that on terminating the application there is a call to `System::mixerSuspend`, but shortly after there is also call to `System::mixerResume`, which is why you are getting a short burst of sound. My guess would be that you have a lifecycle callback with `mixerResume` in it, and it is being triggered after the application has begun shutting down. I am seeing a log for `[Engine] Application shutdown!` right before the `mixerResume` call- perhaps you could try setting a flag immediately after your engine shuts down that prevents the mixer from being resumed? Without knowing what the code looks like, perhaps something similar to:

```auto
void Shutdown()
{
    Log.i("[Engine] Application shutdown!");
    gShuttingDown = true;
}
...
void onResume()
{
    if (!gShuttingDown)
    {
        system->mixerResume();
    }
}

```

---

<div class="post-metadata">

### Author: ![maksimomelyanchuk](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@maksimomelyanchuk](https://qa.fmod.com/u/maksimomelyanchuk)
#### Post date: [July 26, 2024, 7:05am UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/25 "2024-07-26T07:05:39Z")

</div>

I’ve figured out the reason why we have it. You have the phrase in the [documentation](https://fmod.com/docs/2.00/api/platforms-android.html):

> It is extremely important to ensure no FMOD APIs are called in-between suspend and resume as they run the risk of causing a deadlock

But we need some FMOD calls to finish it’s work correctly like unloading banks, releasing system components. Can we do it safely without resuming a mixer?

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [July 30, 2024, 5:13am UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/26 "2024-07-30T05:13:46Z")

</div>

> [@maksimomelyanchuk](#):
>
> But we need some FMOD calls to finish it’s work correctly like unloading banks, releasing system components. Can we do it safely without resuming a mixer?

Unloading banks and/or releasing without resuming the mixer is extremely unlikely to be safe, especially since unloading banks will unload event/mixer metadata and underlying sample data.

If you need to “stop” the mixer from outputting all sound before unloading banks or releasing the system, you could access the Master Bus and use something like [`Studio::Bus::stopAllEvents`](https://www.fmod.com/docs/2.02/api/studio-api-bus.html#studio_bus_stopallevents) or [`Studio::Bus::setPaused`](https://www.fmod.com/docs/2.02/api/studio-api-bus.html#studio_bus_setpaused).

Apart from that, what specifically are you trying to do that requires FMOD calls while the mixer is suspended?

---

<div class="post-metadata">

### Author: ![maksimomelyanchuk](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@maksimomelyanchuk](https://qa.fmod.com/u/maksimomelyanchuk)
#### Post date: [August 19, 2024, 4:41am UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/27 "2024-08-19T04:41:03Z")

</div>

I’ve managed to reproduce the problem with your sample `fmodstudioapi20223android\api\studio\examples\androidstudio\cmake\simple_event`. I’ve attached simple\_event.cpp file with changed extension to txt. You can download it and try.  
[simple\_event.txt](https://qa.fmod.com/uploads/short-url/noLQeSeexDtCWYXpmJWXALFI8Nv.txt) (5.8 KB)  
You need to run app, than press B to start the ambience sound, than press D to suspend the mixer/set paused master bus/stop sound, than press Back to quit the app. During the exit process a little sound appears when mixerResume command runs but it shouldn’t because it’s already stopped and the bus is paused.  
If you remove mixerSuspend/mixerResume commands everything works fine.

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [August 20, 2024, 1:20am UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/28 "2024-08-20T01:20:07Z")

</div>

Much obliged, I’ll take a look at it shortly!

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [August 22, 2024, 5:44am UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/29 "2024-08-22T05:44:57Z")

</div>

Thanks again for the modified example script. I’ve given it a test on my end and I am indeed able to consistently reproduce the issue with it. I don’t have any workarounds to offer at the moment, but I’ve passed it to the development team for further investigation, and if there’s any updates regarding the issue I’ll let you know.

---

<div class="post-metadata">

### Author: ![maksimomelyanchuk](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@maksimomelyanchuk](https://qa.fmod.com/u/maksimomelyanchuk)
#### Post date: [October 10, 2024, 7:41am UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/30 "2024-10-10T07:41:05Z")

</div>

Hello, I’ve checked the latest version(2.02.24) and it still has the same problem. Do you have any plans to fix it?

---

<div class="post-metadata">

### Author: ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)
#### Post date: [October 15, 2024, 11:40pm UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/31 "2024-10-15T23:40:18Z")

</div>

Hi,

The fix for this issue has been assigned for our next release.

---

<div class="post-metadata">

### Author: ![maksimomelyanchuk](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@maksimomelyanchuk](https://qa.fmod.com/u/maksimomelyanchuk)
#### Post date: [December 6, 2024, 8:54am UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/32 "2024-12-06T08:54:10Z")

</div>

Hi,  
I see you had new release at **7/11/24** but don’t see the fix in the change log. Is it going to be in the next one?

---

<div class="post-metadata">

### Author: ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)
#### Post date: [December 8, 2024, 9:50pm UTC](https://qa.fmod.com/t/getuserdata-android-crash/21139/33 "2024-12-08T21:50:04Z")

</div>

Apologies, the development of this task took longer than expected and had to get delayed. I will update this thread when it is ready for replease.

[Previous page](https://qa.fmod.com/t/getuserdata-android-crash/21139.md?page=1)
