Debugging MTLCommandBufferErrorTimeout crash

Hello,

Currently we're running a game with UE4 (4.17.1) on IOS 11 and we're getting some crash reports from the customers regarding crash caused by


MTLCommandBufferErrorTimeout. The crash is very hard to reproduce locally so currently we have no clue of how to fix it.


Do you have any suggestions regarding how to tackle this kind of crashes?


Thanks

Replies

Common reasons for getting that error


1) Out of access memory access in a shader or draw

2) Shader running too long (in an infinite loop perhaps)

3) Driver bug 😟


Not much you can do about 3, but if you file a bug at bugreport.apple.com with crash info and what your app is doing at the time of the crash, it will help.


I suggest auditing your shader code to check if you're accessing memory out of bounds of a buffer. And also check that when you perform a drawIndexedPrimitive call, that your app is not trying to draw indices outside index buffer you've proviced.


A shader running too long is less common, but if you're looping on a dynamically set variable, it's possible you've set the wrong (too high) value.