Packaged Game Crashes - KERNELBASE.dll - UE 4.8.3

I have been testing the Couch Knights demo in Unreal with the OSVR plugin. I have the game working within the “Standalone Game” mode. However, I am running into problems when I package the game for Windows 7 (64-bit). The packaging process itself runs fine, but the game crashes upon launching.

I tried packaging the game without the plugin to narrow down the source of the problem. It packages and runs just fine without the plugin. I have run the verify process from inside the Epic Games Launcher on my copy of 4.8.3. I have tried packaging from both the EGL launched version and a version launched from Visual Studio.

Unfortunately, the error log just says fatal error and then prints out some unhelpful information. I’m going to include the full log below, but I am hoping someone can help me understand why this particular error pops up and what I might do to address it. There are also some warnings earlier in the log, but my first impression was that they weren’t particularly relevant.

[2015.08.26-03.11.19:090][  0]Log file open, 08/25/15 23:11:19
[2015.08.26-03.11.19:090][  0]LogModuleManager:Warning: ModuleManager: Module 'HTTPChunkInstaller' not found - its StaticallyLinkedModuleInitializers function is null.
[2015.08.26-03.11.19:090][  0]LogTaskGraph: Started task graph with 4 named threads and 7 total threads.
[2015.08.26-03.11.19:090][  0]LogStats: Stats thread started
[2015.08.26-03.11.19:090][  0]LogInit: Version: 4.8.3-2634408+++depot+UE4-Releases+4.8
[2015.08.26-03.11.19:090][  0]LogInit: API Version: 2579680
[2015.08.26-03.11.19:090][  0]LogInit: Compiled (64-bit): Jul 27 2015 16:16:31
[2015.08.26-03.11.19:091][  0]LogInit: Compiled with Visual C++: 18.00.21005.01
[2015.08.26-03.11.19:091][  0]LogInit: Build Configuration: Development
[2015.08.26-03.11.19:091][  0]LogInit: Branch Name: ++depot+UE4-Releases+4.8
[2015.08.26-03.11.19:091][  0]LogInit: Command line: 
[2015.08.26-03.11.19:091][  0]LogInit: Base directory: C:/Users/JR/Desktop/WindowsNoEditor/CouchKnights/Binaries/Win64/
[2015.08.26-03.11.19:091][  0]LogInit: Rocket: 0
[2015.08.26-03.11.19:091][  0]LogInit: Using libcurl 7.41.0
[2015.08.26-03.11.19:091][  0]LogInit:  - built for x86_64-pc-win32
[2015.08.26-03.11.19:091][  0]LogInit:  - supports SSL with WinSSL
[2015.08.26-03.11.19:091][  0]LogInit:  - other features:
[2015.08.26-03.11.19:091][  0]LogInit:      CURL_VERSION_SSL
[2015.08.26-03.11.19:091][  0]LogInit:      CURL_VERSION_IPV6
[2015.08.26-03.11.19:091][  0]LogInit:      CURL_VERSION_ASYNCHDNS
[2015.08.26-03.11.19:091][  0]LogInit:      CURL_VERSION_LARGEFILE
[2015.08.26-03.11.19:091][  0]LogInit:      CURL_VERSION_IDN
[2015.08.26-03.11.19:092][  0]LogInit:  CurlRequestOptions (configurable via config and command line):
[2015.08.26-03.11.19:092][  0]LogInit:  - bVerifyPeer = true  - Libcurl will verify peer certificate
[2015.08.26-03.11.19:092][  0]LogInit:  - bUseHttpProxy = false  - Libcurl will NOT use HTTP proxy
[2015.08.26-03.11.19:092][  0]LogInit:  - bDontReuseConnections = false  - Libcurl will reuse connections
[2015.08.26-03.11.19:092][  0]LogInit:  - CertBundlePath = nullptr  - Libcurl will use whatever was configured at build time.
[2015.08.26-03.11.19:092][  0]LogOnline:Warning: No default platform service specified for OnlineSubsystem
[2015.08.26-03.11.19:093][  0]LogInit: Presizing for 0 objects not considered by GC, pre-allocating 0 bytes.
[2015.08.26-03.11.19:100][  0]LogInit: Object subsystem initialized
[2015.08.26-03.11.19:101][  0]LogConsoleManager:Warning: Console variable 'r.SeparateTranslucency' wasn't set ('ProjectSetting' has a lower priority than 'SystemSettingsIni')
[2015.08.26-03.11.19:111][  0]LogConsoleManager:Warning: Console variable 'r.PostProcessAAQuality' wasn't set ('Scalability' has a lower priority than 'SystemSettingsIni')
[2015.08.26-03.11.19:111][  0]LogConsoleManager:Warning: Console variable 'r.MSAA.CompositingSampleCount' wasn't set ('Scalability' has a lower priority than 'ProjectSetting')
[2015.08.26-03.11.19:111][  0]LogInit: Selected Device Profile: [WindowsNoEditor]
[2015.08.26-03.11.19:111][  0]LogInit: Applying CVar settings loaded from the selected device profile: [WindowsNoEditor]
[2015.08.26-03.11.19:116][  0]LogInit: Computer: HYRULE
[2015.08.26-03.11.19:116][  0]LogInit: User: JR
[2015.08.26-03.11.19:116][  0]LogInit: CPU Page size=4096, Cores=4
[2015.08.26-03.11.19:116][  0]LogInit: High frequency timer resolution =2.241025 MHz
[2015.08.26-03.11.19:116][  0]LogMemory: Memory total: Physical=15.9GB (16GB approx)
[2015.08.26-03.11.19:116][  0]LogMemory: Platform Memory Stats for WindowsNoEditor
[2015.08.26-03.11.19:116][  0]LogMemory: Process Physical Memory: 32.24 MB used, 32.24 MB peak
[2015.08.26-03.11.19:116][  0]LogMemory: Process Virtual Memory: 20.65 MB used, 20.65 MB peak
[2015.08.26-03.11.19:116][  0]LogMemory: Physical Memory: 9794.89 MB used, 16280.48 MB total
[2015.08.26-03.11.19:116][  0]LogMemory: Virtual Memory: 180.86 MB used, 8388608.00 MB total
[2015.08.26-03.11.19:155][  0]LogTextLocalizationManager: The requested culture ('en_US') has no localization data; parent culture's ('en') localization data will be used.
[2015.08.26-03.11.19:353][  0]LogD3D11RHI: Found D3D11 adapter 0: NVIDIA GeForce GTX 670M   (Feature Level 11_0)
[2015.08.26-03.11.19:353][  0]LogD3D11RHI: Adapter has 1488MB of dedicated video memory, 0MB of dedicated system memory, and 2559MB of shared system memory, 2 output[s]
[2015.08.26-03.11.19:365][  0]LogD3D11RHI: Found D3D11 adapter 1: NVIDIA GeForce GTX 670M   (Feature Level 11_0)
[2015.08.26-03.11.19:365][  0]LogD3D11RHI: Adapter has 1488MB of dedicated video memory, 0MB of dedicated system memory, and 2559MB of shared system memory, 0 output[s]
[2015.08.26-03.11.19:365][  0]LogD3D11RHI: Chosen D3D11 Adapter Id = 0
[2015.08.26-03.11.19:372][  0]LogD3D11RHI: InitD3DDevice
[2015.08.26-03.11.19:372][  0]LogD3D11RHI: !Direct3DDevice
[2015.08.26-03.11.19:372][  0]LogRHI: Texture pool is 1041 MB (70% of 1488 MB)
[2015.08.26-03.11.19:381][  0]LogD3D11RHI: Async texture creation enabled
[2015.08.26-03.11.19:493][  0]LogInit: Selected Device Profile: [WindowsNoEditor]
[2015.08.26-03.11.19:585][  0]LogInit: WinSock: version 1.1 (2.2), MaxSocks=32767, MaxUdp=65467
[2015.08.26-03.11.19:650][  0]LogD3D11RHI: InitD3DDevice
[2015.08.26-03.11.19:655][  0]LogWindowsMoviePlayer: Unable to load movie: ../../../CouchKnights/Content/Movies/Default_Startup.mp4
[2015.08.26-03.11.19:827][  0]LogWindows:Warning: CreateProc failed (2) ..\..\..\Engine\Binaries/Win64/CrashReportClient.exe  -AppName=UE4-CouchKnights
[2015.08.26-03.11.19:827][  0]LogWindows: Could not start CrashReportClient.exe
[2015.08.26-03.11.19:827][  0]LogMemory: Platform Memory Stats for WindowsNoEditor
[2015.08.26-03.11.19:827][  0]LogMemory: Process Physical Memory: 136.18 MB used, 136.18 MB peak
[2015.08.26-03.11.19:827][  0]LogMemory: Process Virtual Memory: 122.81 MB used, 122.84 MB peak
[2015.08.26-03.11.19:827][  0]LogMemory: Physical Memory: 9888.85 MB used, 16280.48 MB total
[2015.08.26-03.11.19:827][  0]LogMemory: Virtual Memory: 443.74 MB used, 8388608.00 MB total
[2015.08.26-03.11.24:818][  0]LogWindows: === Critical error: ===
Fatal error!



