title: Android app crashes with SIGABRT Signal 6 only while Eclipse debugging
body: <p>I have an app that runs perfectly fine on a device without a debugger attached. However, I have a problem when debugging in Eclipse:</p>
  
  <p><em>When the main thread is suspended for about 10 seconds or more (for example after hitting a breakpoint), the main thread throws a SIGABRT, apparently coming from libc.</em> </p>
  
  <p>The only explanation I could think of is that the message queue on the main thread, when not being polled, is overflowing with messages coming from another thread. However, I don't see the heap growing when the main thread is suspended. Moreover, while my app has about 20 threads between all services, content providers, broadcast receivers, http and map worker threads, etc., I can't really think of a source of any excessive messages.</p>
  
  <p>So my question is: How do I fix this problem? What tools can I use and how do I go about finding what is causing my app to crash while sitting suspended in the debugger?</p>
  
  <p><strong>Edit 1:</strong> </p>
  
  <p>The only thing in logcat is:</p>
  
  <pre><code>02-05 22:23:54.861: I/dalvikvm(26795): threadid=3: reacting to signal 3
  02-05 22:23:54.901: D/dalvikvm(26795): threadid=1: still suspended after undo (sc=1 dc=1)
  02-05 22:23:54.901: I/dalvikvm(26795): Wrote stack traces to '/data/anr/traces.txt'
  02-05 22:23:58.905: A/libc(26795): Fatal signal 6 (SIGABRT) at 0x000002f5 (code=0), thread 26795 (om.myapp)
  </code></pre>
  
  <p><strong>Edit 2:</strong></p>
  
  <p>Further investigation leads me to believe it is android intentionally killing my process because it mistakenly thinks the UI thread is hung. The problem is NOT in my app. So now my question is: How do I stop Android from killing my process while debugging?</p>