Some virus can cause this bug in Yahoo Messenger. Check your Internet Options, go to Security Tab, and see if there is a new item. Normal items there are Internet, Local Intranet, Trusted sites, and Restricted sites. If you see a new item, chances are you were hit by a virus.
To resolve this, open a registry editor (click Start, click Run. On the Open box, type: regedit and then press Enter). Navigate to the following key: HKEY_CURRENT_USER \ Software \ Microsoft\ Windows \ CurrentVersion \ Internet Settings \ Zones
There should only be 5 items there, numbered 0 to 4. If you see a different one, especially if you see items that shows up as box, try deleting it. (Backup your registry first). If you were able to delete that extra item, this might fix the bug, and you will be able to see the chat messages again in yahoo messenger.