This section describes how to view runtime errors reported by Insure++. In this section:

Introduction

The Insra module is Insure++'s GUI for displaying memory leaks, uncaught exceptions, and bugs reported by Insure++.  

Error Message Types

Insra shows the following types of error messages reported by Insure++:

IconDescription

Bug

Summary report

When the program exits normally, Insure creates summary reports that link to the report pages. 

Memory leak

Uncaught exception

Menu

The Insure++ menu contains items the perform actions in Insra and other Insure++ interfaces. 

File 

Run instrumented applications (see Sending Messages to Insra) and exit Insure++.

Edit

Use common operating system functions.

View

Change how Insra displays information.

  • Enable Suppressed Messages to include suppressions. Also see Viewing Suppressions.
  • Enable Follow Messages to highlight the latest message received in the main message panel.
  • Enable Notify on New Messages to allow a Windows message to appear when an error is detected.
  • Enable Waterfall to show display messages in the order they were received. 

Summarize

Choose an option displaying how messages are summarized.

Sort

Choose an option for sorting messages.

Message

  • Choose Previous or Next to cycle through error messages.
  • Choose Suppress... with an error selected to suppress the message. See Suppressions for details. 
  • Choose Clear All Messages to remove all error messages from Insra. 

Window

Choose which Insure++ interfaces to display. You can choose the following:

  • Insra: Switches to the main results screen. 
  • Suppress...: Switches to the Suppressions screen.
  • Control Panel...: Opens the Insure++ control panel.  
  • Close: Closes the currently-selected interface. The Insra interface cannot be closed.

Toolbar

Depending on the type of summary report you are viewing, the following buttons may appear in the toolbar:

  1. Click the Next/Previous buttons to cycle through error messages in the navigation panel.
  2. Choose an error message or session and click the Suppress button to apply a suppression. Suppressions can be applied per individual instance, source code file, or the entire project. See Suppressions for additional information.
  3. Click the View Suppressed button to include suppressed messages in the window. Suppressions are normally removed from view in Insra.
  4. Choose and error message or session and click the Delete button to remove it from view in Insra.
  5. Click the Documentation button to open the online error messages reference.

Sessions and Error Messages Panel

Error messages are grouped in the left panel by application execution session. You can click on a session or message to view additional information in the details panel. Active sessions are flagged with a yellow icon (also see Status Bar).

Message Details Panel

The top-right panel shows the session header and error message details.

Session Header

Click on a session in the Sessions and Error Messages Panel to view the following session details:

  • Program name
  • Execution arguments
  • Process ID
  • Source file/program
  • Compilation/execution timestamps
  • Memory allocation

Message

Click on a message in the Sessions and Error Messages Panel to view message details, which includes the following information:

  • Error category (e.g., READ_OVERFLOW)
  • Explanation of the error detected.
  • File name and line of source code where the error occurred.
  • Stack traces for quick reference to the original source.

You can click on a stack trace to launch an editor for viewing and correcting the indicated line of code. For more information, see Viewing Source Files.

Message headers will also appear for various summary reports generated by Insure++. These reports are generated using options in the Reports tab of the Insure++ Control Panel. See Report Summaries for more information. Double-clicking on a message header will open up the message window for the error or summary report selected.

Code Preview Panel

You can view the corresponding source code for a particular error message by clicking on a line in the stack trace. The sources is displayed in lower-right panel. You can click on the error type icon to open the source file in your editor. In most cases, the file and line number associated with a given message have been transmitted to Insra. If Insra is unable to locate the source file, a dialog box will appear requesting that you indicate the correct source file.  

Insra must know the name of your editor and the command line syntax in order to display the correct file and line from the original source code, as well as open the source file in your editor.

Configuring the Editor

Insra obtains this information by reading the Advanced Option value:

visual <editor_command>

This value may contain the special tokens %f and %l, which represent the file name and line number, respectively.

Status Bar

The bottom of the Insra frame is the status bar.

During compilation/runtime, Insure++ makes a connection to Insra each time an error is detected. The status bar reports the number of error messages currently displayed and the number of active connections. An active connection is denoted by a yellow star to the left of the session header. A connection remains active as long as the program is compiling/running. Insra will not allow you to delete a session header as long as its connection remains active, and you may not exit Insra until all connections have been closed.

Sending Messages to Insra

Applications instrumented with Insure++ will automatically send runtime errors to Insure. If Insra is not yet running, it will automatically start. Once the connection is established, a session header and all corresponding message headers will be reported in the order they were detected. Each new compilation or program, with its own session header and messages, will be displayed in the order in which it connected to Insra.

You can also use the Insra UI to run instrumented executables.

  1. Choose File > Run from the main menu.
  2. Specify the location of the instrumented executable (see Windows Usage for details on building with Insure).
  3. (Optional) Specify any additional commands you want to execute and/or working directory.
  4. Click OK

The application will run and any errors detected will be reported in Insra.

Suppressions

You can suppress errors that you do not plan to immediately address from the Insra UI. 

  1. Choose a message in the Message Details Panel and choose Message > Suppress from the main menu or click the Suppress button in the toolbar.
  2. Choose one of the suppression options when prompted:

    • Choose Only at <file, line> to suppress only the selected instance.
    • Choose Anywhere in <file> to suppress all instances in the selected file.
    • Choose Everywhere to suppress all instances detected in the project.
  3. Click Suppress.

The error will continue to be reported until fixed, but it will be suppressed from the default view. See Viewing Suppressions for information about reviewing suppressed errors. 

Viewing Suppressions

By default, applying a suppression hides the error from view, but you can expose suppressed errors by choosing View > Suppressed Messages from the main menu or by clicking the View Suppressions button in the toolbar. Suppressed messages will appear in the UI and will be slightly grayed-out.

Using the Suppressions Screen

The Suppressions screen shows all available error messages and enables you to choose which errors to always suppress. The screen also provides an interface for removing existing suppressions.

Choose Window > Suppressions from the main menu to open the Suppressions screen.

You can perform the following actions:

  • Click on the suppression icon or empty space before the error message code to enable/disable suppressions for all instances of reported erros. You can target more specific instances of the reported errors by suppressing from the message details panel (see Suppressions).    
  • Disable or change the limit for the number of times that the same errors should be reported. One instance of specific errors is reported by default.
  • You can un-suppress errors that were suppressed from the message details panel by selecting the error code and deleting the specific instance in the Details panel.
  • If you do not want to save changes to the suppressions configuration, click Revert to undo the changes.  

Deleting Messages

Once error messages have been read and analyzed, the user may wish to clear them from the window. The Delete button on the Insra toolbar allows you to remove error messages from the display as errors are corrected in your code. A message or an entire session may be removed from the display by selecting an entry in the message header area and clicking the Delete button. A message can also be deleted by selecting Messages> Delete from the menu bar.

Troubleshooting

The following sections detail the most common errors encountered when using Insra. If you still encounter trouble after trying one of the following solutions, or if you encounter a different symptom from those listed below, contact the Parasoft Quality Consulting department. See Contacting Parasoft for more information.

Insra Does Not Start Automatically

While compiling or running, your program seems to hang when error output is directed to Insra and Insra is not yet running.

Run Insra manually by running the insgui.exe file located in the <INSURE_INSTALL>/bin directory.

Source Browsing is not Working

Insra did not find your source editor on the path if you receive one of the following errors:

***Error while attempting to spawn browser execvp failed!  

Warning: unable to open editor

Make sure that this application is in a directory that is on your path or that you call it with its complete pathname.


  • No labels