I had exactly the same problem inside an AsyncTask, while debugging on a real device (Galaxy Tab 2). So I too can confirm, that this strange problem is real.
For me the accepted answer didn't help.
But in my case the problem mysteriously went away after unplugging the usb plug of the device and connecting it again afterwards (and then running my app again).