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:
There’s a big difference in the number of sessions, so a percentage chart might make it easier to compare the versions:

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.

#   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 ):
		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    

# For each user
	i = 0
	while True:
		subkey = EnumKey(HKEY_USERS, i)
		enum_sicore( subkey )
		i += 1
except WindowsError:
	# WindowsError: [Errno 259] No more data is available    
# 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])

7 thoughts on “Getting crash, dirty exit, and clean exit counts

      • Too bad, as it might have helped “uncover” a possible trend (of sorts) between vanilla versions and SPs as I find the sharp increase between 2013 and 2013SP1 very interesting. Ah well, can’t be helped…

  1. Nice Snippet !

    Here are some stats from my PC’s:

    Not sure what exactly this should tell me….
    Softimage’s Crashing Chance is about 58% ? 😉

    Besides Shading I do some Plugin, Shader-Writing from time to time… so as a Modeller,Animator you might not have that many Crashes.

  2. But I would assume you have lots of plugins loaded in your workgroup right?
    2014SP2 would require most of these plugins to be recompiled if they are ICE related.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s