Strange "..Slate.dll" Crash in VR mode

0 Files
Log
Dump
Context
1
Engine Version 4.18.1
i5 6600
GeForce GTX 1060 6GB
HTC VIVE
2
During the week I’m trying to understand why and how it crash
It happens regularly, with a periodicity of 5-15 minutes
And that I noticed none of the failures point to my module or some sort of asserts
Always:

<IsEnsure>false</IsEnsure>
<IsAssert>false</IsAssert>
<CrashType>Crash</CrashType>

And in Callstack(on top) everything is present that modules

UE4Editor-SlateCore.dll!UnknownFunction []
UE4Editor-Slate.dll!UnknownFunction []

But I do not use slate, or other widgets.
What classes did I redefine:
VrCharacter, MyMotionController(+Grip interface), VrCamera, Small Utility class(for log etc) - It’s all
3
Reasons(in my view):
I Use UKismetMaterialLibrary::SetVectorParameterValue in VrChar tick function, which each frame sets new values. And I use this collection value in the material. When I disable this function(in C++ code) the Crash do not occur (I tested about 25-30 minutes). Otherwise, it Crash every 5-15 minutes. I’m not sure what exactly it causes a Crash , but it speeds it up for sure. And this happens only in VR mode
I can zip my project and send it to the developers if this information is not enough

