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

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

Some of these limitations are on a to-do list, some can't be fixed at
all. Those are disadvantages in the static (design-time) analysis method
that Project Analyzer uses. 

Please report any new bugs to vbshop@aivosto.com. If you can, attach a
short code file or test project to facilitate debugging. Many bugs are
next to impossible to fix without sample code.



================
For best results
================

- Always declare your local variables (use Option Explicit)
- Always save your files as text (VB 3.0)
- Use MS Word or WordView as your RTF editor
- Wait for the analysis to end completely (it has 2 phases)
- Use correct VB syntax. Project Analyzer relies on the correctness of
  your code. If you analyze a project that VB cannot run, you may get
  funny results.
- Use good coding practices. Put only one statement on one line. 
- Mouse wheel is supported with Microsoft IntelliPoint 3.1 and later.
  The driver is available from Microsoft's web site. Click the wheel and
  scroll.

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

- Project Analyzer has no known practical limit to the size of projects 
  it can handle. It has been successfully used with projects that are 
  several MB in size, and have over 100,000 lines of code.
- The size of variable, constant and procedure names is 
  restricted to 64 characters to save memory. Longer names are truncated.
- Super Project Analyzer can handle a group of max 50 projects at once
- The Hypertext view truncates procedures larger than 32767 lines. 
- The Display (report) truncates reports larger than 32767 lines.

- There are limits to the number of references in one procedure and
  module. There is no hard limit for the total number of references.

  Procedure reference limit:         Max
  From a procedure to other procs    100 calls / procedure  Fan-out

  Module reference limit:            Max
  From a module to other modules     100 refs / module      Fan-out
  To a module from other modules     200 refs / module      Fan-in

  If you are concerned if your LARGE project has met one of these
  limits, see the Metrics window for structural fan-outs = 100 or 
  structural fan-ins = 200.

  Variable, constant, Type and Enum references are not limited.

- 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.


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

- ReDim statements are simply ignored and arrays declared with a ReDim
  statement are thus not detected. According to VB help, ReDim should
  not be used as a declarative statement to avoid name conflicts. ReDim
  should only be used for redimensioning existing arrays.
- If an array defined as New ObjType is later ReDim'd, the ReDim doesn't
  count as an assignment but a reference, even if the ReDim creates new
  objects in the array.

- Problems arise with long object.property.property chains for objects 
  that have object-type properties. Example:
  MyObject.MyChildObject.Prop = 2
  (where property MyChildObject is a class object)

  This should be Property Get MyChildObject and Let Prop.

  Cause of problem: Choosing between Set/Let/Get is done according to the
  last property in the chain. In the above case, it's a Let because of the
  assignment to Prop. 

  Result: This leads the analyzer to think it's a Let to MyChildObject 
  too, although it should be a Get. Since there is no Let for Object
  property (but Set instead), the analyzer ignores these references.


- 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#
- Text (.txt) files that are added to a project as referenced files seem
  to hang the analysis sometimes (cause not detected).
- References to "xyz" in syntax "object( xyz ).property" may be
  misinterpreted as "object.xyz" if "xyz" exists in both current scope
  and as member of object.
- Call to Property Let in syntax "object( xyz ).property = value" is
  misinterpreted as Property Get. This bug doesn't affect syntax
  "object.property = value".
- Auto-fix may delete live code because of above reasons. Use the comment
  out option to get code back in case of problems.
- An incorrect "Stop statement found" problem is reported for syntax
  "Object.Stop".
- If a .frx file has a different name from a .frm file, the .frx file
  is ignored.

Report bugs
-----------

- RTF to HLP reports may have problems with word-wrapping in tables

Duplicate name bugs
-------------------
Project Analyzer is designed to detect the scope of 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.
- Where syntax "Dim Options As Options" is used, the reference to UDT
  (or Enum) Options is mistaken for a reference to variable Options.
  UDT Options is reported as dead. This occurs if the project has a 
  variable name similar to the type name in an "As Type" statement.




=======================
Unsupported VB features
=======================

- Cross-project analysis is not supported. This means that you will not
  see calls to external OCX files, and you cannot analyze .vbg
  project groups.
- The [] syntax is not fully supported. For example, in the below code,
  Dim X As Integer
  Print [X]
  the reference to variable X is not detected because of the [] syntax.
- Line continuation character "_" is supported by the analysis, but not 
  by VB Browser or Project Printer. This has no other known effect 
  than incorrectly reporting calls to Property Let/Set as Property Get. 
  This happens if the "=" is not on the first line, like this:
      MyProperty _
         = Value
- Controls are not detected on ActiveX Designer Forms (.dsr/.dsx files)


===================
Unsolvable problems
===================

The following problems cannot be solved by design-time source code
analysis. This is because they would need run-time information.

- Late-bound references. Example:
  Forms(2).DoSomething 

  Project Analyzer can't know which form the call goes to, because 
  Forms(2) may be of any of your forms. This applies to all object
  references that are of a generic type (e.g. As Form, As Object) 
  and not a specific type (As MyForm, As MyObject).

- Variants are classified as non-object variables, even if they contain
  an object, because there is no way to detect this at design-time.
  This may lead to minor flaws, like with the below code:

   Dim v as Variant
   Set v = Form1
   v.Caption = "This is my form"
     
  Here the last statement is considered an assignment to v, although,
  strictly speaking, it's a reference to v (and assignment to Caption). 
  Fortunately, this doesn't do much harm. If v was defined as 
  Dim v as Form (instead of Variant), the reference would be detected
  just OK.

- Implements statement (polymorphism) supported partially. A procedure that 
  implements an interface procedure is dead only if the procedure it 
  implements is also dead. That's because polymorphed calls are bound 
  finally at run-time.

==============
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

======================
Help Compiler Warnings
======================
You can ignore the following warning in HCW.EXE (if you use RTF to Help
reports):

'HC2002: Note: 
    The keywords "xyz" and "Xyz" are identical except for case. 
    Help Workshop has modified one keyword to match the other.'

Old versions of Help Compiler don't support selection of Font Script.

=============
Project Graph
=============
Setting printer to Landscape doesn't work on all systems. 
This is either a printer driver or VB bug. Known setups:
---
HP Deskjet 930C - Win2000 SP2: error
HP Laserjet 4000: error
HP LaserJet 8100 Series PCL 6 - WinNT Workstation 4.0 SP6: error
HP Laserjet 4 - Win2000 SP2: error
Lexmark Optra T610 PS3 - Win2000 SP2: error
HP LaserJet 5L - Win95: works
---
VB6, no SP - Win95: works
VB6 SP5 - Win2000 SP2: error
---
Let us know if you have any this bug.

