Freezing/Crashing Editor (assertion failed when hovering context menu)

I have been experiencing this very annoying issue where the editor becomes completely unresponsive, though windows does not say anything. The only way to close it is by terminating the process in the task manager.

I was experiencing it on UE 4.17 and decided to update to 4.18, but it just keeps happening.

I don’t know exactly what is happening since there’s no error message and nothing in the logs, but it seems to happen when the mouse enters the editor window and hovers the content browser (I have a two monitors setup). If, instead, I go directly to the viewport and fly around a little, it seems to work for a while, eventually crashing with an actual error message (when I right click the content browser or navigate through it a little):

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Build\++UE4+Release-4.18+Compile\Sync\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 610] Array index out of bounds: 0 from an array of size 0
UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:414]
UE4Editor_SlateCore!SWidget::ExecuteActiveTimers() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1000]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:869]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:97]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:899]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:899]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:899]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:899]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:97]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:899]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:899]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor_Slate!SScrollBox::OnPaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\widgets\layout\sscrollbox.cpp:985]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:899]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor_Slate!SBorder::OnPaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\widgets\layout\sborder.cpp:85]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:899]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:899]
UE4Editor_SlateCore!FSlateWindowElementList::FDeferredPaint::ExecutePaint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\rendering\drawelements.cpp:830]
UE4Editor_SlateCore!FSlateWindowElementList::PaintDeferred() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\rendering\drawelements.cpp:855]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:958]
UE4Editor_Slate!FSlateApplication::DrawWindowAndChildren() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1233]
UE4Editor_Slate!FSlateApplication::DrawWindowAndChildren() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1322]
UE4Editor_Slate!FSlateApplication::PrivateDrawWindows() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1473]
UE4Editor_Slate!FSlateApplication::DrawWindows() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1190]
UE4Editor_Slate!FSlateApplication::TickApplication() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1777]
UE4Editor_Slate!FSlateApplication::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1595]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3378]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
kernel32
ntdll

Any idea what may be happening?


EDIT

I have been doing some tests in UE4.17 and found some consistency. This freeze/crash happens only when interacting with the content browser, be it simply navigating through folders or right clicking anywhere within it.

Sometimes, specially after restarting the computer (64bit Windows 10), it may take a while for this to happen. I also noticed that the error message I posted appears most of the time (instead of “silently freezing”) if I just wait long enough.

It seems to be related to Windows itself or to some Blueprint I may have created (there’s no custom C++ code in this particular project), since I have been using this version of Unreal for a while without running into such issue.


EDIT 2

Some more things I found out after a lot of testing, updating my nvidia driver and even updating Windows itself:

  • Hovering a context menu usually causes the crash that displays the message above;
  • Sometimes, it is possible to hover a context menu item without crashing as long as it does not have sub-items. When no crash happens, you can then proceed to hover other items, even those with sub-items, as long as you do not “skip” items in the menu (every item must be hovered in order, from top to bottom, going inside the sub-menus when they appear before going back to the main list of items)
  • The program freezes simply by hovering an asset in the Content Browser with no error message (as long as this does not happen, I can freely move the mouse cursor through the CB window)
  • A system restart sometimes make the crash take longer to happen
  • Once the crash happened, every subsequent try to use a context menu cause an instant crash until the system is restarted
  • Both UE4.17 and UE4.18 are affected (have not tried other versions)
  • A brand new blank project has the same issue
  • It does not matter if Unreal is the only program running

And a few things about the machine I am using:

  • OS: Windows 10 Pro 64bit
  • CPU: Intel Core i7-3820
  • GPU: Nvidia GeForce GTX 980 Ti (with the latest stable driver)
  • RAM: 32GB DDR 4
  • HD: 256GB SSD with 30GB Free + 2TB HDD with 800GB free (Unreal is installed in the HDD but using some pace in the SSD for cache and whatnot)

EDIT 3 (partial solution)

As I said in a comment down below, a clean reinstall of the laucher and editor did little to fix the problem, but altering a small piece of code from a source build did the trick for now.

file: SWidget.cpp, lines 986-1006

void SWidget::ExecuteActiveTimers(double CurrentTime, float DeltaTime)
{
	// loop over the registered tick handles and execute them, removing them if necessary.
	for (int32 i = 0; i < ActiveTimers.Num();)
	{
		EActiveTimerReturnType Result = ActiveTimers[i]->ExecuteIfPending( CurrentTime, DeltaTime );
		if (Result == EActiveTimerReturnType::Continue)
		{
			++i;
		}
		else if (ActiveTimers.Num() > 0) //added the if check
		{
			if (FSlateApplicationBase::IsInitialized())
			{
				FSlateApplicationBase::Get().UnRegisterActiveTimer(ActiveTimers[i]);
			}
			
			ActiveTimers.RemoveAt(i);
		}
	}
}

Seeing this solves the crash when hovering assets in the content browser or context menu items, I believe “ExecuteIfPending()” is removing elements from the ActiveTimers array, resulting in the OutOfBounds error at “FSlateApplicationBase::Get().UnRegisterActiveTimer(ActiveTimers[i])”.