4
Callstacks. Almost all the reports were:

     Error: Fatal error!
     Error: 
    LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffff
    [LogWindows: Error:   


     Error: [Callstack] 0x00000000AF64AF8D UE4Editor-SlateCore.dll!UnknownFunction []
     Error: [Callstack] 0x00000000992C662E UE4Editor-Slate.dll!UnknownFunction []
     Error: [Callstack] 0x0000000099292D46 UE4Editor-Slate.dll!UnknownFunction []
     Error: [Callstack] 0x00000000992C7389 UE4Editor-Slate.dll!UnknownFunction []
    Error: [Callstack] 0x0000000099294140 UE4Editor-Slate.dll!UnknownFunction []
    Error: [Callstack] 0x00000000992ED867 UE4Editor-Slate.dll!UnknownFunction []
    Error: [Callstack] 0x00000000992EC953 UE4Editor-Slate.dll!UnknownFunction []
     Error: [Callstack] 0x000000005FD369CA UE4Editor.exe!UnknownFunction []
     Error: [Callstack] 0x000000005FD45430 UE4Editor.exe!UnknownFunction []
     Error: [Callstack] 0x000000005FD454AA UE4Editor.exe!UnknownFunction []
 Error: [Callstack] 0x000000005FD52379 UE4Editor.exe!UnknownFunction []
     Error: [Callstack] 0x000000005FD53D57 UE4Editor.exe!UnknownFunction []
     Error: [Callstack] 0x00000000D4322774 KERNEL32.DLL!UnknownFunction []
  Error: [Callstack] 0x00000000D6A20D51 ntdll.dll!UnknownFunction []
   Error: [Callstack] 0x00000000D6A20D51 ntdll.dll!UnknownFunction []

But only 1 time I received (1 of 30 times):

[2017.11.18-18.01.59:528][664]LogOutputDevice: Error: Ensure condition failed: false [File:D:\Build\++UE4+Release-4.18+Compile\Sync\Engine\Source\Runtime\SlateRHIRenderer\Private\SlateRHIRenderer.cpp] [Line: 1072]
[2017.11.18-18.01.59:528][664]LogOutputDevice: Error: Window isnt valid but being drawn!
[2017.11.18-18.01.59:528][664]LogOutputDevice: Error: Stack: 
[2017.11.18-18.01.59:528][664]LogOutputDevice: Error: [Callstack] 0x00000000A1962786 UE4Editor-Core.dll!UnknownFunction []
[2017.11.18-18.01.59:528][664]LogOutputDevice: Error: [Callstack] 0x00000000A170123A UE4Editor-Core.dll!UnknownFunction []
[2017.11.18-18.01.59:528][664]LogOutputDevice: Error: [Callstack] 0x00000000A171B906 UE4Editor-Core.dll!UnknownFunction []
[2017.11.18-18.01.59:528][664]LogOutputDevice: Error: [Callstack] 0x000000009389275B UE4Editor-SlateRHIRenderer.dll!UnknownFunction []
[2017.11.18-18.01.59:529][664]LogOutputDevice: Error: [Callstack] 0x00000000A1057C9A UE4Editor-Slate.dll!UnknownFunction []
[2017.11.18-18.01.59:529][664]LogOutputDevice: Error: [Callstack] 0x00000000A1024140 UE4Editor-Slate.dll!UnknownFunction []
[2017.11.18-18.01.59:529][664]LogOutputDevice: Error: [Callstack] 0x00000000A107D867 UE4Editor-Slate.dll!UnknownFunction []
[2017.11.18-18.01.59:529][664]LogOutputDevice: Error: [Callstack] 0x00000000A107C953 UE4Editor-Slate.dll!UnknownFunction []
[2017.11.18-18.01.59:529][664]LogOutputDevice: Error: [Callstack] 0x00000000202469CA UE4Editor.exe!UnknownFunction []
[2017.11.18-18.01.59:529][664]LogOutputDevice: Error: [Callstack] 0x0000000020255430 UE4Editor.exe!UnknownFunction []
[2017.11.18-18.01.59:529][664]LogOutputDevice: Error: [Callstack] 0x00000000202554AA UE4Editor.exe!UnknownFunction []
[2017.11.18-18.01.59:529][664]LogOutputDevice: Error: [Callstack] 0x0000000020262379 UE4Editor.exe!UnknownFunction []
[2017.11.18-18.01.59:529][664]LogOutputDevice: Error: [Callstack] 0x0000000020263D57 UE4Editor.exe!UnknownFunction []
[2017.11.18-18.01.59:530][664]LogOutputDevice: Error: [Callstack] 0x00000000D4322774 KERNEL32.DLL!UnknownFunction []
[2017.11.18-18.01.59:530][664]LogOutputDevice: Error: [Callstack] 0x00000000D6A20D51 ntdll.dll!UnknownFunction []

This, too, Slate, but there is already a small clue . And as I wrote above, I do not use any widgets
5
Disassembly UE4Editor-SlateCore.dll!UnknownFunction []

00007FFFA7EDAF0D  add         byte ptr [rdi+rax+32h],dh  
00007FFFA7EDAF11  ror         byte ptr [rax-7Dh],0C4h  
00007FFFA7EDAF15  sub         bl,al  
00007FFFA7EDAF17  mov         rcx,rdx  
00007FFFA7EDAF1A  call        00007FFFA7ED4420  
00007FFFA7EDAF1F  test        eax,eax  
00007FFFA7EDAF21  sete        al  
00007FFFA7EDAF24  add         rsp,28h  
00007FFFA7EDAF28  ret  
00007FFFA7EDAF29  int         3  
00007FFFA7EDAF2A  int         3  
00007FFFA7EDAF2B  int         3  
00007FFFA7EDAF2C  int         3  
00007FFFA7EDAF2D  int         3  
00007FFFA7EDAF2E  int         3  
00007FFFA7EDAF2F  int         3  
00007FFFA7EDAF30  xorps       xmm0,xmm0  
00007FFFA7EDAF33  ucomiss     xmm0,dword ptr [rcx+5D0h]  
00007FFFA7EDAF3A  jne         00007FFFA7EDAF3F  
00007FFFA7EDAF3C  mov         al,1  
00007FFFA7EDAF3E  ret  
00007FFFA7EDAF3F  xor         al,al  
00007FFFA7EDAF41  ret  
00007FFFA7EDAF42  int         3  
00007FFFA7EDAF43  int         3  
00007FFFA7EDAF44  int         3  
00007FFFA7EDAF45  int         3  
00007FFFA7EDAF46  int         3  
00007FFFA7EDAF47  int         3  
00007FFFA7EDAF48  int         3  
00007FFFA7EDAF49  int         3  
00007FFFA7EDAF4A  int         3  
00007FFFA7EDAF4B  int         3  
00007FFFA7EDAF4C  int         3  
00007FFFA7EDAF4D  int         3  
00007FFFA7EDAF4E  int         3  
00007FFFA7EDAF4F  int         3  
00007FFFA7EDAF50  movzx       eax,byte ptr [rcx+5A1h]  
00007FFFA7EDAF57  shr         al,1  
00007FFFA7EDAF59  and         al,1  
00007FFFA7EDAF5B  ret  
00007FFFA7EDAF5C  int         3  
00007FFFA7EDAF5D  int         3  
00007FFFA7EDAF5E  int         3  
00007FFFA7EDAF5F  int         3  
00007FFFA7EDAF60  test        byte ptr [rcx],19h  
00007FFFA7EDAF63  setne       al  
00007FFFA7EDAF66  ret  
00007FFFA7EDAF67  int         3  
00007FFFA7EDAF68  int         3  
00007FFFA7EDAF69  int         3  
00007FFFA7EDAF6A  int         3  
00007FFFA7EDAF6B  int         3  
00007FFFA7EDAF6C  int         3  
00007FFFA7EDAF6D  int         3  
00007FFFA7EDAF6E  int         3  
00007FFFA7EDAF6F  int         3  
00007FFFA7EDAF70  push        rbx  
00007FFFA7EDAF72  sub         rsp,20h  
00007FFFA7EDAF76  cmp         qword ptr [rcx+6E8h],0  
00007FFFA7EDAF7E  mov         rbx,rcx  
00007FFFA7EDAF81  je          00007FFFA7EDAF9F  
00007FFFA7EDAF83  mov         rcx,qword ptr [rcx+6E8h]  
00007FFFA7EDAF8A  mov         rax,qword ptr [rcx]  
00007FFFA7EDAF8D  call        qword ptr [rax+80h]   <---- this
00007FFFA7EDAF93  test        al,al  
00007FFFA7EDAF95  je          00007FFFA7EDAF9F  
00007FFFA7EDAF97  mov         al,1  
00007FFFA7EDAF99  add         rsp,20h  
00007FFFA7EDAF9D  pop         rbx  
00007FFFA7EDAF9E  ret  
00007FFFA7EDAF9F  xor         al,al  
00007FFFA7EDAFA1  add         rsp,20h  
00007FFFA7EDAFA5  pop         rbx  
00007FFFA7EDAFA6  ret  
00007FFFA7EDAFA7  int         3  
00007FFFA7EDAFA8  int         3  
00007FFFA7EDAFA9  int         3  
00007FFFA7EDAFAA  int         3  
00007FFFA7EDAFAB  int         3  
00007FFFA7EDAFAC  int         3  
00007FFFA7EDAFAD  int         3  
00007FFFA7EDAFAE  int         3  
00007FFFA7EDAFAF  int         3  
00007FFFA7EDAFB0  movzx       eax,byte ptr [rcx+18h]  
00007FFFA7EDAFB4  shr         al,7  
00007FFFA7EDAFB7  ret  
00007FFFA7EDAFB8  int         3  
00007FFFA7EDAFB9  int         3  
00007FFFA7EDAFBA  int         3  
00007FFFA7EDAFBB  int         3  
00007FFFA7EDAFBC  int         3  
00007FFFA7EDAFBD  int         3  
00007FFFA7EDAFBE  int         3  
00007FFFA7EDAFBF  int         3  
00007FFFA7EDAFC0  movzx       eax,byte ptr [rcx+19h]  
00007FFFA7EDAFC4  and         al,1  

6
As I said above, I zipped the project and I can send it to the developers

Hello anadre,

Could you outline what you were doing in the editor leading up to the crash? Please provide steps including any changes in the project settings. This will help us narrow down why the crash is occurring.

Thanks,

Hello =)

