Brad Wardell's views about technology, politics, religion, world affairs, and all sorts of politically incorrect topics.

So many crashes, so little time.

Well, not really. Not on the time part anyway. I have a crazy amount of time.

I hate to say this guys but I enjoy your crash reports. I’ve mentioned before that this is the first game I’ve been lead developer on since…I think The Corporate Machine which was like 1999. Thanks to the sale of Impulse, I can…indulge myself here.

So anyway, here is why your game crashes (most of the time).

Unlike with War of Magic, Fallen Enchantress is very very multithreaded.

That means, that lots of things are happening at the same time.  But it also means a lot of things can be changing variables at the same time.

If we weren’t stuck with DirectX 9, I’d be able to do some crazy insane things with the threads (with DirectX 10+, I could send a lot of my AI onto the GPU and let’s face it, you guys know I’d totally do it because I have a disease when it comes to computer AI).

Now, with FE, I’m dealing with Kumquat which was architected under a very different set of circumstances. So it wasn’t designed to be as multithreaded as I’ve been making things.  This means I have to use what are called critical sections to keep thread A from changing something that thread B is currently looking at.

If I miss one, the game crashes.  If I put in the wrong critical section, the game will hang hard (like lock up).

Here’s a classic example:

Thread 1:

for I = 1 to Number_Of_Cities

City = ListofCities[i]

 

Thread 2:

if CityConquered THEN Number_Of_Cities++

 

So you can end up where thread 1 ends up looking at a piece of data that is literally garbage and trying to do something with it.  The result, a crash.

Now, you might say, why have all these threads?

I can only respond by suggesting the loading up of War of Magic v1.4 and playing through a late game.  Nearly all the performance gains in FE are from multithreading.  Your CPU probably has 2 to 4 “cores” on it.  That means they can do a lot of cool stuff at once.

And in the future, when we ditch DirectX 9, I’ll be able to spin your graphics adapter into splitting up its drawing (#1 reason to look forward to an XBOX 720 is that it’ll probably be DirectX 11 based and that’s a very big deal). 

It is a non-trivial effort to nail all these down.  The good news is, it’s not hard. It just requires a lot of testing and evaluation which is what we’re doing. Your crash reports have made a world of difference.


Comments
on Feb 28, 2012

If you are getting my crash reports from windows, what is the advantage of e-mailing them to you?

on Feb 28, 2012

Good luck hunting those down. As for the the move past DirectX 9... ha! Wishful thinking my friend.

 

Once that stability improves I think I might take a leap of faith and pre-order the game!  

on Feb 28, 2012

I hope mine are helping!

on Mar 01, 2012

UmbralAngel
Once that stability improves I think I might take a leap of faith and pre-order the game!  

The game really is very stable by now. I've never had the latest version crash on me, and I've played it more than many released games.

The view from the developer side is very different, since a single developer sees the crashes of every user. I develop and maintain a piece of software that has a couple thousand users daily. I mentioned two weeks ago to a director of our company that I finally consider the latest big update stable - and this was three months after it was released. The following day I had to tell him in an email that we didn't ship total garbage. For me, seeing 15 crashes every day (from automated reporting) is quite a lot. For the users, that means about 0,25% of them are experiencing difficulties. Maybe even less, since crashes tend to gather around certain people with unique configurations.

on Mar 01, 2012

seanw3
If you are getting my crash reports from windows, what is the advantage of e-mailing them to you?

How would that even be possible? Brad doesn't specify where he gets the crash reports, but is it not a given he is referring to those emailed in by the FE beta testers???

on Mar 01, 2012

Neilo

How would that even be possible? Brad doesn't specify where he gets the crash reports, but is it not a given he is referring to those emailed in by the FE beta testers???

FE gets Smart Exception support

on Mar 01, 2012

Vallu751
FE gets Smart Exception support


I read seanw3's post to mean he thought windows error reporting was sending his FE crash reports to windows and then somehow was getting to SD, so he thought his emailing of them was redundant.
Perhaps i took it to literally when he said "windows"