Eminem Function crash on iPhone 13
- Jeff Ranasinghe
- May 24
- 1 min read
Updated: May 25
Discovery and the threat of Panic
A little while ago, out of nowhere, I started seeing crashes in App Store Connect. A friend, new to the app, couldn’t launch it either as it would crash on his iPhone immediately - blaow.
Precision Weirdness vs. Eminem
In the process of developing Muser Studio I wrote an algorithm to take a number of overlapping rectangles and create a smooth path around the outside (as Eminem would say). Well, on iPhone 13 the calculation resulted in rectangular edges that were 0.001 off, and thus Eminem function couldn’t determine this path and would choke.
No trailer park girls for iPhone 13, apparently.

The Fix
So it was back to the Lab again. Quantising the value was the answer, effectively taking near-matching edges and snapping back to reality to get them in a continuous line. No more sub-pixel drama, and instead the path drawing successfully went 'round the outside, 'round the outside, 'round the outside.
No more crashes on iPhone and the Moral of this Story
If your drawing algorithm relies on exact equality between floats, consider maybe adding a little forgiveness.
Comments