title: Android application exits without any exception
body: <p>I'm building an application that shows in a WebView some remote data that is cached in SQLite db. The data is being requested by JavaScript function from WebView via JavaScript interface.</p>
  
  <p>When user types into an input element on the page, JavaScript function requests search result by calling Java function, which in turn fires a sql query. Results are then packaged in suitable JSON format and returned.</p>
  
  <p>Fetching data works OK unless you type very quickly. If you type quick enough after few key presses the app quits <strong>WITHOUT</strong> any exceptions being thrown, it just goes back to home screen.</p>
  
  <p>I have managed to narrow down the cause - commenting out the call to .query method prevents crashing, but renders app useless.</p>
  
  <p><strong>Is there a way to check what caused application to quit, another log or tool that could help?</strong></p>
  
  <p>Java function code:</p>
  
  <pre><code>    public Lot[] getLotList(String query, int limitCount) {
      ...
      ...
      String[] resultColumns = new String[] { LotsSearch._ID };
      String queryWhere = LotsSearch.TABLE_NAME + " MATCH ?";
      String[] queryArgs = new String[] { query + "*" };
      String sortOrder = LotsSearch.COLUMN_NAME_NUMBER + " ASC, " + LotsSearch.COLUMN_NAME_TITLE + " ASC";
      String limit = null;
      Cursor cursor = null;
      if (limitCount != -1)
          limit = "0," + limitCount;
      try {
          cursor = mDb.query(LotsSearch.TABLE_NAME, resultColumns, queryWhere, queryArgs, null, null, sortOrder, limit);
          if (cursor != null &amp;&amp; cursor.moveToFirst()) {
              result = new Lot[cursor.getCount()];
              try {
                  int idColumnIndex = cursor.getColumnIndexOrThrow(LotsSearch._ID);
                  int lotId;
                  Lot lot;
                  do {
                      lotId = cursor.getInt(idColumnIndex);
                      lot = mLots.get(lotId);
                      if (lot != null)
                          result[index++] = lot;
                  } while (cursor.moveToNext());
              } catch (IllegalArgumentException e) {
                  e.printStackTrace();
              }
          }
      } catch (SQLiteException e) {
          e.printStackTrace();
      } finally {
          if (cursor != null)
              cursor.close();
      }
      ...
      ...
      return result;
  }
  </code></pre>
  
  <hr>
  
  <p>UPDATE:</p>
  
  <p>I have discovered that there is another log that could be accessed by issuing </p>
  
  <pre><code>logcat -b events
  </code></pre>
  
  <p>when the app crashes there is just one entry</p>
  
  <pre><code>I/am_proc_died(   59): [11473,com.example.app] 
  </code></pre>
  
  <p>and when the app exits gracefuly this log shows set of entries:</p>
  
  <pre><code>I/am_finish_activity(   59): [1157978656,22,com.example.app/.MainActivity,app-request]
  I/am_pause_activity(   59): [1157978656,com.example.app/.MainActivity]
  I/am_on_paused_called(11473): com.example.app.MainActivity
  I/am_destroy_activity(   59): [1157978656,22,com.example.app/.MainActivity] 
  </code></pre>