Crash when using metal API (iOS)

Dear,

My mobile game sometimes die when metal API is enabled. Especially it crashes right after open new level. Call stack screenshot is attached. I think some dynamic material instance causes this problem but I can’t find which material is problem.

And, is there any way to debug unreal engine in mac environment? This will help find out this solution.

Please help me

Hi cordis1203,

As to the debugging on Mac, have a look at [this other AnswerHub thread][1] and see if that helps.

Can you include crash from your device? To what device are you deploying?

What is the Mac/Xcode equivalent to starting a new debug instance via Visual Studio? - Debugging, Optimization, & Profiling - Epic Developer Community Forums

It happenes very rarely. So I can’t assure I’ll include crash log. My friend who has also tells me she experiences crash sometimes but I can’t get anymore information because she is not expert. My device is iPhone 6 which is also use metal API.

A couple of month ago, I turned off metal API due to crash. I couldn’t take look into it at that time because of short of schedule.

Now, It is to good for performance to ignore the problem. Please examine this problem and sorry for I can’t provide more information.

Hi cordis1203,

Looking at your call stack, I see some rendering/shading modules are involved. Note that at this point [UE4 only supports GLES2 and Metal][1], so if you’re trying to develop for GLES3 and up it will fail. There is a known issue where Metal is not taking the non-uniform buffer path for GPU skinning, and this can cause a crash. It is also addressed in that linked forums thread. That bug has been fixed and should make it into the 4.8 release.

Does it sound like any of this could be causing your crash? Have you had any more luck pinning down what might be causing it on your end?

Thanks!

Matinee crashes on iOS ? - C++ - Epic Developer Community Forums

Hi cordis1203,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

Thanks for notice. I couldn’t test or investigate it due to schedule. For now, close the issue and I’ll look into it later. Thanks. :slight_smile:

We’ve hit a similar problem in 4.8.3. Let me know if I should start a new thread but here’s what our stack looks like. The assert is being cause by NumBytes = 244480. We’re not sure exactly what could be causing this. Any ideas would be helpful.

At line 19 in the stack, I see the mesh object being drawn is an FSkeletalMeshObjectGPUSkin* so it seems that the GPUSkinning issue still exists?

Hey Alk3ovation,

Have you tried the suggestions posted above by our staff? If so, could you explain what happened as a result?

Thank you!

What suggestion specifically? I don’t see any suggestions.

Hey,

Are you working on a Mac? If so, there is a debugging AnswerHub posted by above that may help you a bit further. Could you also please upload for us to review?

With that being said Forward Rendering with Metal (A7 and Up) is actually causing iOS crashes in 4.9 and isn’t expected to be fixed until 4.10. It sounds like that’s one of the settings that you’re using currently.

Oh yes, I am debugging on a mac. I have a very similar stack trace to the one above. I can attach a log from one of the crashed sessions. However that log also contains a bunch of output that I added to try and debug it.

Can you link me to or tell me about the metal rendering crash in 4.9? I’d like to see if it’s the same thing we are experiencing or something different.

What’s happening with the metal rendering crash is when it’s selected and you package or launch onto an iOS device, it’ll crash immediately to the homescreen on the device. Looking over this bug again, I see that it’s actually been fixed and we’re expecting it to be released in 4.9.2.

Oh ok, well we’re not seeing that behavior. We were seeing a very similar crash as the one reported here during a map load. It seemed to happen randomly, as in not on every map load. Seems like some struct internal to the Metal RHI is getting its memory corrupted. I have a ticket open on udn. I posted here though before the UDN post.

In your UDN please include the full so that we can easily see what’s going on within your project.