Known bugs and limitations in Project Analyzer 7.0
==================================================

This file includes the known bugs and limitations in Project Analyzer.
Project Analyzer is of high quality and these limitations affect only
special cases.

Some of these limitations are on a to-do list. Some problems are
impossible to solve with source code analysis.

Please report any new bugs to Aivosto. If you can, attach a short code
file or test project to facilitate debugging. Sample code is essential
to get bugs fixed.


For the best results
- Use Option Explicit and always declare your variables with a correct
  data type.
- Make sure your project compiles and the code is not erroneous.
- If you use VB3, save your files as text.
- Use good coding practices. Put only one statement on one line. 

===========
Limitations
===========

- Project Analyzer was not designed to analyze eVB code, but it can do it.
  We don't guarantee that the results are correct, but recommend that you 
  try it out. The same goes for VBA code. You can export VBA code from
  Office to files, make an artificial VB project and try the analysis.

- Analysis of late-bound references is somewhat heuristic. Late binding 
  occurs when calling a procedure or reading/writing a variable via an 
  expression whose type is available only at run-time. Typically, this 
  affects Variant or Object variables that are used to store object 
  references, or Form variables that store form references. 

  Example: Forms(2).DoSomething
  
  Since it's not obvious which form Forms(2) will be at run-time,
  Project Analyzer searches for all available methods named DoSomething 
  and adds a call to each of them.

  Because of this, you may see extra calls in your call trees. These are 
  calls that are syntactically possible, although they may look strange 
  to you if you know which form Forms(2) will be. You can disable
  the analysis of late-bound references in the General options dialog box.

  Early binding is recommended instead of late binding wherever
  possible. Instead of As Form, type your variables As Form1. Instead of 
  As Object use As MyObject, and so on. Be as specific as you can.

- Calls whose target is not analyzed are not detected. For example, the 
  following calls are ignored in call trees:
  OtherProject.Class.Method  (when OtherProject is not analyzed)
  Collection.Items(1).Method (Collection.Items data type is unknown)

- Multi-project analysis doesn't support all possible analysis scenarios.
  See project.chm for Multi-project analysis for the details.

=================
Known misbehavior
=================

- Problems sometimes arise with long object.property.property chains for 
  objects that have object-type properties. Example:
  MyObject1.MyObject2.Prop = 2

  How it should work: Get MyObject2, Set/Let Prop.
  Problematic behavior: Set MyObject2, Set/Let Prop.
  Cause: Choosing between Set/Let/Get is done according to the last 
  property in the chain.

- Extra Excess Scope problem may be reported on a Public member of 
  a class if the following conditions are true:
  * The member is called within its own class but with a qualifier such
    as object.member, AND
  * The member is not called outside of its own class.
- Super Project Analyzer treats two files in different directories but with 
  the same filename as one file. 
- Reports "Multiple statements on one line" problem if finds the following 
  time syntax with colons: dteStartTime = #12:00:00 AM#
- No calls are allowed from inside a Property Get to Set/Let. Normally
  this does no harm because that kind of programming is rare.
- Auto-fix may rarely delete live code because of the above reasons. Use the 
  comment out option to get code back in case of problems.
- Project Graph doesn't support all character sets in Copy, Save and
  Print operations.
- In a COM file from which 2 or more type libraries are being referenced 
  (such as vbscript.dll\1 and vbscript.dll\2), only one type library is
  analyzed (the one that comes last in the project files).
- Syntax "object.method parameter" may cause the reference to "parameter" 
  be ignored if "method" is a VB6 keyword. You can overcome this limitation by 
  using the syntax "Call object.method(parameter)". This bug may affect
  you when analyzing VB6 code that calls COM objects having method names
  similar to VB6 keywords.
- If all fields of a .NET Structure are dead but the Structure is live,
  autofix removes the fields leaving an empty Structure block. In this case,
  the project may not compile as a Structure must have at least one instance 
  field or event.

Duplicate name bugs
-------------------
Project Analyzer is designed to detect the scope of names and handle
cases where different things have identical names. However, in some
cases two identical names may cause subtle errors. 

- In the hypertext window, letters in DefType statements may be mistaken 
  for one-letter variable names
- In the hypertext window, if you have two different definitions with the
  same name (e.g. Form1.MyVar and Form2.MyVar), the program may
  highlight the both in red when only the other one should be
  highlighted. This bug has no effect on the real analysis. 
