title: Where to start debugging, when you get the "Activity is not responding, Force Close, Wait"?
body: <p>I have worked on a simple application. It application includes diffrent levels that can be solved by placing some components inside a canvas, dragging them to the right place and so on.</p>
  
  <p>The application is working fine, but when trying it on my HTC Desire 2.2, I <em>sometimes</em> get the warning message:</p>
  
  <p><strong>Sorry:
  Activity xxxxx is not respoding.
  <em>Force Close - Wait</em></strong></p>
  
  <p>If I press the wait-button and let it be for some seconds (up to ~30 sec sometimes), then it runs without any problems. I don´t know where I should start debugging the code, since it happenes only once in a while.</p>
  
  <p>I have read the stuff in google developer site and it was just mostly very general stuff that did not really help.</p>
  
  <p>any ideas?</p>
  
  <p>since, I was not able to debug the problem myself, I am going to post the most important parts of the application. Please check and let me know If I need to post more classes.</p>
  
  <pre><code>//Evrything else
  Bitmap bitmap;
  GraphicObject.Coordinates coords;
  for (GraphicObject graphic : _graphics) {
      bitmap = graphic.getGraphic();
      coords = graphic.getCoordinates();
      canvas.drawBitmap(bitmap, coords.getX(), coords.getY(), null);
  }
  // draw current graphic at last...
  if (_currentGraphic != null) {
      bitmap = _currentGraphic.getGraphic();
      coords = _currentGraphic.getCoordinates();
      canvas.drawBitmap(bitmap, coords.getX(), coords.getY(), null);
  }
  </code></pre>