Packaged multiplayer game crashes on client when spawning skeletal meshes

Packaged game crashes when spawning skeletal meshes to the world. This started happening after I added two-sided materials to some of the meshes (but I also did a lot of other stuff, so I can’t be sure). This does not ALWAYS happen, only on occasion, and it seems to be random what skeletal mesh triggers it. It doesn’t always seem to be any of the ones with two-sided materials. This only happens on the client, which I find utterly baffling. Never the server.

I have not been able to get it to crash playing with 2 clients in the editor window either. On a packaged game it crashes usually with 5-10 skeletal meshes spawned, sometimes it takes 30.

This is the crash log (or relevant parts of it, rather):

   [ 96]LogWindows: Warning: CreateProc failed: The system cannot find the file specified. (0x00000002)
    --snip snip--
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: === Critical error: ===
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: 
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: Assertion failed: IsInGameThread() || IsAsyncLoading() [File:D:\Build\++UE4+Release-4.19+Compile\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialInstance.cpp] [Line: 477] 

The stack is all on the .exe of the package.

[2018.11.02-18.52.18:706][ 96]LogWindows: Error: 
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: 
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: 
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x00000000EBCBA388 KERNELBASE.dll!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005DA644F0 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005D5FE81B SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005D361718 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005EAC598D SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005EAC9231 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005EA43149 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005E3CB9CA SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005E26EAE9 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005F306495 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005F38E025 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005E7B5D4C SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005E40CE18 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005E589F9A SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005DE3935A SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005D3EA989 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005D3D65A6 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005D3EB2A7 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005D3EC66D SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005D3FA465 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005D42B60C SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x000000005D41F143 SOP_A06_8.exe!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x00000000EC253034 KERNEL32.DLL!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x00000000EEE21461 ntdll.dll!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: [Callstack] 0x00000000EEE21461 ntdll.dll!UnknownFunction []
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: 
[2018.11.02-18.52.18:706][ 96]LogWindows: Error: Crash in runnable thread TaskGraphThreadHP 8
[2018.11.02-18.52.18:720][ 96]LogExit: Executing StaticShutdownAfterError

To me this looks like a null pointer, and the method it’s calling is the one to get the default physical material, but I have no idea why it would do that and only occasionally. I mean everything in the game uses default physical material.

Anyone got any ideas?

Just to clarify, the game runs on a listen server.

There seems to be two other threads on this same issue that were left hanging:

Both look like the same issue.

And to clarify, those two-sided materials were already part of an earlier build that worked (I dug one up from a backup disk), so they are not the problem.

I’m still as baffled as ever. I can’t get this issue to appear on anywhere else but with a packaged game and on a client. Listen server is always fine, and playing on PIE is totally fine. Playing solo as a listen server gives no errors.

The bug was caused by a static mesh (gold, to be exact) that was spawned from the same chest as the skeletal meshes. I’m not a 100% sure, but something happened to it during physics simulation, and it went through the landscape, and upon toggling physics off, it crashed the game. And mind you, it still only crashes the game for the client in a packaged game - never the server.

I still don’t know what causes this, but I’m marking it as solved for follow up purposes.

And just a side note, before I forget:
The static mesh nor its functionality had zero changes done to it for months, but on this build it started to mess with me. Which I also found odd.