Unreal Engine 4.x on Linux crashes with error: SIGSEGV: invalid attempt to write memory > "Assertion failed: SlotIndex < CacheSlotCapacity"

Viewed 8

Using Unreal Engine 4.X on Linux (Ubuntu) to package a game and after re-loading the game level many times (my lucky number was 15, but yours might vary), UE crashes with an

Unhandled Exception: SIGSEGV: invalid attempt to write memory at address

due to an assertion error related to SlotIndex exceeding the CacheSlotCapacity defined in $UE_Dir/Engine/Source/Runtime/Core/Private/FileCache/FileCache.cpp] [Line: 367] as:

Assertion failed: SlotIndex < CacheSlotCapacityte

1 Answers

After researching the problem, I found that packaging setting

Share Material Shader Code = True

was the guilty boy for the CacheSlotCapacity error on Linux, once disabling it ( =False by unchecking the checkbox beside it from the File>Packaging Setting window), I didn't get the error again.

You could also do it manually in the \Config\DefaultGame.ini file under your project directory as:

[/Script/UnrealEd.ProjectPackagingSettings]

bShareMaterialShaderCode=False

It has to be noted that after disabling this setting, your packaged game's size will increase as no sharing of shader materials is happening, on the other side, your game level will load faster as all the shader materials are packaged with the game.

Related