UE4Editor crashes when opening a Widget Blueprint on Ubuntu

Hello there,

UE4Editor keeps crashing, whenever I open a newly created Widget in my Project, with Trace:

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:Runtime/Core/Public/Containers/Array.h] [Line: 833]
Array index out of bounds: 12 from an array of size -1386388512[Callstack]  00  0x00007f13b398983f  FLinuxPlatformStackWalk::CaptureStackBackTrace(unsigned long long*, unsigned int, void*)
[Callstack]  01  0x00007f13b3867c85  FGenericPlatformStackWalk::StackWalkAndDump(char*, unsigned long, int, void*)
[Callstack]  02  0x00007f13b398973a  FLinuxPlatformStackWalk::StackWalkAndDump(char*, unsigned long, int, void*)
[Callstack]  03  0x00007f13b39f418c  FDebug::LogAssertFailedMessage(char const*, char const*, int, wchar_t const*, ...)
[Callstack]  04  0x00007f139df26915  FFixedZoomLevelsContainer::GetZoomAmount(int) const
[Callstack]  05  0x00007f13310f8299  TBaseSPMethodDelegateInstance<true, SDesignerView, (ESPMode)0, float ()>::Execute() const
[Callstack]  06  0x00007f1331018e05  SZoomPan::GetRelativeLayoutScale(FSlotBase const&) const
[Callstack]  07  0x00007f13acaa8430  SWidget::SlatePrepass(float)
[Callstack]  08  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  09  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  10  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  11  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  12  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  13  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  14  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  15  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  16  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  17  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  18  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  19  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  20  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  21  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  22  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  23  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  24  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  25  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  26  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  27  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  28  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  29  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  30  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  31  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  32  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  33  0x00007f13acaa8440  SWidget::SlatePrepass(float)
[Callstack]  34  0x00007f13ad085b0e  /localstorage/fast_storage/sources/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-Slate.so(+0x1cdb0e) [0x7f13ad085b0e]
[Callstack]  35  0x00007f13ad085d28  /localstorage/fast_storage/sources/UnrealEngine/Engine/Binaries/Linux/libUE4Editor-Slate.so(+0x1cdd28) [0x7f13ad085d28]
[Callstack]  36  0x00007f13ad08551d  FSlateApplication::DrawPrepass(TSharedPtr<SWindow, (ESPMode)0>)
[Callstack]  37  0x00007f13ad083411  FSlateApplication::PrivateDrawWindows(TSharedPtr<SWindow, (ESPMode)0>)
[Callstack]  38  0x00007f13ad088a52  FSlateApplication::TickApplication(float)
[Callstack]  39  0x00007f13ad086b53  FSlateApplication::Tick()
[Callstack]  40  0x0000000000421d94  FEngineLoop::Tick() [/localstorage/fast_storage/sources/UnrealEngine/Engine/Source/Runtime/Launch/Private/LaunchEngineLoop.cpp, line 2869]
[Callstack]  41  0x00000000004256fa  GuardedMain(wchar_t const*) [/localstorage/fast_storage/sources/UnrealEngine/Engine/Source/Runtime/Launch/Private/Launch.cpp, line 156]
[Callstack]  42  0x00007f13a8b75d1b  CommonLinuxMain(int, char**, int (*)(wchar_t const*))
[Callstack]  43  0x00007f13a8093830  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f13a8093830]
[Callstack]  44  0x0000000000413869  Engine/Binaries/Linux/UE4Editor(_start+0x29) [0x413869]

Generally, the Editor crashes a lot on Linux (ubuntu 16.04), so I suppose some state must have got corrupted last time I created a Widget. Normally creating widgets is not a Problem.

I added some Logs into GraphEditor/Private/SNodePanel.cpp with the following result:

  • FFixedZoomLevelsContainer is only being created once with 20 elements inside its ZoomLevels Array
  • inside the Invokation of SZoomPan::GetRelativeLayoutScale, the destructor of FFixedZoomLevelsContainer has apparently not yet been called. However, FFixedZoomLevelsContainer::ZoomLevels.Num() Member returns “-535821344”. I suspect the value is being overriden, possibly by a buffer overflow or similar.

I’m not exactly sure how to best debug this and would welcome any help on this matter.
I might try running valgrind to find write overflows or something, but I suspect that will take a while to run.

Edit
In an Empty Project, it appears the stacktrace is different, but still points to FFixedZoomLevelsContainer, so I assume it must be related:

[Callstack]  00  0x00007f6a3cfd22af  FLinuxPlatformStackWalk::CaptureStackBackTrace(unsigned long long*, unsigned int, void*)
[Callstack]  01  0x00007f6a3ceaf3a5  FGenericPlatformStackWalk::StackWalkAndDump(char*, unsigned long, int, void*)
[Callstack]  02  0x00007f6a3cf90bf1  FLinuxCrashContext::CaptureStackTrace()
[Callstack]  03  0x00007f6a321b63a0  CommonLinuxCrashHandler(FGenericCrashContext const&)
[Callstack]  04  0x00007f6a3cf95464  PlatformCrashHandler(int, siginfo_t*, void*)
[Callstack]  05  0x00007f6a3de1a3d0  /lib/x86_64-linux-gnu/libpthread.so.0(+0x113d0) [0x7f6a3de1a3d0]
[Callstack]  06  0x00007f6a3cf60903  FText::FText(FText const&)
[Callstack]  07  0x00007f6a275668ab  FFixedZoomLevelsContainer::GetZoomText(int) const
[Callstack]  08  0x00007f69bdfff7b8  SDesignSurface::GetZoomText() const
[Callstack]  09  0x00007f69be0fcc3e  TBaseSPMethodDelegateInstance<true, SDesignerView, (ESPMode)0, FText ()>::Execute() const
[Callstack]  10  0x00007f6a383a6a23  TAttribute<FText>::Get() const
[Callstack]  11  0x00007f6a3694b5ef  FTextBlockLayout::ComputeDesiredSize(FTextBlockLayout::FWidgetArgs const&, float, FTextBlockStyle const&)
[Callstack]  12  0x00007f6a3695a4f3  STextBlock::ComputeDesiredSize(float) const
[Callstack]  13  0x00007f6a3615f3ed  SWidget::CacheDesiredSize(float)
[Callstack]  14  0x00007f6a360ec48d  SWidget::SlatePrepass(float)
[Callstack]  15  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  16  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  17  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  18  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  19  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  20  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  21  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  22  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  23  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  24  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  25  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  26  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  27  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  28  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  29  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  30  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  31  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  32  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  33  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  34  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  35  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  36  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  37  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  38  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  39  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  40  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  41  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  42  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  43  0x00007f6a360ec440  SWidget::SlatePrepass(float)
[Callstack]  44  0x00007f6a366c9b0e  /localstorage/fast_storage/sources/UnrealEngine-new-clean/Engine/Binaries/Linux/libUE4Editor-Slate.so(+0x1cdb0e) [0x7f6a366c9b0e]
[Callstack]  45  0x00007f6a366c9d28  /localstorage/fast_storage/sources/UnrealEngine-new-clean/Engine/Binaries/Linux/libUE4Editor-Slate.so(+0x1cdd28) [0x7f6a366c9d28]
[Callstack]  46  0x00007f6a366c951d  FSlateApplication::DrawPrepass(TSharedPtr<SWindow, (ESPMode)0>)
[Callstack]  47  0x00007f6a366c7411  FSlateApplication::PrivateDrawWindows(TSharedPtr<SWindow, (ESPMode)0>)
[Callstack]  48  0x00007f6a366cca52  FSlateApplication::TickApplication(float)
[Callstack]  49  0x00007f6a366cab53  FSlateApplication::Tick()
[Callstack]  50  0x0000000000421d94  FEngineLoop::Tick() [/localstorage/fast_storage/sources/UnrealEngine-new-clean/Engine/Source/Runtime/Launch/Private/LaunchEngineLoop.cpp, line 2869]
[Callstack]  51  0x00000000004256fa  GuardedMain(wchar_t const*) [/localstorage/fast_storage/sources/UnrealEngine-new-clean/Engine/Source/Runtime/Launch/Private/Launch.cpp, line 156]
[Callstack]  52  0x00007f6a321b6d1b  CommonLinuxMain(int, char**, int (*)(wchar_t const*))
[Callstack]  53  0x00007f6a316d4830  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f6a316d4830]
[Callstack]  54  0x0000000000413869  /localstorage/fast_storage/sources/UnrealEngine-new-clean/Engine/Binaries/Linux/UE4Editor(_start+0x29) [0x413869]

Hey mhoo-

Are you able to reproduce this crash in a new project without any added content? If so, does the crash occur simply by adding a widget blueprint to the content browser and then attempting to open it? Please include the steps that cause the crash to occur to help me reproduce the crash locally.

Yes, I can actually reproduce it on a blank project. I even re-downloaded and re-compiled the engine in a new Folder… but the crash still occurs.
Steps to reproduce the crash:

  1. New Project → Blank (Desktop / Console, Max. Quality, No Starter Content)

  2. Wait until UE4 Restarts into new Project

  3. Inside Content Browser, Click “Add New” → User Interface → Widget Blueprint

  4. Rename it To BP_Widget

  5. Double Click on “BP_Widget” inside the Content Browser

  6. Wait for core dump to be generated and UE4Editor crashing

Git sha: e8700ea1e56eb1cf7cebea9d68103f41ede4313a

Actually I just noticed: The stacktrace is slightly different this time, but still points to FFixedZoomLevelsContainer, which makes me believe it is still the same issue. Unfortunately I am unable to edit the OP to add the other stack trace. Either way, I’ll try with a clean user/clean home next.

Apparently the StackTrace got updated after all. Either way, I got the first StackTrace when trying the steps as in my first comment with a clean user and home dir. The UE4Engine is generating some crash information and I think, even uploading that somewhere, maybe that might help?

Hey mhooo-

I was able to reproduce the crash when opening the widget blueprint. I hadn’t originally realized that you were working in the 4.13 preview. This issue has been reported and you can follow the status of the report here: Unreal Engine Issues and Bug Tracker (UE-35185)

Cheers

mhoo- - could you take a look if undoing this https://github.com/EpicGames/UnrealEngine/commit/8fba9bbdc3cc4105d7c3de24adc94f7304c7d90b fixes it for you?

Yes, undoing the commit fixed the issue!

I’m going to see if I can find the crash report. One of mine mentions an array being out of bounds, when trying to open a widget.

This should be fixed with the following commit: https://github.com/EpicGames/UnrealEngine/commit/358febb8e5c0a941960c4542fe926a7394e7ad53