KERNELBASE.dll {0x000007fefcc0b3dd} + 0 bytes
CouchKnights.exe {0x0000000142774de1} + 0 bytes
CouchKnights.exe {0x0000000142bacb49} + 0 bytes
CouchKnights.exe {0x00000001424fd398} + 0 bytes
CouchKnights.exe {0x00000001424f8e5e} + 0 bytes
CouchKnights.exe {0x000000013f87ba9e} + 0 bytes
CouchKnights.exe {0x000000013fd1aba3} + 0 bytes
CouchKnights.exe {0x000000013fd19cac} + 0 bytes
CouchKnights.exe {0x000000013f7a7311} + 0 bytes
CouchKnights.exe {0x000000013f7abdcc} + 0 bytes
CouchKnights.exe {0x000000013f7a122a} + 0 bytes
CouchKnights.exe {0x000000013f7a18aa} + 0 bytes
CouchKnights.exe {0x000000013f7b3df9} + 0 bytes
CouchKnights.exe {0x0000000142773819} + 0 bytes
kernel32.dll {0x0000000076ac59cd} + 0 bytes
ntdll.dll {0x0000000076cfb981} + 0 bytes
ntdll.dll {0x0000000076cfb981} + 0 bytes


[2015.08.26-03.11.24:941][  0]LogExit: Executing StaticShutdownAfterError
[2015.08.26-03.11.24:943][  0]LogWindows: FPlatformMisc::RequestExit(1)
[2015.08.26-03.11.24:943][  0]Log file closed, 08/25/15 23:11:24

The answer turned out to have to deal with the dlls for the OSVR plugin not getting packaged correctly. Essentially, Unreal didn’t have the directory with the dlls on the path.

Peter Knepley was a huge help in getting this figured out. If anyone else gets a crash without the symbols loaded into the stack, I thought I would reproduce his recommended steps (slightly edited to generalize) for generating a proper debug build.

Visit https://github.com/EpicGames/UnrealEngine/releases
grab 4.8.3 as a zip
unzip it
run setup.bat [grabs all the content!]
run generateprojectfiles.bat

Build UE4 project in Development Editor config using Visual Studio

Create in UE or download relevant demo from Learn tab
Take folder and drop into your github unzip directory

Open command prompt
go to \Engine\Build\BatchFiles
RunUAT buildcookrun -build -cook -stage -pak -project= -platform=win64 -map=/Game/Maps/Room

You game will now reside in F:\UnrealEngine-4.8.3-release\Saved\StagedBuilds\WindowsNoEditor
Run .exe