# Windows unity crash

**URL:** <https://qa.fmod.com/t/windows-unity-crash/21421>\
**Category:** Unity\
**Created:** [March 29, 2024, 3:02am UTC](https://qa.fmod.com/t/windows-unity-crash/21421 "2024-03-29T03:02:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lion-won](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lion-won](https://qa.fmod.com/u/lion-won)\
**Post date:** [March 29, 2024, 3:02am UTC](https://qa.fmod.com/t/windows-unity-crash/21421/1 "2024-03-29T03:02:58Z")

</div>

studio version :2.02.21  
unity version : 2022.3  
fmod for unity : 2.02

modify StudioEventEmitter:  
at line 293: before instace.start() ,add : instance.setCallback(OnEventCallback);  
and the func is:  
private RESULT OnEventCallback(EVENT\_CALLBACK\_TYPE type, IntPtr instancePtr, IntPtr paramterPtr)  
{  
return RESULT.OK;  
}

then when click to stop playing in unity editor. Unity crash, and only find in windows.

---

<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:** [April 3, 2024, 11:31pm UTC](https://qa.fmod.com/t/windows-unity-crash/21421/2 "2024-04-03T23:31:30Z")

</div>

The crash appears to be caused by the callback not meeting the restrictions laid out in the [Callbacks section of the FMOD Unity user guide](https://www.fmod.com/docs/2.02/unity/user-guide.html#callbacks) - if you adjust the code to comply with the restrictions, you should stop running into the crash.
