#4251116: Crash with Shift_JIS-encoded XML data
My Apple bug of the week is #4251116, a crash in the CoreFoundation XML parser that often happens with Shift_JIS-encoded feeds.
I even created a small project to demonstrate it: download ShiftJISCrash.zip.
To reproduce the crash, launch the application (at ShiftJISCrash/build/Release/ShiftJISCrash.app), then click the “Parse Shift_JIS File” button.
Inside the app’s bundle is a Shift_JIS-encoded feed that crashes whenever CFXMLTreeCreateFromData is called. (The feed is ShiftJISCrash.xml, at the top level of the project folder.)
(Remember the Safari Image of Doom? You could call this the CoreFoundation XML File of Doom.)
The thing about crashing bugs like this is that any developer worth anything takes great pride in writing stable applications. It’s the first principle of craftsmanship: don’t build things that fall down.
When your app crashes due to a bug in the system, your users think it’s your bug. How would they know differently? Your app crashed, therefore it’s a bug in your app, right?
Except when it’s not, except when it’s a bug in the system. But how would the average user be able to tell the difference? (It’s important because your reputation is at stake.)
There is no real answer to that question. So the best thing is to get the crashing bugs out of the system.
More about bugs and crashes...
Sven-S. Porst filed a bug about nicknames in Mail.
For more, see the applebugfriday page on del.icio.us.