Back to DeveloperDocs

Automatic Bug Reporter

This is an interface-proposal for a component *Automatic Bug
Reporter*, which is being built to address ticket #1667,
"Automatically notify developers on crash".
Whenever a PHP crash occurs for a client, they will be given an
apology-screen, encouraging them to enter in an explanation of what
they were doing.  Their description, along with error information (eg
stack trace), is then sent to Campware via HTTP, where the automatic
bug tracker is notified.
It is then added to a "bug-Inbox", where an admin can view the various
new bugs, and decide which ones to add to Trac, and which ones to
delete.  Duplicate bugs are not added to the inbox; instead their
comments are added to the ticket containing the original bug report.
Automatic Bug Reporter has three screens.  The first screen is the
client interface:
   Campsite Problem
   ================
   Please Tell Campware about your error
   -------------------------------------
   Campsite has encountered a problem.  We are sorry for the
   inconvenience.
   The Campsite development team will be investigating this issue.  In
   order to help them pinpoint the issue please take a moment to describe
   what happened.
   What were you doing when the problem occurred?
    .................................................................
   .                                                                 .
   .                                                                 .
   .                                                                 .
   .                                                                 .
   .                                                                 .
    .................................................................
   Email address (optional) _________________________________________
     To see the error report, click here
     V  [Expander]
      -----------------------------------------------------------------
     |
     | Error Report
     |
     |   Error ID: 91:Campsite:1.6:login.php:23
     |   Software: Campsite
     |   Error Message: Array out of Bounds
     |   Error Number: 91 
     |   Time: 2006 August 1st, 01:10:21 GMT
     |   Browser name: Internet Explorer
     |   Browser version: 5.1 
     |   Stacktrace: [multiline stacktrace]
     | 
      -----------------------------------------------------------------
This is what the user sees in their browser when a Campsite crash
occurs.  It encourages them to send a description of what they were
doing and their email.
The details of the error are sent to Campware (via HTTP), unless that
machine's admin has toggled off that option.  
The error information is then sent to Campware, and picked up by the
Automatic Bug Reporter.  These new tickets can be accessed by going to the
"Ticket Inbox" page.  This page can be accessed by pressing the
"Ticket Inbox" link on the navigation bar (Wiki, Timeline, etc.).
Here is the Ticket Inbox page:
   Ticket Inbox                                            
   ============
   Inbox                                           
   -----
   Ticket  Summary Component        Vers.  Severity  Owner        Created
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   #2910   I forgot to enter my...  1.6    Crash     Randy        06/06/06
   #1920   When I was editing a...  1.7    Crash     Marsha       06/01/22
   #2555   When I logged in...      1.6    Crash     Chris        06/05/13
   Postponed                                               
   ---------
   Ticket  Summary Component        Vers.  Severity  Owner        Created
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   #3000   I forgot to enter my...  1.7    Crash     John         06/06/06
   #1299   When I was editing a...  1.6    Crash     Helen        06/01/22
   #3001   When I logged in...      1.6    Crash     Jane         06/05/13
The Ticket Inbox page is very similar to the "View Tickets by
Milestone page".  The differences essentially being the title, and
that the view is new auto-generated errors.
The admin's job here is to move new tickets out of Inbox.  The tickets
can either be moved to the regular Trac database (where they can be
viewed from "Tickets by Milestone", etc), or to Postponed, or
deleted.  The Postponed option is for errors the admin hasn't yet
decided whether or not to delete.  
The moving of tickets out of inbox is done on the Ticket Inbox Details
Screen:
   Ticket Inbox 
   ============
   Ticket #999
   ~~~~~~~~~~~
   Error 91:Campsite:1.6:login.php:23
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ----------------------------------------------------------------------------
   Priority:    Urgent            Reporter:     Jon Smith ([email protected])
   Severity:    Crash             Occurences:   23
   Component:   [blank]           Assigned to:  [blank]
   Version:     1.6               Status:       new
   Milestone:   [blank]           Resolution:   [blank]
                                  Keywords:     [blank]
   Description by Jon Smith:
   I forgot to enter my password when I logged in.
   Stack Trace:
      [stacktrace here]
   ----------------------------------------------------------------------------
   Action [dropdown]
   * Postpone
   * Accept
   * Delete
   Changelog
   Jun 3 23:15:07 2006: Modified by Paul Jones ([email protected])
       * I can't log in.
         Stack Trace:
            [stack trace here]
This page is very similar to the Trac Ticket Details page.  The key
differences are that the error ID is displayed in the title, there is
an "Occurrences" field (which lists the number of times this error has
occurred), and there is an Action dropdown menu (which lets the admin
move this error to be among the other Trac tickets, delete it, or
postpone that decision).  
The software determines duplicate errors by whether they have the same
error ID.  The error ID is composed as follows:
'ErrorNum:SoftwareName:SoftwareVersion:FileName:LineNum'.  In cases
where new incoming errors are duplicates of old errors, the errors do
not appear as new Inbox items, instead they are simply added as a
comment to the trac ticket containing the orginal error report.
The only new information contained in duplicate errors are the
customers' ID, their comment, and (possibly) their stacktrace.  The
fields for the user ID and comment is straight forward (as it's built
into track).  The stacktrace will be appended to the end of the user
comment.