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.