title: Strange error in Android app
body: <p>I am taking photos via Intent. In certain phones like Samsung with around 750 mb RAM, the app suddenly closes after taking the pic. When I saw the event in logcat, it  was showing following:</p>
  
  <pre><code>ViewRootImpl #2 Surface is not valid
  </code></pre>
  
  <p>What do this mean and how do I correct it. This error is not happening in other phones I tested and this is specific to taking pics via intent only. Because, I am also taking videos in that Samsung phone, and it worked flawlessly. 
  The scenario is:
  My app started->I press a button to take a pic->Pic is captured.->Pic is said to be saved->   Now instead of displaying the gallery, the app just closes off without any notice and also there is a noticeable lag between taking pic and saving it. </p>
  
  <p>Note: Pic is saved to internal storage via EXTRA_OUTPUT intent given to it.</p>