Description

Analysis of VB.NET source code from ANAMAN runs indefinitely.

Observed in CAST AIP
Release
Yes/No
8.3.x(error)
8.2.x(error) 
8.1.x(error) 
8.0.x(error) 
7.3.x(error)
7.2.x(error)
7.0.x(tick)
Observed on RDBMS
RDBMS
Yes/No
Oracle Server(error)
Microsoft SQL Server(error)
CSS3(error)
CSS2(error)
CSS1(tick)
Step by Step Scenario
  1. Setup .NET Legacy Analyzer for VB Project in Anaman. 
  2. Run Analysis. 
  3. Analysis runs indefinitely.
Action Plan

It is a bug in Legacy .NET Analyzer. When imports clauses are followed by a comment ending by a '.' leads to this issue.

The bug comes from the management of implicit line continuation. This involve an infinite loop when parsing a file with lines of source code containing Imports statement like
--------------------------------------------------------------------------
Imports YYYY.Framework 'This is a comment for the import statement.
---------------------------------------------------------------------------
The bug is that this dot is interpreted by the management of implicit line continuation, and it should not as this dot is part of the comment. Then the end of line is not recognized and the parser becomes in an inconsistent state which explain the infinite loop.

 

Follow the below steps to avoid this:

  1. Open log file of the corresponding job and look for the source code filename (xxx.aspx.vb) where the analysis runs is struck. Generally it will be the last line in the log file with the file path name
  2. Open the source code file and look for imports statement. For E.g, Imports YYYY.Framework 'This is a comment for the import statement.
  3. Remove '.' from the Imports clause's comment. If there are more Imports statement, make sure the comment does not end with '.
  4. Save the source code file and re-run the analysis. Analysis will complete successfully. if the analysis again runs indefinitely, repeat steps 1 - 4
Impact on Analysis Results and Dashboard

 VB.Net jobs analysis runs indefinitely without any log info / Exception

Notes/comments

Scraip ID: CAST-30225

Related Pages