I specially created a new project, with a minimal set - to minimize the search.
He contains(To be at the level):

  1. Basic simple level (third person с++) But at the level does not contain anything from 3d char, I deleted them Leaving only the simple floor and wall
  2. 1 model of a tree SpeedTree(in shader I use the collection parameter in the input “World pos offset”)
  3. 1 model of a grass SpeedTree
  4. My game mode(just set myVrChar)
  5. VRCharacter(c++ code in tick event i set collection parameter), Char contains controllers and Camera classes are redefined, all via C++(I took the code from the OpenVR plugin and remade it for myself)
  6. my project settings (see attachments)
    Build.Cs
    Def Engine.ini
    Def Input. ini
    7)It’s all, then I just play in VR mode But only a mine of 5-10, a maximum of 15
    8)I do not click on the controller and do not take objects - it does not crash at that moment. But I noticed such a thing that if I do not set a collection parameter (in tick C++ function, Via UKismetMaterialLibrary::SetVectorParameterValue )- it does not crash (well, at least 30 minutes of testing - I do not know, mb it just speeds up the Crash)
    9)I do not use Blueprints code in this mini level

Hello,

Do you possibly have a sample project that this is occurring in that you could share?

Thanks,

Hi,

You can send me a PM through the forums here

Best,

Yes, of course. But I want to send the project privately, not for general access. What e-mail can I drop the link to? Or can there be another way to send privately?

