Tuesday, September 11, 2012

Advanced ACRA 2: Frequent errors detection

In my first ACRA post I wrote about detecting which Android versions generates the errors using Google Docs. This time I'll write on the most basic problem - finding which error happens the most. It is possible to group by full stack trace, however, the stack trace are not the same even on exactly the same errors. Instead, my approach is to compare the exception & the function that actually threw the exception. It might produce incorrect results if there are multiple similar exceptions.

Here's how it's done, open the Google Doc's ACRA spreadsheet:
  1. Rename the first sheet to 'Sheet1'
  2. Add new sheet
  3. In Cell A1 set text: "Short Stack"
  4. In Cell A2 set text: "=LEFT(Sheet1!P2,FIND("(", Sheet1!P2, 1))"
  5. Copy cell A2 to match the rows in Sheet1 (e.g. to cells A3, A4, A5, ...)
  6. Select column A in Sheet2, and create a pivot table ("Data" -> "Pivot table report...")
  7. In the pivot table sheet:
    • "Rows" -> "Add field" : "Short Stack"
    • "Values" -> "Add field" : "Short Stack", summarize by: "COUNTA"
Note: this list is for ACRA v4.2.3. With ACRA 4.3.0+ the 'Stack Trace' column might not be P