You are currently reviewing an older revision of this page.
When MicroStation experiences a Process Exception or an Access Violation, the information generated by the exception or violation can be very helpful in diagnosing the source of the issue, often minimizing the time it takes to resolve it.
As an exception in MicroStation occurs, its details (e.g. processes and other programs that are running at the time of the exception, memory contents, etc.) are appended in the Exception.log file in the folder to which MS_TMP points. Because each exception can generate approximately 240KB of information*, the size of Exception.log could grow rather substantially over time. A Visual Basic script file manageExceptionLogs.vbs is included in MicroStation v8.5.1 and above to help manage the exception logs, simplifying troubleshooting efforts. The script can be customized by an administrator and can be optionally set up to notify individuals when an exception occurs. The MicroStation configuration variable MS_ProcessExceptionLog identifies which VB script to use and where the exception logs should be written to. For example, the default is:
MS_ProcessExceptionLog = 0 "$(windir)\system32\wscript.exe" "$(MSDIR)manageExceptionLogs.vbs"
This statement is all one line. It identifies that the Microsoft Windows program wscript.exe should run manage ExceptionLogs.vbs in a hidden window and that any resulting exception.log file will be written to MS_TMP.
MS_ProcessExceptionLog is examined and parsed for both a "window display control" (see SW_xxxx constants in the Microsoft documentation of "ShowWindow") value and an executable with optional arguments. When run, the script performs the following operations:
A maximum number of logs can be created. The maximum number is defined by "g_maxLogsToKeep" in the script; 20 is the default.
Shift any existing sub directories to the next higher value. For example move $(MS_TMP)ExceptionHistory-19 to $(MS_TMP)ExceptionHistory-20, then move 18 to 19, 17 to 18, ... 1 to 2.
The exception log that is created in ExceptionHistory-1 will be moved to ExceptionHistory-2, allowing a new exception to be created in ExceptionHistory-1.
Const g_emailHostName = "yourservername" = Exchange Server or SMTP server's DNS name or IP address (i.e. mailhost.xyzzy.com)
Const g_emailCADAdministrator= "firstname.lastname@example.org" or Const g_emailCADAdministrator= "some.name" = Address of the person to notify of exceptions. More than one address can be included simply by separating the names with commas (i.e. "John.Smith, Jane.Doe") The E-mail domain does not need to be included in this section.
Const g_emailUserDomain = "@xyzzy.com" = An optional suffix (or anything else) to append to the sender's address. Example '@bentley.com'
*A snapshot of MicroStation's process memory is written to the companion binary file MiniDump.dmp, which is rewritten with every exception. The size of this file will vary based on what the Windows system environment variable (note: NOT a configuration variable) MS_MiniDumpType is set to and the amount of virtual memory occupied by MicroStation at the time of the fault. If MS_MiniDumpType is set to 4 (the default), MiniDump.dmp could be on the order of 10s of KB. If MS_MiniDumpType is set to 7, much more information is collected and MiniDump.dmp could be on the order of many 10s of MB to 100's of MB.
NOTE: If you run anti-virus software (e.g. Norton AntiVirus), you may be alerted that a "suspected virus" may be accessing the system when MicroStation creates the exception logs through the VBScript. However, workarounds may exist. For example, information for Norton's AntiVirus Script Blocking is described here. Please check with your system/computer administrator before disabling this setting.
Supplemental information regarding Dr. Watson log files can be found in the Microsoft KnowledgeBase articles "Using Dr. Watson" and "Overview of Dr. Watson". This is useful to anyone who encounters a Dr. Watson log or would like a better understanding of what is in one.
Product TechNotes and FAQs
Bentley Technical Support KnowledgeBase
Bentley LEARN Server
Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!