iOS Compressed PNG Crash

Edit:
I’ve come up with a very simple repro: This image will crash Roblox on iOS (but not the iOS developer app):

"http://roblox.com/asset/?id=415106632" -- Using tinypng

The same image without the compression (shouldn’t crash):

"http://roblox.com/asset/?id=415106787" -- No compression
"http://roblox.com/asset/?id=415106726" -- Regular compression

Here’s a convenient repro place:

I’ve been using a Photoshop plugin from tinypng to compress my images to png before uploading, and all of them crash iOS devices. It cuts file sizes in half without much loss; I could reupload all of my decals, but a crash is a crash and should probably be fixed.

Here’s the image compressed using tinypng:

Here’s the image compressed normally:

Original post:

A few weeks ago the game I’m working on started crashing randomly right after joining the game on iOS. It only happens for iOS Roblox app; it doesn’t crash when using android or the iOS Roblox developer app.

I spent today sifting through my 60k lines of code isolating the problem. Everything in my game uses the same module for formatting asset content urls, and when I modify that function to always return “” (so that assets don’t load), the game stops crashing on iOS.

Normal build of the game (crashes):

Assets removed (1 line difference):

Extra info:
Tested on iPad Air 2, iPad Mini 2 and Note 4
I use tinypng to compress large images. I uploaded most icons at 64x64, 256x256 and 1024x1024, it selects the icon based on the size of the image on screen, so not many 1024x1024 textures are loading (maybe one or two).

1 Like

Do you preload assets? My mall sued to crash often because everything would load at once and mobile doesn’t like that.

It doesn’t crash if I only preload the assets. The crash seems to happen when setting properties like decal.TextureId and imageLabel.Image. Maybe png decompression is slow.

Just made a simple repro; edited the post.

Can repro (thanks for a simple repro!), working on a fix.

1 Like

Will be fixed with next iOS update (in a week or less hopefully)

2 Likes