home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / numega / sc501.exe / data1.cab / Main_Files / Readme.Txt < prev    next >
Encoding:
Text File  |  1997-11-25  |  19.3 KB  |  478 lines

  1.  
  2. NuMega SmartCheck
  3. Version 5.01 (Service Pack 1)
  4.  
  5. Read Me
  6.  
  7. Contents
  8.  
  9. * YOU GOTTA KNOW...
  10. * Introducing SmartCheck
  11. * What's New in Service Pack 1
  12. * Reporting Problems And Suggestions
  13. * Installation Prerequisites
  14. * Installation
  15. * If You Have BoundsChecker on Your System
  16. * Removing An Installation
  17. * Quick Start to Checking Visual Basic Programs
  18. * Frequently Asked Questions
  19. * Known Anomalies
  20. * Technical Notes
  21.  
  22.  
  23.  
  24. YOU GOTTA KNOW...
  25. ==================
  26.  
  27. ==> You must compile your Visual Basic program to Native Code using 
  28. Visual Basic 5.0 to take full advantage of SmartCheck. Open your 
  29. project in Visual Basic 5.0 and select Properties on the Project menu. 
  30. Set these options on the Compile tab:
  31.  
  32.      * Compile to Native Code
  33.      * No Optimization
  34.      * Create Symbolic Debug Info
  35.  
  36.  
  37.  
  38. Introducing SmartCheck
  39. ======================
  40.  
  41. SmartCheck does more than detect errors -- it explains why the errors 
  42. occurred, and how to fix them. Try SmartCheck with VBBugBench in the 
  43. Examples directory for a quick tour. SmartCheck helps you solve these 
  44. common problems for Visual Basic developers:
  45.  
  46. * Fatal run-time errors are cryptic and hard to solve. SmartCheck 
  47. analyzes fatal errors to give details on what went wrong and possible 
  48. solutions.
  49.  
  50. * You can't always see what happened on the way to an error. SmartCheck 
  51. logs your program events like form loads, button clicks, and property 
  52. changes as they occur.
  53.  
  54. * You need to use Windows APIs, but it's not always obvious how to do 
  55. it from VB. SmartCheck eliminates trial and error debugging by 
  56. validating your Windows API usage.
  57.  
  58. * VB silently changes variables from one value to another, causing 
  59. unexpected problems and performance degradation. SmartCheck detects 
  60. data value coercions and lets you see the results.
  61.  
  62. * Passing bad values to built-in VB functions causes VB runtime errors 
  63. that only tell you that something is wrong.  SmartCheck tells you which 
  64. argument is incorrect and why.
  65.  
  66. SmartCheck checks third-party components, and includes NuMega's award-
  67. winning error detection for C/C++ and Delphi components.
  68.  
  69. Refer to Frequently Asked Questions for more information about how 
  70. SmartCheck works with Visual Basic.
  71.  
  72.  
  73.  
  74. What's New in Service Pack 1
  75. ============================
  76.  
  77. This release contains several bug fixes, and no new features. The most 
  78. significant changes are:
  79.  
  80. 1. SmartCheck 5.01 uses an improved method for accurately diagnosing 
  81. API failures. The option "Reset GetLastError before each API call" is 
  82. now obsolete, and has been removed from the advanced error detection 
  83. settings dialog. In SmartCheck 5.0, under certain narrow conditions, 
  84. programs that use OLE automation under Windows 95 faulted when this 
  85. option was set. 
  86.  
  87. 2. A default value can now be set for "Report Errors Immediately."
  88.  
  89. 3. Running SmartCheck from the command prompt now supports passing 
  90. command line arguments, and running in batch mode (/B option).
  91.  
  92.  
  93.  
  94. Reporting Problems and Suggestions
  95. ==================================
  96.  
  97. NuMega Technical Support can assist you with all your technical 
  98. problems, from installation to troubleshooting. To contact Technical 
  99. Support:
  100.  
  101. World Wide Web    www.numega.com   Go to Support
  102. E-Mail            tech@numega.com
  103. Fax               603-578-8401
  104. Telephone         888 NUMEGA-S (U.S. and Canada)
  105.                   1-603-578-8100 (International)
  106.  
  107. Telephone support is available as a Priority Support Service from 8:30 
  108. AM to 5:30 PM EST, Monday through Friday. Have your product version and 
  109. serial number ready.
  110.  
  111. Problem reports should include:
  112.  
  113. - System Configuration (CPU, RAM, OS)
  114. - Detailed problem description (include exact error message text)
  115. - How to reproduce problem
  116. - Options used in compiling and linking
  117. - Your SmartCheck error detection settings
  118.  
  119.  
  120.  
  121. Installation Prerequisites
  122. ==========================
  123.  
  124. * PC-compatible Intel 486 system or above
  125. * Microsoft Windows NT 3.51 or 4.0
  126. * Microsoft Windows 95
  127. * RAM: 32 MB minimum
  128. * Disk: 10 MB for full installation
  129.  
  130. Microsoft Visual Basic 5.0 must be installed prior to SmartCheck if you 
  131. want Setup to install Visual Basic IDE integration. VB 5.0 SP1 and SP2 
  132. are supported. Beta versions of VB SP2 are not supported. We recommend 
  133. updating to VB 5.0 SP2 for the best SmartCheck performance.
  134.  
  135.  
  136.  
  137. Installation
  138. ============
  139.  
  140. To install SmartCheck, run SETUP.EXE, and the setup wizard will guide 
  141. you to completion. 
  142.  
  143.  
  144. If You Have BoundsChecker on Your System
  145. ========================================
  146.  
  147. You can run SmartCheck and any of the BoundsChecker 5.X versions on the 
  148. same machine. SmartCheck is installed in a separate directory.
  149.  
  150. Important: You can run C/C++ modules instrumented with BoundsChecker 
  151. FinalCheck (BoundsChecker 5.0 or above, Visual C++ edition only) under 
  152. SmartCheck. However, you must relink with a new version of 
  153. bcinterf.lib. This file is in the Support directory on the SmartCheck 
  154. CD. Copy it to your BoundsChecker installation directory, and relink 
  155. your application.
  156.  
  157.  
  158.  
  159. Removing An Installation
  160. ========================
  161.  
  162. To remove this product, select Settings from the Windows NT or Windows 
  163. 95 Start menu. Select Control Panel, then run Add/Remove Programs. 
  164. Files that were created after installation will not be removed 
  165. automatically.
  166.  
  167.  
  168.  
  169. Quick Start to Checking Visual Basic Programs
  170. =============================================
  171.  
  172. Running SmartCheck from Visual Basic 5:
  173. ---------------------------------------
  174. 1. Select Start with SmartCheck from the Run menu (or press the 
  175. SmartCheck toolbar button). SmartCheck reminds you to set your compile 
  176. options for native code. Click Project Properties to set these compile 
  177. options:
  178.  
  179.      * Compile to Native Code
  180.      * No Optimization
  181.      * Create Symbolic Debug Info
  182.  
  183. 2. Click Start with SmartCheck to proceed. SmartCheck automatically 
  184. compiles and runs your program. Close SmartCheck to return to the IDE.
  185.  
  186. 3. To change your SmartCheck program settings, select SmartCheck 
  187. Settings from the Project menu.
  188.  
  189. Checking Third Party Controls:
  190. ------------------------------
  191. By default, SmartCheck only shows you errors for modules that have 
  192. source code and debug information available. To check third party 
  193. controls, press Advanced on the Program Settings Error Detection tab. 
  194. Check "Report errors even if no source code is available."
  195.  
  196. Looking Under the Hood of Visual Basic:
  197. ---------------------------------------
  198. By default, SmartCheck filters out events that you are not aware of 
  199. when you write Visual Basic code. To see the system interactions under 
  200. your Visual Basic code, select Settings from the Program menu, press 
  201. Advanced on the Error Detection tab, and deselect "Suppress system API 
  202. and OLE calls." Run your program. When the program results window is 
  203. displayed, use Specific Events on the View menu to show additional 
  204. details such as API calls from C, C++ and System code, and OLE method 
  205. calls. To see everything SmartCheck tracks, select Show All Events from 
  206. the View menu. 
  207.  
  208.  
  209.  
  210. Frequently Asked Questions
  211. ==========================
  212.  
  213. Why does SmartCheck only work with compiled (non p-code) executables?
  214. Why can't I check my program while running under the Visual Basic 
  215. development environment debugger?
  216. --------------------------------------------------------------------
  217. When you build a Visual Basic 5.0 program in native mode with debug
  218. information, SmartCheck can treat the program much like a Visual C++ 
  219. program.  The debug information allows SmartCheck to correlate program 
  220. addresses with a source file and line number.
  221.  
  222. When built as a p-code executable, there is no debug information to 
  223. work from. You can run Visual Basic 5.0 p-code executables under 
  224. SmartCheck, and some features will still work.  However, SmartCheck 
  225. will not be able to show you source code for errors and events, and 
  226. other SmartCheck features are not fully supported for p-code.
  227.  
  228. When debugging a program in the Visual Basic IDE, the program is 
  229. running in p-code mode.  In addition, there are other critical 
  230. differences in the way the code is executed.  The result is that 
  231. SmartCheck cannot operate on an executable while it is being debugged 
  232. from the Visual Basic IDE.
  233.  
  234.  
  235. Sometimes SmartCheck shows the Program Error Detected window more than 
  236. once for a line of code that causes a single Visual Basic run-time 
  237. error. Why?
  238. -------------------------------------------------------------------
  239. When Visual Basic run-time errors occur, SmartCheck may detect a system 
  240. error or invalid use of a VB intrinsic function that precedes the run-
  241. time error.
  242.  
  243.  
  244. How do I get more information when SmartCheck doesn't diagnose a 
  245. problem?
  246. --------------------------------------------------------------------
  247. By default, SmartCheck doesn't show errors occurring in modules that 
  248. don't have debug information. This includes the Visual Basic 5.0 run 
  249. time library DLL (MSVBVM50.DLL). Oftentimes, additional information 
  250. about a bug in your program can be found by observing the invalid 
  251. parameters and API failures that occur in MSVBVM50.DLL.
  252.  
  253. To see these errors, go to Error Detection settings (Program | Settings 
  254. | Error Detection), click Advanced and select "Report errors even if no 
  255. source code is available".
  256.  
  257. If you do this, you'll likely see many OLE interface leaks at the end 
  258. of your program. Some of these are from the OLE interfaces that 
  259. represent Visual Basic controls. Others are from the OLE system DLLs. 
  260.  
  261.  
  262. I'm getting Visual Basic Runtime Error 80010108 Automation error. When 
  263. I press "Explain" I get no help. Any ideas on what I can do to track 
  264. down the automation error?
  265. ---------------------------------------------------------------------
  266. VB uses the description of "Automation error" when a property put, get, 
  267. or method call fails and it does not recognize the failure status. You 
  268. may be able to find the failure status name in the C++ header file 
  269. winerror.h. For example, 80010108 is RPC_E_DISCONNECTED. Look for this 
  270. reference in the Visual C++ documentation on the Windows APIs and COM 
  271. to see which APIs return this error. Set up SmartCheck to collect 
  272. system information (see Looking Under the Hood of Visual Basic) and 
  273. search for calls to any of the routines that return the error.
  274.  
  275.  
  276. What are the strange sounding API calls like __vbaChkStk?
  277. -------------------------------------------------------------
  278. If you change the default filtering to show all API and OLE calls, 
  279. you'll see many APIs and OLE methods that aren't documented.  For 
  280. example:
  281.  
  282. EVENT_SINK_Release
  283. ThunRTMain
  284. EVENT_SINK_AddRef
  285. __vbaCastObjVar
  286. __vbaChkstk
  287. __vbaExceptHandler
  288. __vbaExitProc
  289. __vbaFreeObj
  290. __vbaFreeObjList
  291. __vbaFreeStr
  292. __vbaFreeStrList
  293. __vbaFreeVar
  294. __vbaGosubFree
  295. __vbaLateIdCallLd
  296. __vbaNew2
  297. __vbaObjSetAddref
  298. __vbaObjSet
  299. __vbaObjVar
  300. __vbaStrCopy
  301. __vbaStrMove
  302. __vbaStrCat
  303. rtcErrObj
  304.  
  305.  
  306. These APIs and others like them are the inner workings of the Visual 
  307. Basic run time library. SmartCheck logs and uses knowledge of some of 
  308. these APIs internally.  However, we're don't document or provide 
  309. detailed parameter information for these calls.
  310. ----------------------------------------------------------------------
  311.  
  312.  
  313.  
  314. Known Anomalies
  315. ===============
  316.  
  317. 1. If your program uses virtual memory after it is freed under Windows 
  318. NT, it may fault under SmartCheck, but appear to run correctly without 
  319. SmartCheck. Under Windows NT, the Win32 function GlobalFree can be 
  320. configured to overwrite freed memory with a fill pattern to increase 
  321. the likelihood that programs that continue to use virtual memory after 
  322. it is freed generate a General Protection Fault at the bad line of 
  323. code.  By default, this system memory checking is enabled for programs 
  324. run under a debugger and not enabled when the program is run outside 
  325. the debugger. SmartCheck is a debugger, so the program will fault 
  326. unless you disable system memory checking.
  327.  
  328. This option is set in the registry on a per program basis for programs 
  329. run under the debugger. To disable system memory checking for a program 
  330. that faults under SmartCheck, run Regedt32.exe (in the Windows NT 
  331. System32 directory), and add a key under:
  332.  
  333. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<image.exe>
  334.  
  335. Where <image.exe> is the name of your image without a path 
  336. specification.   Under that key, create a value "GlobalFlag" with the 
  337. value 0x00.
  338.  
  339. Microsoft Knowledgebase article Q141153 provides more detailed 
  340. information on how to customize system memory checking for programs run 
  341. under a debugger.
  342.  
  343. 2. If the source code shown for an event appears to be off by several 
  344. lines, you may be running a project that was initially created in VB4. 
  345. The solution is to load the affected form files in VB5, make a change 
  346. (e.g., add a blank line, then delete it), and then save the project.  
  347. The next time VB5 rebuilds the program, the source lines should be 
  348. correct.
  349.  
  350. 3. There is a known bug in Visual Basic 5.0 that can cause an invalid 
  351. page fault on closing the IDE due to the way Visual Basic 5.0 destroys 
  352. command bars during shut down. If you experience this problem, refer to 
  353. Microsoft Knowledge Base Article ID Q167213, for workarounds 
  354. (http://www.microsoft.com/kb/articles/q167/2/13.htm). This problem is 
  355. corrected in Visual Basic 5.0 SP2.
  356.  
  357. 4. If your project group contains an OCX and test program to use the 
  358. OCX, SmartCheck may not compile the projects in the right order.  If 
  359. the OCX gets a new GUID each time it is compiled, the OCX must be 
  360. compiled before the exe that uses it. Otherwise, SmartCheck displays 
  361. "Unexpected error, quitting," and the application stops running. To 
  362. work around the problem, save the project group, then use VB's "Make 
  363. project group" to build the OCX and EXE before running SmartCheck. 
  364. SmartCheck won't do the build if all the pieces are up to date. 
  365.  
  366. 5. Internet Explorer 4 and Outlook Express (part of the IE 4 package) 
  367. do not run under SmartCheck. If you need this functionality, please 
  368. contact Technical Support and ask to be a beta tester for future 
  369. SmartCheck service packs.
  370.  
  371. 6. Microsoft Script Debugger causes SmartCheck analysis of Visual Basic 
  372. run-time errors to fail. The SmartCheck Program Transcript window 
  373. contains the message "Outer event not found". A similar problem may 
  374. occur with any multithreaded program where the other threads keep 
  375. running (and generating events) during SmartCheck analysis.
  376.  
  377. 7. Abnormal termination of a program compiled with VB 5.0 may cause 
  378. instability in SmartCheck and Windows 95. If this occurs, upgrade to 
  379. Visual Basic Service Pack 2 (http://www.microsoft.com/vbasic). Until 
  380. you upgrade, avoid terminating your program with SmartCheck's End 
  381. command. This problem does not occur under Windows NT.
  382.  
  383. 8. When displaying parameters of type Date, the event pane correctly 
  384. decode and shows them (e.g., "1-1-97"). However, the underlying data 
  385. type of a Date is a double.  The details pane displays all Date 
  386. parameters as double values.
  387.  
  388. 9. If a VB intrinsic function takes an unlimited number of comma 
  389. delimited parameters, SmartCheck will only log/show the parameters that 
  390. are required. For example: write #1, var1, var2, var3, "abc", var4 - 
  391. Only the first argument (the file number --> #1) is required, and so 
  392. it's the only one SmartCheck can log.
  393.  
  394. 10. If you remove the start project from the Visual Basic IDE, then 
  395. start SmartCheck, the add-in manager is disabled and you can't start 
  396. your program again.
  397.  
  398.  
  399.  
  400. Technical Notes
  401. ===============
  402.  
  403. 1. SmartCheck detects resource leaks and memory problems in C and C++ 
  404. components, but these types of problems do not occur in Visual Basic 
  405. code. SmartCheck does monitor memory allocation leaks from an OCX or 
  406. DLL which is explicitly calling one of the memory allocation APIs.  
  407. This also includes GDI resources (brushes, pens, bitmaps) which you or 
  408. your OCXs may be using. This version of SmartCheck detects object leaks 
  409. in C and C++ components, but does not detect them Visual Basic code.
  410.  
  411. 2. SmartCheck does not track the VB global object or VB debug object. 
  412. Some Visual Basic commands such as Load, Unload and Debug.Print are 
  413. actually methods of these objects, and are not tracked by this version 
  414. of SmartCheck.
  415.  
  416. 3. SmartCheck supports all of the built-in Visual Basic controls, and 
  417. all of the controls that come with the Visual Basic 5.0 Enterprise 
  418. edition. SmartCheck also has visibility into third-party OCXs that use 
  419. IDispatch::Invoke to communicate with Visual Basic. SmartCheck does not 
  420. log events fired by controls that use the "dual interface" mechanism. 
  421. In addition, SmartCheck doesn't show the interactions from OLE objects 
  422. that aren't "controls".  These are objects that you can't drop onto a 
  423. form (e.g., "Excel.Worksheet").
  424.  
  425. 4. To turn off reporting of OnError statements, suppress this function 
  426. in MSVBVM50.DLL. Open your program in SmartCheck, and select Settings 
  427. from the Program menu. Go to the Error Suppression tab, select the 
  428. suppression library for your program, and click Add API Function. 
  429. Select MSVBVM50.DLL from the Select API dialog, and select OnError from 
  430. the list of functions.
  431.  
  432. 5. If you use Data Access Objects, you can make your program run faster 
  433. under SmartCheck by enabling the DAO350 Suppression Library. Open your 
  434. program in SmartCheck, and select Settings from the Program menu. On 
  435. the Error Suppression tab, select the DAO350.DLL suppression library.
  436.  
  437. 6. To turn off checking of Data Access Objects, you must add DAO350.DLL 
  438. to your component list, and then deselect it. Open your program in 
  439. SmartCheck, and select Settings from the Program menu. Go to the Files 
  440. to Check tab, click Add, and enter the full path of DAO350.DLL. You can 
  441. use Windows Explorer to find the file, if you do not know where it is 
  442. installed on your system. Press Open to add the file, then deselect 
  443. DAO350.DLL to disable checking.
  444.  
  445. 7. Programs instrumented with NuMega FailSafe contain error handlers, 
  446. so SmartCheck will not notify you when run-time errors occur. To 
  447. analyze errors trapped by FailSafe, load your program under SmartCheck, 
  448. choose Settings from the Program Menu, and enable Perform Analysis of 
  449. Handled Visual Basic Runtime Errors on the Reporting tab. After you run 
  450. your program, display Handled Errors (Specific Events on the View 
  451. menu).
  452.  
  453. 8. SmartCheck uses a 16k event buffer to determine the cause of a 
  454. runtime error. If the source code line that SmartCheck needs to know 
  455. about is too far away to be in the buffer, SmartCheck will not analyze 
  456. the error.
  457.  
  458. 9. Startup performance and alternate DEFAULT.DAT files
  459. ------------------------------------------------------
  460. If your program takes an unusually long time to start under SmartCheck, 
  461. you may want to use one of the alternate DEFAULT.DAT files shipped with 
  462. SmartCheck. First, backup your existing copy of DEFAULT.DAT by renaming 
  463. DEFAULT.DAT (in the SmartCheck DATA directory) to DEFAULT.BAK. Then, 
  464. copy one of the alternate DEFAULT.xxx files to DEFAULT.DAT:
  465. Microsoft C/C++ (includes Symantec)   DEFAULT.MSC
  466. Borland C/C++ (include Watcom)        DEFAULT.BOR
  467. Borland Object Pascal (Delphi 2.X)     DEFAULT.DPH
  468. All of the above                      DEFAULT.ALL
  469. NOTE: By default, SmartCheck installs DEFAULT.MSC
  470.  
  471.  
  472.  
  473. -----------------------------------------------------------------
  474. Copyright 1997 NuMega Technologies, Inc.
  475. Nov. 1997
  476.  
  477. readmevb.txt
  478.