Reply to post: Re: OK it complex to render

Apple Macs, iThings, smart watches choke on tiny Indian delicacy

handleoclast

Re: OK it complex to render

I don't know about the OP but what I'm asking for is for a font renderer to be able to either render a glyph or error out sensibly, not just crash.

I'd like all sorts of software to not crash. To be able to handle unexpected input and not crash. To be able to handle anything I throw at it and not crash. I'd like it, instead of crashing, to pop up an error box saying "This file is a corrupted heap of steaming shite" or "You just asked to do something incredibly stupid." This is the ideal behaviour. But Windows 10 is still out there.

And yes, I'd kind of hope that a font rendering engine would handle both legitimate and illegitimate character sequences correctly. Or at least display an "I couldn't figure out how to display that" box. This is the ideal behaviour.

Software isn't ideal. Sometimes people introduce bugs. Off-by-one errors. Walking off the ends of arrays. Stupid stuff like that. And it's not always easy to prove your code is correct or to test all possible cases. Which is what happened here. Some obscure character combination exposed a bug of some sort in the font renderer and it fell over.

Yes, in an ideal world all software would have exception handlers that deal with bugs. Except for the ones it can't handle. Like when an exception isn't thrown. Like when the code does an array walk through all of the device's memory, or goes into an endless loop, or something like that.

Yes, you can get around infinite loops with some sort of watchdog interrupt. Which can cause other problems, like false positives because your device is multi-tasking its way through too many monero-mining tabs in your browers. There comes a point where error-handling code becomes so complex it introduces more errors than it catches.

In an ideal world the font renderer wouldn't have crashed but would have displayed an error message. In an idealer world it wouldn't have had a bug in the first place. In the meantime, try to make your peace with reality because you'll be spending the rest of your life here.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon