Why do some Unicode text messages crash the iPhone OS? Recently a new "glitch" has surfaced over the Internet over the last few weeks where if an iPhone user is sent:

  effective. 
      Power
           لُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ
 冗


via iMessage it crashes the phone OS temporarily and force restarts the receiving phone.

Why does this work?
If you need a fix for this, use Siri or a Mac using iMessage to send yourself a new message. See https://support.apple.com/en-us/HT204897

It's a three step procedure to recover and a future software update will patch this bug.


Ask Siri to "read unread messages."
Use Siri to reply to the malicious message. After you reply, you'll be able to open Messages again.
If the issue continues, tap and hold the malicious message, tap More, and delete the message from the thread.




As to why it happens, it's a specific bug in the way Notification Center renders the Unicode content of this message. The code performs an "unsafe" operation (something akin to 5 divided by 0 and then doesn't check for an unexpected results) that causes an unhandled error.  

Then since Notification Center can not render the block of text and ultimately crashes the Springboard which didn't have code to handle this failure gracefully.
When no specific error handler is present, most operations have a fail safe "reboot yourself" to try and remedy the error.

Unicode is a way of encoding characters used to handle languages that have a greater character count than English. Programmers can have problems with it because they learned to program using ASCII text and they neglect to write their software with full Unicode support.

One good article on this explains "if you're still programming that way, you're not much better than a medical doctor who doesn't believe in germs".

This other article explains this specific situation well.

Apple could either do tighter code reviews, have specific unit tests or let end users fuzz test their code like in this and similar cases.