# Commandlet crashes if an event is deleted

**URL:** <https://qa.fmod.com/t/commandlet-crashes-if-an-event-is-deleted/19573>\
**Category:** Unreal Engine\
**Created:** [November 24, 2022, 2:41pm UTC](https://qa.fmod.com/t/commandlet-crashes-if-an-event-is-deleted/19573 "2022-11-24T14:41:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alberto.barbati](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alberto.barbati](https://qa.fmod.com/u/alberto.barbati)\
**Post date:** [November 24, 2022, 2:41pm UTC](https://qa.fmod.com/t/commandlet-crashes-if-an-event-is-deleted/19573/1 "2022-11-24T14:41:29Z")

</div>

In case an event is removed, calling the FMOD commandlet results in a crash, with this callstack:

```auto
UnrealEditor-SlateCore.dll!FSlateInvalidationRoot::FSlateInvalidationRoot() [REDACTED\Engine\Source\Runtime\SlateCore\Private\FastUpdate\SlateInvalidationRoot.cpp:215]
UnrealEditor-SlateCore.dll!SWindow::SWindow() [REDACTED\Engine\Source\Runtime\SlateCore\Private\Widgets\SWindow.cpp:2032]
UnrealEditor-UnrealEd.dll!SharedPointerInternals::NewIntrusiveReferenceController<1,SWindow>() [REDACTED\Engine\Source\Runtime\Core\Public\Templates\SharedPointerInternals.h:413]
UnrealEditor-UnrealEd.dll!ObjectTools::DeleteObjects() [REDACTED\Engine\Source\Editor\UnrealEd\Private\ObjectTools.cpp:2605]
UnrealEditor-FMODStudioEditor.dll!FFMODAssetBuilder::ProcessBanks() [REDACTED\Engine\Plugins\NSMExt\FMODStudio\Source\FMODStudioEditor\Private\FMODAssetBuilder.cpp:53]
UnrealEditor-FMODStudioEditor.dll!UFMODGenerateAssetsCommandlet::Main() [REDACTED\Engine\Plugins\NSMExt\FMODStudio\Source\FMODStudioEditor\Private\FMODGenerateAssetsCommandlet.cpp:65]
UnrealEditor-Cmd.exe!FEngineLoop::PreInitPostStartupScreen() [REDACTED\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:3659]
UnrealEditor-Cmd.exe!GuardedMain() [REDACTED\Engine\Source\Runtime\Launch\Private\Launch.cpp:137]
UnrealEditor-Cmd.exe!GuardedMainWrapper() [REDACTED\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:147]
UnrealEditor-Cmd.exe!LaunchWindowsStartup() [REDACTED\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:283]
UnrealEditor-Cmd.exe!WinMain() [REDACTED\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:330]

```

According to my analysis, the commandlet is trying to show a modal dialog to get confirmation about the deletion of assets. Unfortunately, Slate is not initialized while running commandlets.

A quick fix would be to pass !IsRunningCommandlet() as the second argument of the call to ObjectTools::DeleteObjects in FMODAssetBuilder.cpp, line 646, so that the confirmation is requested only when the commandlet is not being run.

---

<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:** [November 25, 2022, 12:59am UTC](https://qa.fmod.com/t/commandlet-crashes-if-an-event-is-deleted/19573/2 "2022-11-25T00:59:01Z")

</div>

Thanks for letting us know, I will pass this onto the Dev team to investigate.  
I have not been able to reproduce this though- can you please tell me what version of FMOD and Unreal you are using?

---

<div class="post-metadata">

**Author:** ![alberto.barbati](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@alberto.barbati](https://qa.fmod.com/u/alberto.barbati)\
**Post date:** [November 29, 2022, 3:13pm UTC](https://qa.fmod.com/t/commandlet-crashes-if-an-event-is-deleted/19573/3 "2022-11-29T15:13:36Z")

</div>

It’s Unreal 5.0 with FMOD plugin 2.02.07