Done, Also I made a small readme file inside

You don’t have symbol files installed so it hard to deduce whats gone wrong from stack alone

The symbols are those that are installed through the Launcher? They just install, or what other operations should be done?

I installed the Symbols, now I can tell a little more about the Crash.
I hope this helps you fix this problem
These are all tests of the simple project that I gave you
If during your tests it does not crash more than 10 minutes then restart the game
In 2 hours of my tests, it crash 5 times
1.

Access violation - code c0000005 (first/second chance not available)
 
 UE4Editor_Slate!<lambda_c42855a8df853c2fca6077897314e16e>::operator()() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1558]
 UE4Editor_Slate!FSlateApplication::ForEachUser() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4464]
 UE4Editor_Slate!FSlateApplication::FinishedInputThisFrame() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1567]
 UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3277]
 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

2
Most often it Crash like this:

Access violation - code c0000005 (first/second chance not available)

UE4Editor_SlateCore!SWindow::IsVisible() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swindow.cpp:1326]
UE4Editor_Slate!PrepassWindowAndChildren() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1336]
UE4Editor_Slate!FSlateApplication::DrawPrepass() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1391]
UE4Editor_Slate!FSlateApplication::PrivateDrawWindows() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1433]
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

3

Access violation - code c0000005 (first/second chance not available)

