home *** CD-ROM | disk | FTP | other *** search
-
- NuMega SmartCheck
- Version 5.01 (Service Pack 1)
-
- Read Me
-
- Contents
-
- * YOU GOTTA KNOW...
- * Introducing SmartCheck
- * What's New in Service Pack 1
- * Reporting Problems And Suggestions
- * Installation Prerequisites
- * Installation
- * If You Have BoundsChecker on Your System
- * Removing An Installation
- * Quick Start to Checking Visual Basic Programs
- * Frequently Asked Questions
- * Known Anomalies
- * Technical Notes
-
-
-
- YOU GOTTA KNOW...
- ==================
-
- ==> You must compile your Visual Basic program to Native Code using
- Visual Basic 5.0 to take full advantage of SmartCheck. Open your
- project in Visual Basic 5.0 and select Properties on the Project menu.
- Set these options on the Compile tab:
-
- * Compile to Native Code
- * No Optimization
- * Create Symbolic Debug Info
-
-
-
- Introducing SmartCheck
- ======================
-
- SmartCheck does more than detect errors -- it explains why the errors
- occurred, and how to fix them. Try SmartCheck with VBBugBench in the
- Examples directory for a quick tour. SmartCheck helps you solve these
- common problems for Visual Basic developers:
-
- * Fatal run-time errors are cryptic and hard to solve. SmartCheck
- analyzes fatal errors to give details on what went wrong and possible
- solutions.
-
- * You can't always see what happened on the way to an error. SmartCheck
- logs your program events like form loads, button clicks, and property
- changes as they occur.
-
- * You need to use Windows APIs, but it's not always obvious how to do
- it from VB. SmartCheck eliminates trial and error debugging by
- validating your Windows API usage.
-
- * VB silently changes variables from one value to another, causing
- unexpected problems and performance degradation. SmartCheck detects
- data value coercions and lets you see the results.
-
- * Passing bad values to built-in VB functions causes VB runtime errors
- that only tell you that something is wrong. SmartCheck tells you which
- argument is incorrect and why.
-
- SmartCheck checks third-party components, and includes NuMega's award-
- winning error detection for C/C++ and Delphi components.
-
- Refer to Frequently Asked Questions for more information about how
- SmartCheck works with Visual Basic.
-
-
-
- What's New in Service Pack 1
- ============================
-
- This release contains several bug fixes, and no new features. The most
- significant changes are:
-
- 1. SmartCheck 5.01 uses an improved method for accurately diagnosing
- API failures. The option "Reset GetLastError before each API call" is
- now obsolete, and has been removed from the advanced error detection
- settings dialog. In SmartCheck 5.0, under certain narrow conditions,
- programs that use OLE automation under Windows 95 faulted when this
- option was set.
-
- 2. A default value can now be set for "Report Errors Immediately."
-
- 3. Running SmartCheck from the command prompt now supports passing
- command line arguments, and running in batch mode (/B option).
-
-
-
- Reporting Problems and Suggestions
- ==================================
-
- NuMega Technical Support can assist you with all your technical
- problems, from installation to troubleshooting. To contact Technical
- Support:
-
- World Wide Web www.numega.com Go to Support
- E-Mail tech@numega.com
- Fax 603-578-8401
- Telephone 888 NUMEGA-S (U.S. and Canada)
- 1-603-578-8100 (International)
-
- Telephone support is available as a Priority Support Service from 8:30
- AM to 5:30 PM EST, Monday through Friday. Have your product version and
- serial number ready.
-
- Problem reports should include:
-
- - System Configuration (CPU, RAM, OS)
- - Detailed problem description (include exact error message text)
- - How to reproduce problem
- - Options used in compiling and linking
- - Your SmartCheck error detection settings
-
-
-
- Installation Prerequisites
- ==========================
-
- * PC-compatible Intel 486 system or above
- * Microsoft Windows NT 3.51 or 4.0
- * Microsoft Windows 95
- * RAM: 32 MB minimum
- * Disk: 10 MB for full installation
-
- Microsoft Visual Basic 5.0 must be installed prior to SmartCheck if you
- want Setup to install Visual Basic IDE integration. VB 5.0 SP1 and SP2
- are supported. Beta versions of VB SP2 are not supported. We recommend
- updating to VB 5.0 SP2 for the best SmartCheck performance.
-
-
-
- Installation
- ============
-
- To install SmartCheck, run SETUP.EXE, and the setup wizard will guide
- you to completion.
-
-
- If You Have BoundsChecker on Your System
- ========================================
-
- You can run SmartCheck and any of the BoundsChecker 5.X versions on the
- same machine. SmartCheck is installed in a separate directory.
-
- Important: You can run C/C++ modules instrumented with BoundsChecker
- FinalCheck (BoundsChecker 5.0 or above, Visual C++ edition only) under
- SmartCheck. However, you must relink with a new version of
- bcinterf.lib. This file is in the Support directory on the SmartCheck
- CD. Copy it to your BoundsChecker installation directory, and relink
- your application.
-
-
-
- Removing An Installation
- ========================
-
- To remove this product, select Settings from the Windows NT or Windows
- 95 Start menu. Select Control Panel, then run Add/Remove Programs.
- Files that were created after installation will not be removed
- automatically.
-
-
-
- Quick Start to Checking Visual Basic Programs
- =============================================
-
- Running SmartCheck from Visual Basic 5:
- ---------------------------------------
- 1. Select Start with SmartCheck from the Run menu (or press the
- SmartCheck toolbar button). SmartCheck reminds you to set your compile
- options for native code. Click Project Properties to set these compile
- options:
-
- * Compile to Native Code
- * No Optimization
- * Create Symbolic Debug Info
-
- 2. Click Start with SmartCheck to proceed. SmartCheck automatically
- compiles and runs your program. Close SmartCheck to return to the IDE.
-
- 3. To change your SmartCheck program settings, select SmartCheck
- Settings from the Project menu.
-
- Checking Third Party Controls:
- ------------------------------
- By default, SmartCheck only shows you errors for modules that have
- source code and debug information available. To check third party
- controls, press Advanced on the Program Settings Error Detection tab.
- Check "Report errors even if no source code is available."
-
- Looking Under the Hood of Visual Basic:
- ---------------------------------------
- By default, SmartCheck filters out events that you are not aware of
- when you write Visual Basic code. To see the system interactions under
- your Visual Basic code, select Settings from the Program menu, press
- Advanced on the Error Detection tab, and deselect "Suppress system API
- and OLE calls." Run your program. When the program results window is
- displayed, use Specific Events on the View menu to show additional
- details such as API calls from C, C++ and System code, and OLE method
- calls. To see everything SmartCheck tracks, select Show All Events from
- the View menu.
-
-
-
- Frequently Asked Questions
- ==========================
-
- Why does SmartCheck only work with compiled (non p-code) executables?
- Why can't I check my program while running under the Visual Basic
- development environment debugger?
- --------------------------------------------------------------------
- When you build a Visual Basic 5.0 program in native mode with debug
- information, SmartCheck can treat the program much like a Visual C++
- program. The debug information allows SmartCheck to correlate program
- addresses with a source file and line number.
-
- When built as a p-code executable, there is no debug information to
- work from. You can run Visual Basic 5.0 p-code executables under
- SmartCheck, and some features will still work. However, SmartCheck
- will not be able to show you source code for errors and events, and
- other SmartCheck features are not fully supported for p-code.
-
- When debugging a program in the Visual Basic IDE, the program is
- running in p-code mode. In addition, there are other critical
- differences in the way the code is executed. The result is that
- SmartCheck cannot operate on an executable while it is being debugged
- from the Visual Basic IDE.
-
-
- Sometimes SmartCheck shows the Program Error Detected window more than
- once for a line of code that causes a single Visual Basic run-time
- error. Why?
- -------------------------------------------------------------------
- When Visual Basic run-time errors occur, SmartCheck may detect a system
- error or invalid use of a VB intrinsic function that precedes the run-
- time error.
-
-
- How do I get more information when SmartCheck doesn't diagnose a
- problem?
- --------------------------------------------------------------------
- By default, SmartCheck doesn't show errors occurring in modules that
- don't have debug information. This includes the Visual Basic 5.0 run
- time library DLL (MSVBVM50.DLL). Oftentimes, additional information
- about a bug in your program can be found by observing the invalid
- parameters and API failures that occur in MSVBVM50.DLL.
-
- To see these errors, go to Error Detection settings (Program | Settings
- | Error Detection), click Advanced and select "Report errors even if no
- source code is available".
-
- If you do this, you'll likely see many OLE interface leaks at the end
- of your program. Some of these are from the OLE interfaces that
- represent Visual Basic controls. Others are from the OLE system DLLs.
-
-
- I'm getting Visual Basic Runtime Error 80010108 Automation error. When
- I press "Explain" I get no help. Any ideas on what I can do to track
- down the automation error?
- ---------------------------------------------------------------------
- VB uses the description of "Automation error" when a property put, get,
- or method call fails and it does not recognize the failure status. You
- may be able to find the failure status name in the C++ header file
- winerror.h. For example, 80010108 is RPC_E_DISCONNECTED. Look for this
- reference in the Visual C++ documentation on the Windows APIs and COM
- to see which APIs return this error. Set up SmartCheck to collect
- system information (see Looking Under the Hood of Visual Basic) and
- search for calls to any of the routines that return the error.
-
-
- What are the strange sounding API calls like __vbaChkStk?
- -------------------------------------------------------------
- If you change the default filtering to show all API and OLE calls,
- you'll see many APIs and OLE methods that aren't documented. For
- example:
-
- EVENT_SINK_Release
- ThunRTMain
- EVENT_SINK_AddRef
- __vbaCastObjVar
- __vbaChkstk
- __vbaExceptHandler
- __vbaExitProc
- __vbaFreeObj
- __vbaFreeObjList
- __vbaFreeStr
- __vbaFreeStrList
- __vbaFreeVar
- __vbaGosubFree
- __vbaLateIdCallLd
- __vbaNew2
- __vbaObjSetAddref
- __vbaObjSet
- __vbaObjVar
- __vbaStrCopy
- __vbaStrMove
- __vbaStrCat
- rtcErrObj
-
-
- These APIs and others like them are the inner workings of the Visual
- Basic run time library. SmartCheck logs and uses knowledge of some of
- these APIs internally. However, we're don't document or provide
- detailed parameter information for these calls.
- ----------------------------------------------------------------------
-
-
-
- Known Anomalies
- ===============
-
- 1. If your program uses virtual memory after it is freed under Windows
- NT, it may fault under SmartCheck, but appear to run correctly without
- SmartCheck. Under Windows NT, the Win32 function GlobalFree can be
- configured to overwrite freed memory with a fill pattern to increase
- the likelihood that programs that continue to use virtual memory after
- it is freed generate a General Protection Fault at the bad line of
- code. By default, this system memory checking is enabled for programs
- run under a debugger and not enabled when the program is run outside
- the debugger. SmartCheck is a debugger, so the program will fault
- unless you disable system memory checking.
-
- This option is set in the registry on a per program basis for programs
- run under the debugger. To disable system memory checking for a program
- that faults under SmartCheck, run Regedt32.exe (in the Windows NT
- System32 directory), and add a key under:
-
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<image.exe>
-
- Where <image.exe> is the name of your image without a path
- specification. Under that key, create a value "GlobalFlag" with the
- value 0x00.
-
- Microsoft Knowledgebase article Q141153 provides more detailed
- information on how to customize system memory checking for programs run
- under a debugger.
-
- 2. If the source code shown for an event appears to be off by several
- lines, you may be running a project that was initially created in VB4.
- The solution is to load the affected form files in VB5, make a change
- (e.g., add a blank line, then delete it), and then save the project.
- The next time VB5 rebuilds the program, the source lines should be
- correct.
-
- 3. There is a known bug in Visual Basic 5.0 that can cause an invalid
- page fault on closing the IDE due to the way Visual Basic 5.0 destroys
- command bars during shut down. If you experience this problem, refer to
- Microsoft Knowledge Base Article ID Q167213, for workarounds
- (http://www.microsoft.com/kb/articles/q167/2/13.htm). This problem is
- corrected in Visual Basic 5.0 SP2.
-
- 4. If your project group contains an OCX and test program to use the
- OCX, SmartCheck may not compile the projects in the right order. If
- the OCX gets a new GUID each time it is compiled, the OCX must be
- compiled before the exe that uses it. Otherwise, SmartCheck displays
- "Unexpected error, quitting," and the application stops running. To
- work around the problem, save the project group, then use VB's "Make
- project group" to build the OCX and EXE before running SmartCheck.
- SmartCheck won't do the build if all the pieces are up to date.
-
- 5. Internet Explorer 4 and Outlook Express (part of the IE 4 package)
- do not run under SmartCheck. If you need this functionality, please
- contact Technical Support and ask to be a beta tester for future
- SmartCheck service packs.
-
- 6. Microsoft Script Debugger causes SmartCheck analysis of Visual Basic
- run-time errors to fail. The SmartCheck Program Transcript window
- contains the message "Outer event not found". A similar problem may
- occur with any multithreaded program where the other threads keep
- running (and generating events) during SmartCheck analysis.
-
- 7. Abnormal termination of a program compiled with VB 5.0 may cause
- instability in SmartCheck and Windows 95. If this occurs, upgrade to
- Visual Basic Service Pack 2 (http://www.microsoft.com/vbasic). Until
- you upgrade, avoid terminating your program with SmartCheck's End
- command. This problem does not occur under Windows NT.
-
- 8. When displaying parameters of type Date, the event pane correctly
- decode and shows them (e.g., "1-1-97"). However, the underlying data
- type of a Date is a double. The details pane displays all Date
- parameters as double values.
-
- 9. If a VB intrinsic function takes an unlimited number of comma
- delimited parameters, SmartCheck will only log/show the parameters that
- are required. For example: write #1, var1, var2, var3, "abc", var4 -
- Only the first argument (the file number --> #1) is required, and so
- it's the only one SmartCheck can log.
-
- 10. If you remove the start project from the Visual Basic IDE, then
- start SmartCheck, the add-in manager is disabled and you can't start
- your program again.
-
-
-
- Technical Notes
- ===============
-
- 1. SmartCheck detects resource leaks and memory problems in C and C++
- components, but these types of problems do not occur in Visual Basic
- code. SmartCheck does monitor memory allocation leaks from an OCX or
- DLL which is explicitly calling one of the memory allocation APIs.
- This also includes GDI resources (brushes, pens, bitmaps) which you or
- your OCXs may be using. This version of SmartCheck detects object leaks
- in C and C++ components, but does not detect them Visual Basic code.
-
- 2. SmartCheck does not track the VB global object or VB debug object.
- Some Visual Basic commands such as Load, Unload and Debug.Print are
- actually methods of these objects, and are not tracked by this version
- of SmartCheck.
-
- 3. SmartCheck supports all of the built-in Visual Basic controls, and
- all of the controls that come with the Visual Basic 5.0 Enterprise
- edition. SmartCheck also has visibility into third-party OCXs that use
- IDispatch::Invoke to communicate with Visual Basic. SmartCheck does not
- log events fired by controls that use the "dual interface" mechanism.
- In addition, SmartCheck doesn't show the interactions from OLE objects
- that aren't "controls". These are objects that you can't drop onto a
- form (e.g., "Excel.Worksheet").
-
- 4. To turn off reporting of OnError statements, suppress this function
- in MSVBVM50.DLL. Open your program in SmartCheck, and select Settings
- from the Program menu. Go to the Error Suppression tab, select the
- suppression library for your program, and click Add API Function.
- Select MSVBVM50.DLL from the Select API dialog, and select OnError from
- the list of functions.
-
- 5. If you use Data Access Objects, you can make your program run faster
- under SmartCheck by enabling the DAO350 Suppression Library. Open your
- program in SmartCheck, and select Settings from the Program menu. On
- the Error Suppression tab, select the DAO350.DLL suppression library.
-
- 6. To turn off checking of Data Access Objects, you must add DAO350.DLL
- to your component list, and then deselect it. Open your program in
- SmartCheck, and select Settings from the Program menu. Go to the Files
- to Check tab, click Add, and enter the full path of DAO350.DLL. You can
- use Windows Explorer to find the file, if you do not know where it is
- installed on your system. Press Open to add the file, then deselect
- DAO350.DLL to disable checking.
-
- 7. Programs instrumented with NuMega FailSafe contain error handlers,
- so SmartCheck will not notify you when run-time errors occur. To
- analyze errors trapped by FailSafe, load your program under SmartCheck,
- choose Settings from the Program Menu, and enable Perform Analysis of
- Handled Visual Basic Runtime Errors on the Reporting tab. After you run
- your program, display Handled Errors (Specific Events on the View
- menu).
-
- 8. SmartCheck uses a 16k event buffer to determine the cause of a
- runtime error. If the source code line that SmartCheck needs to know
- about is too far away to be in the buffer, SmartCheck will not analyze
- the error.
-
- 9. Startup performance and alternate DEFAULT.DAT files
- ------------------------------------------------------
- If your program takes an unusually long time to start under SmartCheck,
- you may want to use one of the alternate DEFAULT.DAT files shipped with
- SmartCheck. First, backup your existing copy of DEFAULT.DAT by renaming
- DEFAULT.DAT (in the SmartCheck DATA directory) to DEFAULT.BAK. Then,
- copy one of the alternate DEFAULT.xxx files to DEFAULT.DAT:
- Microsoft C/C++ (includes Symantec) DEFAULT.MSC
- Borland C/C++ (include Watcom) DEFAULT.BOR
- Borland Object Pascal (Delphi 2.X) DEFAULT.DPH
- All of the above DEFAULT.ALL
- NOTE: By default, SmartCheck installs DEFAULT.MSC
-
-
-
- -----------------------------------------------------------------
- Copyright 1997 NuMega Technologies, Inc.
- Nov. 1997
-
- readmevb.txt
-