BUG: VR borderless build crash

Hi guys, just a quick bug report on a thing that wasted about 2 days of development of our game a week before the release ;D

Steps:

  1. Create an empty c++ project (should be the same in blueprint project)
  2. Set the Use Borderless Window and Start in VR to true (in my case I had Should Preserve Aspect Ratio set as well)
  3. Package
  4. Launch in Steam VR mode
    The project might launch just fine, but if the engine tries to initialize while the Steam VR is launching you’d probably hit an assert and the game would crash. The worst thing is that it occurs randomly probably depending on if UE4 and Steam VR initializations interfere with each other (e.g. they are run in a wrong order or at the same time) - these are just suspicions, the cause might be different, but the clue is this ‘Use Borderless Window’ flag.

A quick fix for now is to disable ‘Use Borderless Window’ flag.

The assert looks like this (might not be exactly the same, I don’t have access to the code right now):

check(InResource && InResource->Target == Target);

Dump from log directing to the error (just cut some project-specific data and logs according to sound):

(...)
LogInit: Compiled (64-bit): Jan  6 2017 10:46:09
LogInit: Compiled with Visual C++: 19.00.23026.00
LogInit: Build Configuration: Development
LogInit: Branch Name: ++UE4+Release-4.14
(...)
[2017.02.16-16.48.43:984][  0]LogInit: CPU Page size=65536, Cores=4
[2017.02.16-16.48.43:984][  0]LogInit: High frequency timer resolution =3.914066 MHz
[2017.02.16-16.48.43:985][  0]LogMemory: Memory total: Physical=14.9GB (15GB approx)
[2017.02.16-16.48.43:985][  0]LogMemory: Platform Memory Stats for WindowsNoEditor
[2017.02.16-16.48.43:985][  0]LogMemory: Process Physical Memory: 127.42 MB used, 127.42 MB peak
[2017.02.16-16.48.43:985][  0]LogMemory: Process Virtual Memory: 124.18 MB used, 124.18 MB peak
[2017.02.16-16.48.43:985][  0]LogMemory: Physical Memory: 8962.68 MB used,  6341.95 MB free, 15304.62 MB total
[2017.02.16-16.48.43:985][  0]LogMemory: Virtual Memory: 457.11 MB used,  6341.95 MB free, 134217728.00 MB total
[2017.02.16-16.48.44:190][  0]LogTextLocalizationManager: No translations for ('pl-PL') exist, falling back to 'en' for localization and internationalization data.
[2017.02.16-16.48.44:286][  0]LogD3D11RHI: D3D11 adapters:
[2017.02.16-16.48.44:728][  0]LogD3D11RHI:    0. 'NVIDIA GeForce GTX 980' (Feature Level 11_0)
[2017.02.16-16.48.44:728][  0]LogD3D11RHI:       4060/0/7652 MB DedicatedVideo/DedicatedSystem/SharedSystem, Outputs:1, VendorId:0x10de
[2017.02.16-16.48.44:738][  0]LogD3D11RHI:    1. 'Intel(R) HD Graphics 530' (Feature Level 11_0)
[2017.02.16-16.48.44:738][  0]LogD3D11RHI:       128/0/7652 MB DedicatedVideo/DedicatedSystem/SharedSystem, Outputs:1, VendorId:0x8086
[2017.02.16-16.48.44:740][  0]LogD3D11RHI:    2. 'Microsoft Basic Render Driver' (Feature Level 11_0)
[2017.02.16-16.48.44:740][  0]LogD3D11RHI:       0/0/7652 MB DedicatedVideo/DedicatedSystem/SharedSystem, Outputs:0, VendorId:0x1414
[2017.02.16-16.48.44:740][  0]LogD3D11RHI: Chosen D3D11 Adapter: 0
[2017.02.16-16.48.44:747][  0]LogD3D11RHI: Creating new Direct3DDevice
[2017.02.16-16.48.44:747][  0]LogD3D11RHI:     GPU DeviceId: 0x13c0 (for the marketing name, search the web for "GPU Device Id")
[2017.02.16-16.48.44:747][  0]LogWindows: EnumDisplayDevices:
[2017.02.16-16.48.44:747][  0]LogWindows:    0. 'NVIDIA GeForce GTX 980' (P:1 D:1)
[2017.02.16-16.48.44:747][  0]LogWindows:    1. 'NVIDIA GeForce GTX 980' (P:0 D:0)
[2017.02.16-16.48.44:748][  0]LogWindows:    2. 'NVIDIA GeForce GTX 980' (P:0 D:0)
[2017.02.16-16.48.44:748][  0]LogWindows:    3. 'NVIDIA GeForce GTX 980' (P:0 D:0)
[2017.02.16-16.48.44:748][  0]LogWindows:    4. 'Intel(R) HD Graphics 530' (P:0 D:1)
[2017.02.16-16.48.44:748][  0]LogWindows:    5. 'Intel(R) HD Graphics 530' (P:0 D:0)
[2017.02.16-16.48.44:748][  0]LogWindows:    6. 'Intel(R) HD Graphics 530' (P:0 D:0)
[2017.02.16-16.48.44:748][  0]LogWindows: DebugString: PrimaryIsNotTheChoosenAdapter PrimaryIsNotTheChoosenAdapter PrimaryIsNotTheChoosenAdapter FoundDriverCount:4 
[2017.02.16-16.48.44:748][  0]LogD3D11RHI:     Adapter Name: NVIDIA GeForce GTX 980
[2017.02.16-16.48.44:748][  0]LogD3D11RHI:   Driver Version: 378.66 (internal:21.21.13.7866, unified:378.66)
[2017.02.16-16.48.44:748][  0]LogD3D11RHI:      Driver Date: 2-9-2017
[2017.02.16-16.48.44:748][  0]LogRHI: Texture pool is 1361 MB (70% of 1945 MB)
[2017.02.16-16.48.45:138][  0]LogD3D11RHI: Async texture creation enabled
[2017.02.16-16.48.45:193][  0]LogD3D11RHI: GPU Timing Frequency: 1000.000000 (Debug: 2 1)
[2017.02.16-16.48.45:460][  0]LogAssetRegistry: FAssetRegistry took 0.0162 seconds to start up
[2017.02.16-16.48.45:464][  0]LogPackageLocalizationCache: Processed 3 localized package path(s) for 1 prioritized culture(s) in 0.002280 seconds
[2017.02.16-16.48.45:471][  0]LogInit: Selected Device Profile: [WindowsNoEditor]
[2017.02.16-16.48.45:475][  0]LogContentStreaming: Texture pool size is 2000.00 MB
(...)
[2017.02.16-16.48.46:120][  0]LogInit: Texture streaming: Enabled
[2017.02.16-16.48.46:125][  0]LogConsoleManager:Warning: Setting the console variable 'r.VSync' with 'SetByGameSetting' was ignored as it is lower priority than the previous 'SetByCode'
[2017.02.16-16.48.46:153][  0]LogInit:Display: Game Engine Initialized.
[2017.02.16-16.48.46:154][  0]LogInit:Display: Starting Game.
(...)
[2017.02.16-16.48.46:180][  0]LogMemory: Platform Memory Stats for WindowsNoEditor
[2017.02.16-16.48.46:180][  0]LogMemory: Process Physical Memory: 246.81 MB used, 262.52 MB peak
[2017.02.16-16.48.46:180][  0]LogMemory: Process Virtual Memory: 301.99 MB used, 318.12 MB peak
[2017.02.16-16.48.46:180][  0]LogMemory: Physical Memory: 9033.63 MB used,  6271.00 MB free, 15304.62 MB total
[2017.02.16-16.48.46:180][  0]LogMemory: Virtual Memory: 787.43 MB used,  6271.00 MB free, 134217728.00 MB total
[2017.02.16-16.48.46:180][  0]LogMemory: 
[2017.02.16-16.48.46:181][  0]Allocator Stats for binned2: (not implemented)
(...)
[2017.02.16-16.48.50:419][  0]r.SetRes = "1920x1080f"
[2017.02.16-16.48.50:419][  0]r.ScreenPercentage = "120"
[2017.02.16-16.48.50:419][  0]LogEngine: Onscreen warnings/messages are now DISABLED
[2017.02.16-16.48.50:419][  0]r.MaterialQualityLevel = "1"
[2017.02.16-16.48.50:481][  0]LogGameState: Match State Changed from WaitingToStart to InProgress
[2017.02.16-16.48.50:482][  0]LogLoad: Took 4.327125 seconds to LoadMap(MAP_PATH_HERE)
[2017.02.16-16.48.50:686][  0]LogLoad: (Engine Initialization) Total time: 9.19 seconds
[2017.02.16-16.48.50:686][  0]LogExternalProfiler: Found external profiler: VSPerf
[2017.02.16-16.48.50:686][  0]LogExternalProfiler: Using external profiler: VSPerf
[2017.02.16-16.48.50:697][  0]LogOcInput: OculusInput pre-init called
[2017.02.16-16.48.50:745][  0]LogRenderer: Reallocating scene render targets to support 128x128 NumSamples 4 (Frame:1).
[2017.02.16-16.48.54:284][  0]LogRenderer: Reallocating scene render targets to support 2304x1296 NumSamples 4 (Frame:2).
[2017.02.16-16.48.55:197][  1]LogRenderer: Reallocating scene render targets to support 2592x1440 NumSamples 4 (Frame:3).
(...)
[2017.02.16-16.48.56:251][  2]LogWindows: Could not start CrashReportClient.exe
[2017.02.16-16.48.56:251][  2]LogMemory: Platform Memory Stats for WindowsNoEditor
[2017.02.16-16.48.56:251][  2]LogMemory: Process Physical Memory: 2029.69 MB used, 2066.09 MB peak
[2017.02.16-16.48.56:251][  2]LogMemory: Process Virtual Memory: 2657.89 MB used, 2740.88 MB peak
[2017.02.16-16.48.56:251][  2]LogMemory: Physical Memory: 11357.28 MB used,  3947.34 MB free, 15304.62 MB total
[2017.02.16-16.48.56:251][  2]LogMemory: Virtual Memory: 3250.88 MB used,  3947.34 MB free, 134217728.00 MB total
[2017.02.16-16.49.10:227][  2]LogWindows: Windows GetLastError: Operacja ukończona pomyślnie. (0)
[2017.02.16-16.49.10:232][  2]LogWindows:Error: === Critical error: ===
[2017.02.16-16.49.10:232][  2]LogWindows:Error: 
[2017.02.16-16.49.10:232][  2]LogWindows:Error: Fatal error: [File:D:\Build\++UE4+Release-4.14+Compile\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp] [Line: 791] 
[2017.02.16-16.49.10:232][  2]LogWindows:Error: Rendering thread exception:
[2017.02.16-16.49.10:232][  2]LogWindows:Error: Fatal error!
[2017.02.16-16.49.10:232][  2]LogWindows:Error: 
[2017.02.16-16.49.10:232][  2]LogWindows:Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000060
[2017.02.16-16.49.10:232][  2]LogWindows:Error: 
[2017.02.16-16.49.10:232][  2]LogWindows:Error: NoteFighter.exe!FSteamVRHMD::RenderTexture_RenderThread()
[2017.02.16-16.49.10:232][  2]LogWindows:Error: NoteFighter.exe!FSlateRHIRenderer::DrawWindow_RenderThread()
[2017.02.16-16.49.10:232][  2]LogWindows:Error: NoteFighter.exe!TGraphTask<`FSlateRHIRenderer::DrawWindows_Private'::`35'::EURCMacro_SlateDrawWindowsCommand>::ExecuteTask()
[2017.02.16-16.49.10:232][  2]LogWindows:Error: NoteFighter.exe!FNamedTaskThread::ProcessTasksNamedThread()
[2017.02.16-16.49.10:232][  2]LogWindows:Error: NoteFighter.exe!FNamedTaskThread::ProcessTasksUntilQuit()
[2017.02.16-16.49.10:232][  2]LogWindows:Error: NoteFighter.exe!RenderingThreadMain()
[2017.02.16-16.49.10:232][  2]LogWindows:Error: NoteFighter.exe!FRenderingThread::Run()
[2017.02.16-16.49.10:232][  2]LogWindows:Error: NoteFighter.exe!FRunnableThreadWin::Run()
[2017.02.16-16.49.10:232][  2]LogWindows:Error: NoteFighter.exe!FRunnableThreadWin::GuardedRun()
[2017.02.16-16.49.10:232][  2]LogWindows:Error: KERNEL32.DLL
[2017.02.16-16.49.10:232][  2]LogWindows:Error: ntdll.dll
[2017.02.16-16.49.10:232][  2]LogWindows:Error: ntdll.dll
[2017.02.16-16.49.10:232][  2]LogWindows:Error: 
[2017.02.16-16.49.10:232][  2]LogWindows:Error: 
[2017.02.16-16.49.10:232][  2]LogWindows:Error: 
[2017.02.16-16.49.10:232][  2]LogWindows:Error: 
[2017.02.16-16.49.10:256][  2]LogExit: Executing StaticShutdownAfterError
[2017.02.16-16.49.10:270][  2]LogWindows: FPlatformMisc::RequestExit(1)
[2017.02.16-16.49.10:270][  2]Log file closed, 02/16/17 17:49:10

I have moved this into the Bug Reports section for review.

Hello daltostronic,

Thank you for the information provided, however I was unable to get the crash that you are seeing on your end. I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps (including any small steps that may have been left out of your original post) so as to reproduce this issue on our end?
  3. Could you provide screen shots of any blueprints/settings that may be involved with this issue?
  4. Could you provide the complete call stack that is given from the crash reporter (including login/machine ID)?

Hello daltostronic,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Thanks,