- If a local var/const has the same name as the procedure it's in, the
  procedure name will be mistaken for the var/const name in the
  Hypertext window and Project Printer. This has no effect on the
  analysis, though.
- If a module and a public procedure/variable/constant have the same name, 
  this may lead to incorrect detection of the reference and thus incorrect 
  dead code detection. This bug doesn't affect UDTs or Enums, because 
  they can't have the same name as a module.


Unsupported VB features
-----------------------

- Undeclared variables are not detected nor analyzed. Use Option
  Explicit to declare all variables.
- Support for the [] syntax is not complete.
  Auto-fix may generate code that has [] stripped, resulting in compile
  errors. 
- The line continuation character "_" is fully supported by the analysis, 
  but not by the hypertext view or Project Printer. This has the
  following effects on these features:
  + Only the first line of multiline comments appears as comment.
  + Some procedure calls may be mishandled. This happens if there's a
    line break after a procedure name, and the exact target of the 
    procedure call depends on code following the line break. For example, 
    selection of property Get or Set depends on whether the "=" operator 
    is present later on the line. Or, selection from overloaded
    procedures depends on the call arguments.
- Detection of variable and procedure declarations is not correct if 
  you write several statements on one line. Examples of problematic
  cases: 
  Function MyFunc(x) : MyFunc = 1 : End Function
  Dim x: Dim y
  If this causes problems, split the function declaration on several
  lines, and rewrite the Dim's as Dim x, y
- Default class member references (such as Text1 = "string" instead of 
  Text1.Text = "string") are not resolved.
- Default property/function references via the ! (bang) operator are not
  supported. Example: MyCollection!key is not understood as a call to 
  MyCollection.Item("key").

Unsupported VB 3-6 features
---------------------------
- Controls are not detected on ActiveX Designer Forms (.dsr/.dsx files)
- If a VB 4-6 base class is implemented via the Implements statement and
  there is a public variable in the base class, child classes must
  implement the variable as property procedures. No calls are shown
  to the properties from places where the variable is used, although there
  is a call at run-time. Use of public member variables is not recommended 
  anyway, they should be replaced by properties.
- If a .frx file has a different name from a .frm file, the .frx file
  is ignored.
- Arrays that are declared via a ReDim, instead of a Dim statement, 
  are not detected nor analyzed. According to VB help, ReDim should
  not be used to declare new arrays to avoid name conflicts. ReDim
  should only be used for redimensioning existing arrays.

Unsupported VB.NET features
---------------------------
- Cross-project references via the ASP.NET Web Reference infrastructure 
  are not detected. References are resolved up to the proxy class but not 
  from the proxy to the web service project.
- Analysis of COM Interop is limited. See project.chm for Multi-project
  analysis for the details.
- Block-level variables and constants are handled as procedure-level
  ones. If a procedure defines 2 or more variables/consts with the same 
  name, the first one is noticed and the others are ignored. 
- Attribute block code in VB.NET is analyzed as any other code. This 
  limits the detection of references to custom attributes.
  * The syntax <MyData(field:=value)> is not handled as a reference 
    to the variable or property MyData.field.
  * The syntax <MyData()> is not accepted as a reference to class
    MyDataAttribute.
- The following file encodings are not supported: UTF7 and UTF8 without
  signature. If Project Analyzer displays strange characters in your
  .NET code, convert to some other encoding, preferably to either Unicode
  or to the default ANSI codepage. You can do this in Visual Studio .NET 
  via Advanced Save Options in the File menu.
- Auto-fix converts all files it handles to Ansi using the default 
  codepage. This is problematic if your .NET source files contain
  characters not supported by your default codepage. In this case, 
  the system will convert the characters to the closest available 
  equivalent. You may run into this problem if you're auto-fixing an
  international application that is stored as Unicode.
- Multiple inheritance with Interfaces is not supported.

==============
The FRX window
==============

- Supports the most usual data types and controls, like PictureBox.Picture,
  ListBox.List, ListBox.ItemData, TextBox.Text, MouseIcon etc.
- Some properties that are not supported (others exist):
  AniButton.Picture, SSCommand.Picture



Copyright Aivosto Oy
www.aivosto.com
vbshop @ aivosto.com