Now, this is by no means a proper solution, since I have no idea if the timer that was removed was properly unregistered and all that, so this may very well cause a memory leak or some processing spike with lots of timers still registered but without any way to be accessed (or simply result in a random crash when using the engine). Also, although it seems to solve the problem of hovering items in the Content Browser or in context menus, it does not solve the freezing that sometimes happen when right clicking (usually when the editor just loaded up and the “Finished Asset Discovery” message is still being displayed).

So with that in mind, I’ll leave this question open until a proper solution can be found.


EDIT 4 (quick update)

I’ve just tested UE 4.16 and the exact same problem is happening. At the same time, UE 4.17 runs perfectly fine on another machine, which leads me to conclude this problem is a very specific edge case…

The other machine is a Laptop with the following specs:

  • OS: Windows 10 Home 64bit
  • CPU: Intel Core i7-4810MQ
  • GPU: Nvidia GeForce GTX 870M (with the latest stable driver)
  • RAM: 16GB DDR 4
  • HD: 1TB HDD with 600GB free

Both machines have recently been updated so the only difference is that one is the Home version whereas the other is the Pro version, and since things were working on both until I made this post, I believe the issue is most likely due to a combination of softwares and drivers (which may have been updated/added), now which ones, I have no idea… if I ever find out, I’ll post an answer to this question.

I have been having the same exact thing happen. Windows works completely fine, and unreal isnt hogging resources, it just freezes in play mode and icant go back to edit mode. The one thing that seems to be consistant in each case is destructibles being destroyed.

You can try a few things:

  1. Uninstall Unreal and the Epic game launcher and download + start the launcher as administrator.

  2. Update your driver’s, you can use SlimeDrivers to do this. After the update follow 1 again. (reinstall).

Don’t know you can do somthing with it but its better then no response;)

Hope this will help.

Thanks for the reply, but unfortunately it did not solve the issue.

I am going to update the main post with some more info I got after testing things out a little, though I don’t think it will help much :frowning:

Unfortunately, this is happening to me outside play mode and nothing is being destroyed (as far as I know, at least). But this issue you described may have something in common with what I am experiencing.

Hello,

There is something that I would like you to try similar to what Colder347 suggested.
Completely uninstall the editor as well as the game launcher. When you go to reinstall everything however, install it all on your 2TB HDD. You are getting close to capacity with the SSD so I am wondering if windows is causing some problems here when using the editor.

I’ll try reinstalling everything on the HDD, but since the SSD is the main driver in the machine, Unreal seems to always create a “Common” folder as well as one for each engine version. How can I change the location used by Unreal for such folders?

222071-unreal-folders.png

ps: navigating the context menus through the keyboard does not cause any crash - the problem seems to be mouse related

Yes there is a way to change the location of the Cache information. I am not entirely certain if you can do this during the installation process but once the launcher is installed you can click the little gear at the top to open settings. From there a “Edit Vault Cache Location” option can be used to manually set a location. I’ve added a screenshot as well. Hope this helps.

I am in the process of reinstalling UE4.17, but in the meantime I remembered I actually built UE4.18 from source. I changed the Derived Data Cache location through its “Editor Settings” window and restarted the editor but the crash still happens, which leads me to think the same will happen with 4.17… also, I managed to free another 10GB from the SSD, so it now has 40-something available. I just can’t imagine Windows would complain about it. Although, since everything was working just fine until yesterday, it must be something to do with the OS or some program that updated itself… I just can’t figure it out…

A clean re-install of the Unreal Launcher and UE 4.17, all in the HDD with 800GB free, did not solve this issue.

However, I managed to “fix” it in the source build of UE 4.18 by following the error log and making a small change in the file “SWidget.cpp” (which I’ll add to the main post for now).

That said, since this fix was done with minimal knowledge of how UE works internally, it is most likely not ideal, but it’s the best I could come up with and I can’t keep digging around the code for now, so I’d like to keep this question open until I can truly uncover what is happening or someone comes up with a proper solution.

I’m having the same problem, and re-install did nothing.

Hey Biah, what engine version are you using and if you have a way to accurately reproduce this could you please provide it. Thank you.

It seems this bug in particular was fixed by Epic, though it may not be available in binary form just yet. Not sure which commit it was in, but I just saw that exact method I talked about has been updated to avoid this issue.

void SWidget::ExecuteActiveTimers(double CurrentTime, float DeltaTime)
{
	// loop over the registered tick handles and execute them, removing them if necessary.
	for (int32 i = 0; i < ActiveTimers.Num();)
	{
		EActiveTimerReturnType Result = ActiveTimers[i]->ExecuteIfPending( CurrentTime, DeltaTime );
		if (Result == EActiveTimerReturnType::Continue)
		{
			++i;
		}
		else
		{
			// Possible that execution unregistered the timer 
			if (ActiveTimers.IsValidIndex(i))
			{
				if (FSlateApplicationBase::IsInitialized())
				{
					FSlateApplicationBase::Get().UnRegisterActiveTimer(ActiveTimers[i]);
				}
				ActiveTimers.RemoveAt(i);
			}
		}
	}
}

With this in mind, I’ll mark this post as answered and further bugs shall be relayed through their new system.

Thank you very much for the hard work!

Hello. I’m not sure how i could help you, since i’ve had this problem with a fresh install of 4.18.3 and a clean project. I’ve used the VR shooter project, but it also happened with a custom project that started with the blank template.

so - is this part of 4.19 as far as anyone know? cause i also have issue in 18.3 now