Main Content

View Error Information When Polyspace Analysis Stops

If a Polyspace® analysis fails to reach completion, you can view error information on the screen, either in the user interface or at the command-line terminal. Alternatively, you can view error information in a log file generated during analysis. Based on the error information, you can either fix your source code, add missing files or change analysis options to get past the error.

View Error Information in User Interface

  1. View the errors on the Output Summary tab.

    The messages on this tab appear with the following icons.

    IconMeaning

    Error that blocks analysis.

    For instance, the analysis cannot find a variable declaration or definition and therefore cannot determine the variable type.

    Warning about an issue that does not block analysis by itself, but could be related to a blocking error.

    For instance, the analysis cannot find an include file that is #include-d in your code. The issue does not block the analysis by itself, but if the include file contains the definition of a variable that you use in your source code, you can face an error later.

    Additional information about the analysis.

  2. To diagnose and fix each error, you can do the following:

    • To see further details about the error, select the error message. The details appear in a Detail window below the Output Summary tab.

    • To open the source code at the line containing the error, double-click the message.

Tip

To search the error messages for a specific term, on the Search pane, enter your search term. From the drop down list on this pane, select Output Summary or Run Log. If the Search pane is not open by default, select Windows > Show/Hide View > Search.

If you are using the Polyspace Access web interface or the Polyspace Platform user interface, you can view error messages from the analysis in the Run Log. This can be useful in situations where you only have a results file and therefore no access to the Output Summary or if results were expected but you have an empty Results List. The Run Log also displays statistics regarding the duration of each analysis phase.

To open the Run Log, open your results in the Review perspective and select Window > Run Log.

View Error Information in Log File

You can view errors directly in the log file. The log file is in your results folder. To open the log file:

  1. Right-click the result folder name on the Project Browser pane. From the context menu, select Open Folder with File Manager.

  2. Open the log file, Polyspace_R20##n_ProjectName_date-time.log

  3. To view the errors, scroll through the log file, starting at the end and working backward.

    The following example shows sample log file information. The error has occurred because a variable var used in the code is not defined earlier.

    C:\missing_include.c, line 4: error: identifier "var" is undefined
    |    var = func();
    |    ^
    
    1 error detected in the compilation of "missing_include.c".
    C:\missing_include.c: warning: Failed compilation.
    Global compilation phase...

See Also

|