Both my Surround and my L900 don't like to have speakers or headphones plugged/unplugged when music is playing. Both phones will usually throw a sissy fit, locking up, noting, or having the volume repeatedly go down to 0 even as you try to raise it. I assumed it was an electrical issue on the Surround, but as I have see similar quirks on the L900, I am leaning towards some kind of bug.
I always make sure music is paused, and the plug is firmly inserted/removed before playing music. Maybe not ideal, but it works for me.
Sent from my Lumia 900 using Board Express Pro