Crash in CacheOptimizeIndexBuffer on Editor startup

On linux, with build 4.7.1, and even the latest github code, the editor crashes while trying to go through the function CacheOptimizeIndexBuffer in MeshUtilities.

Changing the allocator to ansimalloc doesn’t change anything for me.

I disabled mesh optimization for the moment, and the editor starts and I can work, in fact everything works except that feature for the moment.

I have an AMD A8-4550 APU with an HD7640G and I use mesa opensource drivers as the Catalyst driver just crash the whole linux disto on boot.

I am using Ubuntu 14.10 and I tried default mesa drivers (which aren’t compatible with UE4 at all) so I am using the latest graphic drivers PPA from :

Searching the internet, I also found a bug report on mesa list about this problem, and it is listed as “NOT OUR BUG”

Thank you.

Hey simondeschenes-

There are a few extra questions I’d like to ask to help with understanding your problem. At what point does this failure occur? Is it while running or or another step? Are you downloading/installing the engine to the desktop (or another folder on the desktop)? If so I would try moving the folder to another location on the computer, such as into the Documents folder, and try again.


My crash is not occuring while generating project files or executing setup, everything compiled fine with clang 3.5.

The crash occurs while launching the editor.

So I did a modification in the source code to be able to work :

In MeshUtilities.cpp, I modified CVarTriangleOrderOptimization to have a value of 2 (No triangle order optimization. (least efficient, debugging purposes only)).

Option 0 and 1 makes the editor crashes on load with SEGFAULT (signal 11).
0 being NvTriStrip
1 being ForSyth

Now, the editor works fine and I am currently building my first game. However, I know that my static meshes are not optimized so I may not get the performance I would have it they were.

I tried finding the bug with gdb, however, since I am not really comfortable with the code yet, I was not able to find anything except the function where the segfault occurs. (CacheOptimizeIndexBuffer)

The last console message before the segfault is :
Building static mesh EditorSphere…

Also, to answer you question my binaries are compiled in the Document folder :

There is no space in the path at all.

I hope it answers your questions.

mmmm not all shaders compiled, because of GPR register limit by using 126 registers. Well, at least I know what happened.

EE …/…/…/…/…/…/src/gallium/drivers/r600/r600_shader.c:158 r600_pipe_shader_create - translation from TGSI failed !
EE …/…/…/…/…/…/src/gallium/drivers/r600/r600_state_common.c:765 r600_shader_select - Failed to build shader variant (type=1) -12
EE …/…/…/…/…/…/src/gallium/drivers/r600/r600_shader.c:2525 r600_shader_from_tgsi - GPR limit exceeded - shader requires 126 registers

I think you should still try to get AMD binary driver working, because Mesa could be a factor here, for whatever reason.

Ohh, I lost enough days of my life trying to get the AMD binary driver working.

The best I ever had is something that crash X on suspend (fglrx 14.9) and shows artefacts in games.

Or actually, I had 14.12 working for a couple of minutes before the whole computer crashed with a big beeeping sound because the card overheat as the driver forgot to start the fans.

Mesa actually controls the fans correctly and the games works without artefract.

The games I played on linux are Civ 5, Borderlands 2, Torchlight 2, X-Com Enemy Unknown, Trine 2. With AMD binary driver, all of them had bugs, artefacts and hangs. They run fine with Mesa.

Mesa driver is good, as long as you target OpenGL 3.3 or less.

And yes, I did report all those problem with the Binary driver to AMD. They just don’t care.

I hate to say it over and over again, but Epic and Nvidia are partners, therefore…well you get the idea. :slight_smile:

AMD doesn’t even look like the same company they were years ago. I’ve been using ATI/AMD cards for 10 years and I’m giving up too. Their first drivers were amazing and some games ran faster on Linux than on Windows, but now I don’t even have drivers anymore (for an old HD3870) because they don’t compile at all on newer kernels. While I could install the oficial drivers, I always had problem with stuff that worked nicely on Nvidia cards but on mine didn’t even work.
At least Mesa is holding up, I’m clearing my huge gaming backlog and it’s still fine for low poly 3D modelling.
This year I’m going for a GTX 980.

That bug seems to be the same as mine, but on an older version.

You can work around the crash by editing ConsoleVariables.ini and adding a line


It is unclear what exactly is broken and at some later point we plan to look into that. The fact that it only happens with mesa drivers (on NVidia & AMD, but not Intel) may or may not be a red herring.

Any update on the status of that bug ?

No; this only happens with certain Mesa drivers which we don’t normally use (we run NVidia binary + occasionally Intel and both those don’t have that problem). While we don’t rule out that we will try to repro that problem locally at some point to check why drivers are a factor here at all, we haven’t yet had time to do that.