home *** CD-ROM | disk | FTP | other *** search
/ Software Recommendations - 1998 Season 1 / DNBCD4.iso / develop / NUMEGA / smartchk / DATA1.CAB / Main_Files / Readme.Txt < prev    next >
Encoding:
Text File  |  1997-09-25  |  18.1 KB  |  449 lines

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