UE4Editor_ApplicationCore!FWindowsWindow::`vftable'()
UE4Editor_SlateCore!SWidget::SlatePrepass() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:493]
UE4Editor_Slate!PrepassWindowAndChildren() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1343]
UE4Editor_Slate!FSlateApplication::DrawPrepass() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1391]
UE4Editor_Slate!FSlateApplication::PrivateDrawWindows() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1433]
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
  • Assert about which I wrote above:

    Error: Ensure condition failed: false [File:D:\Build++UE4+Release-4.18+Compile\Sync\Engine\Source\Runtime\SlateRHIRenderer\Private\SlateRHIRenderer.cpp] [Line: 1072]
    Window isnt valid but being drawn!

Summary: you have invalid SWindow something it removes or nullifies,
since All the crash + asserts happen at the moment when you try to turn to SWindow or maybe the culprit is TSharedPtr since the link to the window is stored in it

same crash here: VR preview in editor (no crash at all in standalone version), crash occurs both with vive or oculus, crash happens every 5-10 min, most common crash is the following:

Access violation - code c0000005 (first/second chance not available)
 
 UE4Editor_SlateCore!SWindow::IsVisible() [d:\build\++ue4+release-4.18+compile\sync\engine\source\runtime\slatecore\private\widgets\swindow.cpp:1326]

Epic pls give us at least a workaround
thanks!

same crash here… HELP!!

some details from crash debug, hope it can helps guys at epic

when crash happens in SWindow.cpp:

bool SWindow::IsVisible() const
{
return NativeWindow.IsValid() && NativeWindow->IsVisible();
}

this is NativeWindow status:

       -		NativeWindow	Ptr=0x000001a099f1f700, SharedRefs=0, WeakRefs=1, Object={Definition=Ptr=0xdddddddddddddddd, SharedRefs=???, WeakRefs=???, Object={Type=??? XDesiredPositionOnScreen=??? YDesiredPositionOnScreen=??? ...} }	TSharedPtr<FGenericWindow,0>
        		[SharedReferenceCount]	0	int
        		[WeakReferenceCount]	1	int
        		[Ptr]	0x000001a099f1f700	void *
        +		__vfptr	0x000001a099f1e980 {0x000001a099f1c280, 0xdddddddddddddddd, 0xdddddddddddddddd, 0xdddddddddddddddd, ...}	void * *
        +		Definition	Ptr=0xdddddddddddddddd, SharedRefs=???, WeakRefs=???, Object={Type=??? XDesiredPositionOnScreen=??? YDesiredPositionOnScreen=??? ...}	TSharedPtr<FGenericWindowDefinition,0>
        +		[Raw View]	{Object=0x000001a099f1f700 {Definition=Ptr=0xdddddddddddddddd, SharedRefs=???, WeakRefs=???, Object={Type=??? XDesiredPositionOnScreen=??? YDesiredPositionOnScreen=??? ...} } ...}	TSharedPtr<FGenericWindow,0>

when the crash happens, this is status of SlateWindows array has 3 value:

-		SlateWindows	Num=3	TArray<TSharedRef<SWindow,0>,FDefaultAllocator>
+		[0]	Ptr=0x000001a16ec74110, SharedRefs=1, WeakRefs=45, Object={MoveResizeZone=-842150451 MoveResizeStart={X=-431602080. Y=-431602080. } MoveResizeRect={Left=-1.00000000 ...} ...}	TSharedRef<SWindow,0>
+		[1]	Ptr=0x000001a14b6d5610, SharedRefs=1, WeakRefs=9, Object={...}	TSharedRef<SWindow,0>
+		[2]	Ptr=0x000001a273ce1610, SharedRefs=1, WeakRefs=7, Object={MoveResizeZone=-842150451 MoveResizeStart={X=-431602080. Y=-431602080. } MoveResizeRect={Left=-1.00000000 ...} ...}	TSharedRef<SWindow,0>
+		[Raw View]	{AllocatorInstance={Data=0x000001a1674dd580 {...} } ArrayNum=3 ArrayMax=4 }	TArray<TSharedRef<SWindow,0>,FDefaultAllocator>

I traced SWindow allocated memory and pointed out when it’s destroyed (just before the game crash as above detailed). Here is call stack:

UE4Editor-SlateCore.dll!SWidget::~SWidget() Line 133	
[Inline Frame] UE4Editor-SlateRHIRenderer.dll!SharedPointerInternals::FReferenceControllerOps<0>::ReleaseSharedReference(SharedPointerInternals::FReferenceControllerBase * ReferenceController) Line 351	
[Inline Frame] UE4Editor-SlateRHIRenderer.dll!SharedPointerInternals::FSharedReferencer<0>::{dtor}() Line 445	
UE4Editor-SlateRHIRenderer.dll!FSlateRHIRenderer::DrawWindow_RenderThread(FRHICommandListImmediate & RHICmdList, FSlateRHIRenderer::FViewportInfo & ViewportInfo, FSlateWindowElementList & WindowElementList, bool bLockToVsync, bool bClear) Line 874	
[Inline Frame] UE4Editor-SlateRHIRenderer.dll!FSlateRHIRenderer::DrawWindows_Private::__l29::<lambda_43e86ee7c51f39979e9a39d40b280024>::operator()(FRHICommandListImmediate &) Line 1043	
[Inline Frame] UE4Editor-SlateRHIRenderer.dll!TEnqueueUniqueRenderCommandType<`FSlateRHIRenderer::DrawWindows_Private'::`29'::SlateDrawWindowsCommandName,<lambda_43e86ee7c51f39979e9a39d40b280024> >::DoTask(ENamedThreads::Type) Line 189	
UE4Editor-SlateRHIRenderer.dll!TGraphTask<TEnqueueUniqueRenderCommandType<`FSlateRHIRenderer::DrawWindows_Private'::`29'::SlateDrawWindowsCommandName,<lambda_43e86ee7c51f39979e9a39d40b280024> > >::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 784	
[Inline Frame] UE4Editor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,FDefaultAllocator> & CurrentThread, ENamedThreads::Type) Line 466	
UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 651	
UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 560	
UE4Editor-RenderCore.dll!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 327	
UE4Editor-RenderCore.dll!FRenderingThread::Run() Line 478	
UE4Editor-Core.dll!FRunnableThreadWin::Run() Line 76	
UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() Line 25

