what caused IOException and Broken pipe

My AVD is of API 15, I don't know why but the following message keeps coming up whenever I run an application on emulator. It doesn't seem to have caused any trouble except for the error message in console.

[2012-06-17 00:03:26 - ddmlib] Broken pipe
java.io.IOException: Broken pipe
    at sun.nio.ch.FileDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:122)
    at sun.nio.ch.IOUtil.write(IOUtil.java:93)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:352)
    at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213)
    at com.android.ddmlib.Client.sendAndConsume(Client.java:575)
    at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:348)
    at com.android.ddmlib.Client.requestAllocationStatus(Client.java:421)
    at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:837)
    at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:805)
    at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:765)
    at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:652)
    at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:44)
    at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:580)

What could be the cause?


If someone uses both eclipse and android studio together, then this error will be thrown by eclipse. So even if you select the device through DDMS, its gonna throw this error.


Old question, but still relevant and I didn't see any other answer with this information:

For me it happened when another Eclipse was running at the same time, with DDMS competing over the same socket as the eclipse trying to connect to the Android device.

Solution was to close the other Eclipse. Hope it helps someone.

Update: Probably a better solution is to edit the DDMS port of the other eclipse to something you don't use. So it's out of the race.