添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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

Ask Question

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

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.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .