UE 5.1 iOS Shipping Only Memory Leak

mindblender
Wed, 30 Nov 2022 02:59:42 +0000
Mobile

Hi fellow developers and awesome people at Epic,

I had quite a dev journey today discovering a crash and learned a lot during investigation. So, I’d make a post as well as report this bug.

Before all, I’m using UE 5.1 (source build) on Mac Ventura with Xcode 14.1. Also, I’m using iPhone 11 Pro Max/ iOS 16.1.1.

When I tested my game on my phone, I discovered a crash after 10-15 min of gameplay. I tried to extract crash logs, no luck. No assertion, no out-of-memory logs. I reproduced the issue while Console.app is streaming all the device outputs. Then, I discovered “per-process-limit” kill command issued. (Screenshot here) Strangely, this kill command leaves no out-of-memory crash logs, but the log message indicates that iOS wasn’t happy about my game’s memory usages (as shown in the screenshot).

Next, I tried to figure out profile memory. I added the launch “-trace=default,memory” option for standalone game via project settings to use the console command stat LLMFULL. But, I didn’t find anything wrong.

I wanted to check the same with iOS device but I couldn’t figure out how to launch the app with custom launch parameters (-trace=…) for iOS device after enabling console with four finger tap, which I didn’t know it existed via project settings.

Finally, I tried Instruments.app which came with Xcode installation. Then, I found this continuous memory footprint increase. (Screenshot here).

Marking generation shows some texture and buffer instances keep growing. (Screenshot here).

At this point, I realized that I was analyzing with Shipping build. I wanted to check how Development build would do. I found that Development build didn’t leak! (Screenshot here)

I’m guessing I can workaround the issue by using “Development” build for now. But, I would lose all the optimization via Shipping build… I hope this is fixed soon.

4 posts - 3 participants