Closed kergoth closed 10 years ago
This is really two separate issues: the first is that 1c3ba401d05f02ef7a1e51920d12d3acbf382f3b had a trivial compile error because I haven't learned to test before pushing. This is now fixed in 45835cbb12e640137f1145a4a454b1925e5900d6.
The second and more aggravating issue is that -saveAsIconToURL:error:
would crash in this way if CGImageDestinationCreateWithURL
returns NULL - which Apple's documentation gives no indication it will ever do, let alone under what circumstances.
I'm not able to replicate the crash myself, but I have improved the error handling in 40602a1bfe3687cc16d7a039e5b98922e32916f6 so the bundler will no longer crash if it can't save the app icon: however it'll still fail to export, and should present you with an (unhelpful) error message.
Could you give some further details about what you were doing when the bundler crashed: in particular to where were you trying to save the app (i.e. what kind of volume was it, could it have been a read-only location etc), and also what kind of icon you had assigned to the app?
I'll have to set up a reproducer again when I get a chance, I'll get back to you when I run into it next.
OK, so it turns out the reason why it's failing is because CGImageDestinationCreateWithURL
is choking when trying to prepare an icon that will contain more than 10 different size variations. Which isn't documented anywhere, naturally.
Boxer Bundler is loading the icon off the gamebox you drop in, then saving the icon back out as an icns file to the destination app. Previously the icon data was getting roundtripped just fine, but OS X 10.9 is now reporting a lot more size variations (up to 15) than the original icon actually contains: apparently it now includes synthesized variations for retina displays, among other things.
The solution then is for Boxer to cull unnecessary size variations from the icon before saving it, to keep the maximum down below 11.
This issue is now fixed by f3f51bb. Note however that any standalone apps built with this version will fail at startup owing to issue https://github.com/alunbestor/Boxer/issues/38 - wait until that one is fixed before trying out the bundler again.
(Was: Boxer Bundler built from master (9c2243e) crashes)
Had to back up to 9c2243e to get boxer to build at all, then encounter this trying to use bundler: