App crashes with Google Map Tiles on iOS16

So here is the quick version:
I created a new mobile-compatible game using the First Person template from Epic.
Set up a new “Maps Level” following these instructions
Add in apple developer certificates and provisions and such
Build the iOS app.
Installed the iOS app on my iPad (iOS16)
run the app the first time and everything works great!
run the app the next time and i get a brief glimpse of the sky before the app crashes.
run the app the next N-times and get the same result, near instant crash.

This is on iOS16. If i run the app on iOS17 then it does not crash
If I use Bing Maps then it does not crash.
Unreal 5.2
Cesium for UE plugin 2.2.0

I set this up in the first person template to prove that it wasn’t a problem with the app that i built at the end of last year. I tested my app using iOS16 and it all worked perfectly fine. then I’d sorta put the Cesium/Maps part to the side as i focused on something else. Then about a week ago I got a report of the Maps part not working. and i go a look and my app crashes when loading the maps. So what I’m saying is between early-December and now something in the Google Map Tiles seems to have changed that is causing this crash.

any ideas?

That’s pretty mysterious. Can you get a call stack of the crash from the device? Or the Unreal log more generally?

Here are the Unreal logs and the Xcode device logs from the first run where it works and the subsequent runs, where it does not work.

Also to note. If you completely shutdown the iPad and restart it then it “resets” and you can run the app again the 1st time successfully. But then on subsequent runs it crashes.
Also, you can “reset” it by copying the .ipa app file onto the iPad again.

Cesium iOS (291.0 KB)

I see this in the log:

default	13:08:03.341742+0000	ReportCrash	ASI found [libsystem_malloc.dylib] (sensitive) 'firstPerson(2953,0x16c3bb000) malloc: *** error for object 0x127244140: pointer being freed was not allocated
default	13:08:04.492816+0000	ReportCrash	Formulating fatal 309 report for corpse[2953] firstPerson
default	13:08:04.495369+0000	ReportCrash	loadStoreInfo [platform 2] com.ttfdev.artollkitapp from file:///private/var/containers/Bundle/Application/AB95D49F-D4D4-4DBF-A75E-C80FFC76320D/
default	13:08:04.497636+0000	osanalyticshelper	creating type 309 as /private/var/mobile/Library/Logs/CrashReporter/.firstPerson-2024-01-18-130804.ips
default	13:08:04.505446+0000	osanalyticshelper	Saved type '309(<private>)' report (7 of max 25) at /private/var/mobile/Library/Logs/CrashReporter/firstPerson-2024-01-18-130804.ips

I don’t know what the means, but there might be more information in that /private/var/mobile/Library/Logs/CrashReporter/firstPerson-2024-01-18-130804.ips file it mentions. If you can get XCode to stop on the crash, and get a call stack, that should shed a lot of light on it, too.

i got the log file. I took a look and it doesn’t look to my untrained eye that there is anything useful in there.

but I don’t think I can get a stack trace because my project is not in Xcode. (7.5 KB)


I solved it!
I just saw this post:

and reading that and looking at my device output and it looked like a similar pointer issue.
So i just did the fix from that post and it worked like a charm!