it seems that its SharedReferenceCount goes to 0 and main window is destroyed by the function ReleaseSharedReference

	SharedReferenceCount	0
	WeakReferenceCount	20

this seems to be the same problem described in:

Epic pls, try to include a fix in 4.18.2 or suggest us a workaround this is slowing down development and we are missing deadlines :frowning:

This also affects PSVR, and matches the callstacks and descriptions made here. This issue is preventing us from rolling out 4.18.1 to our team.

It could be that void FSlateRHIRenderer::DrawWindow_RenderThread is calling WindowElementList.GetWindow()->GetSizeInScreen();
GetWindow in this case is updating the reference counter. This is happening on RenderThread 2.
The TSharedPtr is not of the thread-safe flavour.

It could be that void FSlateRHIRenderer::DrawWindow_RenderThread is calling WindowElementList.GetWindow()->GetSizeInScreen(); GetWindow in this case is updating the reference counter. This is happening on RenderThread 2. The TSharedPtr is not of the thread-safe flavour.

A work around that I have done is to create a new private pointer to the paint-window and have added a GetSizeInScreen function into FSlateWindowElementList that uses this pointer to call the SWindow’s GetSizeInScreen the Read only pointer is shadowing PaintWindow so that no SharedPtr or WeakPtr.Pin() is used.

i.e.
In DrawElements.h

private:
	/** 
	 * Window which owns the widgets that are being painted but not necessarily rendered to
	 * Widgets are always rendered to the RenderTargetWindow
	 */
	TWeakPtr<SWindow> PaintWindow;
	SWindow* RO_PaintWindow;

public:
	FVector2D GetSizeInScreen() const;

Here the RO_PaintWindow is the added pointer variable.
And is initialised in the constructor

explicit FSlateWindowElementList( TSharedPtr<SWindow> InPaintWindow = nullptr )
	: PaintWindow(InPaintWindow)
	, RO_PaintWindow(InPaintWindow.IsValid() ? InPaintWindow.Get() : nullptr)
	, RenderTargetWindow(nullptr)
	, bNeedsDeferredResolve( false )
	, ResolveToDeferredIndex()
	, MemManager(0)
{
	DrawStack.Push(&RootDrawLayer);
}

In DrawElements.cpp check the TWeakPtr is valid before access;

FVector2D FSlateWindowElementList::GetSizeInScreen() const
{
	if (PaintWindow.IsValid() && RO_PaintWindow != nullptr)
	{
		return RO_PaintWindow->GetSizeInScreen();
	}
	else
	{
		return FVector2D(0, 0);
	}
}

In SlateRHIRenderer.cpp Change the 2 occurences of

const FVector2D WindowSize = WindowElementList.GetWindow()->GetSizeInScreen();

to

const FVector2D WindowSize = WindowElementList.GetSizeInScreen();

Game has been running for over an hour now.

Hi all,

This has been fixed, and should be in 4.19. I am not able to move the fix to a 4.18 hotfix because it modifies a public header. However, if you do feel like doing source modifications, Lee’s fix is close to what we have done - it is indeed due to the Slate window being referenced on the render thread.

In the meantime, the workaround that we have found is to wait a minute or two after starting the editor before entering VR Mode. That /should/ help avoid crashes until the fix is available.

Thanks!
Lauren