Getting crash, dirty exit, and clean exit counts


This morning I saw a post taking a poll on how often 2014 SP2 crashes. So, here’s some crash numbers from my system:
CER_data_2
There’s a big difference in the number of sessions, so a percentage chart might make it easier to compare the versions:
CER_data_1

Crashes are actual crashes caught by CER. What I called “dirty exits” are exits or crashes not caught by CER. For example, killing xsi.exe in the Task Manager is a dirty exit. Clean exits are when you quit Softimage normally (for example, when you click File > Exit or the Close X icon).

I used this Python snippet to extracts the CER crash data from the registry.

#HKEY_USERS\S-1-5-21-1384716164-225505876-396224183-1000\
#   Software\Softimage\SOFTIMAGE|SICORE Engine\C:|Program Files|Autodesk|Softimage 2014 SP2|Application|bin\ProductInfo

from _winreg import *

# dicts keyed by Softimage version
dCrashes = {}
dCleanCloses = {}
dStarts = {}

#
# Get the CER crash data for each SI version
# under the SOFTIMAGE|SICORE Engine key
# 
def enum_sicore( subkey ):
	try:
		i = 0
		k = OpenKey( HKEY_USERS, "%s\Software\Softimage\SOFTIMAGE|SICORE Engine" % subkey,  0, KEY_READ )
		while True:
			subkey1 = EnumKey(k, i)
			
			# extract product name eg "Softimage 2014 SP2"
			s = subkey1.rsplit( '|' )[3]
			
			pi_key = OpenKey( k, "%s\%s" % (subkey1,"ProductInfo"), 0, KEY_READ )

			value = QueryValueEx(pi_key, "crashCount" )
			dCrashes[ s ] = value[0]

			value = QueryValueEx(pi_key, "SessionCleanCloseCount" )
			dCleanCloses[ s ] = value[0]

			value = QueryValueEx(pi_key, "SessionStartCount" )
			dStarts[ s ] = value[0]

			i += 1
	except WindowsError:
		# WindowsError: [Errno 259] No more data is available    
		pass

#
# For each user
#  
try:
	i = 0
	while True:
		subkey = EnumKey(HKEY_USERS, i)
		enum_sicore( subkey )
		i += 1
except WindowsError:
	# WindowsError: [Errno 259] No more data is available    
	pass
	
#
# Print out the numbers
#
crashes = 0
exits = 0
starts = 0

for key in dCrashes:
	print key
	print "   Crashes: %d" % dCrashes[key]
	print "   Dirty Exits: %d" % (dStarts[key] - dCleanCloses[key])
	print "   Starts: %d" % dStarts[key]
	
	crashes += dCrashes[key]
	exits += (dStarts[key] - dCleanCloses[key])
	starts += dStarts[key]

# Print out CSV for export into Excel for charting
for key in dCrashes:
	print "%s, %d, %d, %d" % (key, dCrashes[key], dStarts[key] - dCleanCloses[key], dStarts[key])

Sending Customer Error Reports (CERs)


Autodesk applications like Softimage use senddmp.exe to send CER reports to an Autodesk server, where the CER reports are automatically processed and entered into a CER system. senddmp.exe is installed with Softimage, in %XSI_BINDIR%.

You cannot submit CER reports by email; the system is not set up to handle that. The CERs have to be submitted to the Web service that does all the grunt work. For example, the Web service takes care of extracting the crash dump and matching it up against the symbols for that version of Softimage.

If you do want to collect the CER data yourself, click View Report Details in the Error Report dialog. That will generate the dmpuserinfo.xml file, and create a dumpdata.zip archive that contains:

  • Contact data and system information (dmpuserinfo.xml)
  • The crash dump (a .dmp file)
  • The Softimage script history (.ScriptLog.txt)

You will find dumpuserinfo.xml and dumpdata.zip in the XSI Temp folder (for example, %TEMP%\XSI_Temp_7558, where 7588 is the process ID of xsi.exe).

The .dmp and .ScriptLog.txt files actually exist in your Softimage user folder; senddmp.exe just takes a copy of them and puts them in a .zip archive. When I left Autodesk, I had 253 crash dump files (90MB worth) lying around under different C:\users\blairs\Autodesk\SoftimageXXX folders.

I suppose you might be able to run senddmp.exe yourself, but the command line is rather complicated. Here’s the senddmp command line for a recent crash I had. Note that I formatted it for readability. Also note that I didn’t actually try to run it myself, I just dug up the details (using my old friend Process Monitor).

"C:\Program Files\Autodesk\Softimage 2013\Application\bin\senddmp.exe" 

/APPXML "<ProductInformation name=\"Autodesk Softimage 2013\" build_version=\"SI2013RC2\" registry_version=\"11\" registry_localeID=\"1033\" uptime=\"105591217359\" session_start_count=\"111\" session_clean_close_count=\"42\" current_session_length=\"183\" />" /APPLOCALEID 1033 

/DMP "C:\Users\blairs\Autodesk\Softimage_2013\MTL2UA0150CWY4fdae16a6f4c4e93603f470.dmp" 

/UPITOKEN "C:\Program Files\Autodesk\Softimage 2013\UPI\upiconfig.xml" 

/CADSETTINGSPATH SOFTWARE\Autodesk\Autodesk Softimage 2013\2013\CadManagerControl\CustomerErrorReport 

/SERIALNUM 399-99999999 

/SAMPLEDESCALTPATH "C:\Program Files\Autodesk\Softimage 2013\Application\bin\CER\exampleDesc.htm " 

/CALUPTIME 151026979918 

/COUNT 24 

/EXTRA "C:\Users\blairs\Autodesk\Softimage_2013\MTL2UA0150CWY4fdae16a6f4c4e93603f470.ScriptLog.txt" 

/ALTRESPATH "(null)" 

/ALTTYPGPATH "(null)"

You can get the /APPXML and /CALUMPTIME from dumpuserinfo.xml.
I think /COUNT is the crash count.

CER uptime and session count stats


You can always find interesting stuff if you poke around in the registry. For example, the Customer Error Report (CER) mechanism logs some basic usage stats into the registry, under the keys like

HKEY_CURRENT_USER\Software\Softimage\SOFTIMAGE|SICORE Engine\C:|Program Files|Autodesk|Softimage 2013|Application|bin\ProductInfo

  • calUptime is the cumulative amount of time that Softimage has been open. By cumulative, I mean it is the total uptime for all Softimage sessions, ever.
  • upTime is the process uptime (not including any idle time). Again, this is a cumulative total.
  • crashCount is the number of crashes caught by CER.
  • SessionStartCount is the total number of Softimage sessions.
  • SessionCleanCloseCount is the total number of clean exits with no crash. You’ll notice in my case that the crashCount + SessionCleanCloseCount doesn’t equal the total number of sessions. That’s because CER doesn’t catch all crashes, and CER doesn’t catch things like the XSI.exe process being ended in the Task Manager.

* I believe that the uptime totals are in 100-nanosecond intervals.

Disabling Customer Error Reporting (CER)


In general, we’d prefer you didn’t disable the CER reports. But if you’re in the middle of debugging a plugin that constantly crashes, for example, you might want to temporarily disable the CERs.

To disable CER reporting, edit the Softimage setenv.bat file and add this:

SI_DISABLE_CER=1

Maya, and presumbably 3ds Max, work the same way.

MAYA_DISABLE_CER=1