My smartass brother sent this to me via iMessage, I heard my phone so tried opening Messenger on the Macbook. Crash. Left it at that as I was busy anyway. Later he rang and asked if I'd opened the message. Oh great! I could sense him grinning, and I knew what had happened. The iPhone can show it, so no data detector or whatever is causing it there. I turned on the iMac and checked Messages, and it crashed as soon as I opened it. Thanks a lot brother-of-mine!
Well at least it backfired on him, as his messages also crashes now, as it shows the history on opening, so he's asking ME how to fix it!
I looked through this forum, and tried the suggestion of deleting the message on the iPhone for syncing, and then deleting
~/Library/Messages/Archive/[date]/[log] on the Macbook.
Didn't work.
Checking on my iMac, there was no log for that day; Messages had crashed as it synced before logging it.
I tried the suggestion with Autocorrect, makes no difference.
Since there was no log on the iMac, it had to be somewhere else, so I backed up and opened ~/Library/Messages/chat.db in Textwrangler. There was several occurrences of the string, so I did a search and replace on File: to file:
That did it.
Messages now works again on the iMac. Time to check on the Macbook.
Well, it didn't like me writing to the chat.db, apparently in use. I let it slide for a bit. By the time I got back to it, it was after midnight, and hence the next day, and the offending code wasn't showing in the chat window anyway, so Messages worked again.
The moral: Be wary of smartass brothers.