Author Topic: [Solved] SEHException: External component  (Read 8678 times)

Offline hloken

  • Newbie
  • *
  • Posts: 5
[Solved] SEHException: External component
« on: October 24, 2009, 02:20:13 pm »
Hi,
I recently purchased AI Wars on Steam and I get an unhandled exception inside SlimDX.Direct3D9.Device.Present(). Happens in both Steam version and stand-alone. I get to the profile-screen and bang. Configuration:
Core 2 Duo, 6GB Ram, Nvidia GTX 280, Soundblaster X-fi Gamer, Windows 7 x64 Ultimate

I've tried re-installing SlimDX, the game, DirectX Restributable and .Net 3.5 SP1 runtime, still same problem. I have also tried with both v190.38 and v191.07 of the Nvidia drivers.

I'd appreciate any help. From UnhandledErrors.txt file:

<snip>
-----------------------------------Application_ThreadException-----------------------------------System.Runtime.InteropServices.SEHException: External component has thrown an exception.
   at SlimDX.Direct3D9.Device.Present()
   at AIWar.Direct3DWrapper.Present() in C:\vcprojs\AIWar\DX\Direct3DWrapper.cs:line 668
   at AIWar.GameForm.DrawDirect3D() in C:\vcprojs\AIWar\GameFormParts\GamePanel.cs:line 2591
   at AIWar.GameForm.RunNextCycle(Boolean DoRendering, Boolean DoScrollingAndInput) in C:\vcprojs\AIWar\GameFormParts\GameLoop.cs:line 1428
   at AIWar.GameForm.gameLoop() in C:\vcprojs\AIWar\GameFormParts\GameLoop.cs:line 244
   at AIWar.GameForm.GameForm_Load(Object sender, EventArgs e) in C:\vcprojs\AIWar\GameFormParts\Startup.cs:line 261
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
<snip>
« Last Edit: October 25, 2009, 12:10:04 pm by x4000 »

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Hi there,

Sorry to hear about your troubles -- this is certainly an unusual one, and you've done a very thorough job already of trying to run it down.  Whatever this issue is, from the looks of it it is below even the SlimDX level; my guess would be either driver trouble, something physically amiss with the GPU itself (overheating, etc), or an install of DirectX that is still somehow corrupt.

I'm running a very similar rig to you in a lot of respects: Q6600, 4GB Ram, Nvidia 8800GT, Windows 7 64 Ultimate.  So it's certainly not a compatibility thing, of course.  Looking at the drivers I'm using for NVidia, I see a driver data of 9/27/2009 with a version of 8.16.11.9107, which is working great.  I think that is the 191.07 version, but I'm not 100% positive.

In the past I was running the 169.21 version, which was pretty out of date, but it was also working well.  There were some reports of some bugs in the 180.x line that were causing some issues such as black screens, but that seemed to vary by the specific graphics card.  I don't know if perhaps that is also the case for you.

Given your already thorough examination of your system, my best guess is that there is something bugged with those specific driver versions and your specific card.  You might try going back to the NVidia archives a tad further to see if that resolves it, and that would at least pinpoint the problem -- and if that was the issue, then hopefully the next driver version will no longer contain whatever the issue is.

Usually when there is something wrong with Direct3D9 it either shows a black screen for the DX part of the game (bad drivers), or it crashes when trying to initialize Direct3D9 (bad/corrupt install of DirectX).  You're passing the point of the initialization, but then it's failing when it is trying to flip the back buffer to the actual display, which is most unusual.  Generally speaking, I'd expect most errors to occur before that point if it was a DirectX problem, so that's something that again leads me down the path to a bugged driver.

Hopefully that helps -- there are some others here with good technical backgrounds on strange DirectX issues, so they may weigh in with some thoughts on that as well.  You might want to run some stress-testing on your GPU if this is still not working, just to make sure that that doesn't turn up any hardware faults.  The fact that this is failing so quickly and immediately points to software to me, though, honestly -- if it was an overheating thing I'd expect it to fail frustratingly randomly after a varying amount of time.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline hloken

  • Newbie
  • *
  • Posts: 5
Hi,
thanx for the quick response. I also do not think it is the GPU overheating, as far as I can tell the error is completely deterministic: it always happens at the exact same place. At the same time, I cannot really see it being a hardware fault in the GPU either, I'm running some fairly 3d-heavy games (Batman: AA, Risen, RE5) flawlessly at max detail in 1920x1200, without crashes or any other sign of hardware fault. Considering the orgin of the exception from the dump of the callstack which as you said indicates outside the .Net runtime, I also must conclude that the error most likely lies in the drivers or DirectX.

I've also tried the game on my laptop which has somewhat similar specs: Core2Duo, 4GB RAM, Quadro 3500 (think 8800 GT/GTS), Windows 7 x64 Ultimate. This also seems to point to configuration/driver issues.

Anyway, I'll try with some earlier drivers and see how that works out.

Edit: The game ran flawlessly on my laptop, which somehow got lost in the original reply.
« Last Edit: October 24, 2009, 06:18:36 pm by hloken »

Offline hloken

  • Newbie
  • *
  • Posts: 5
I've now tried with the 186.35 driver which gives me the same error message. I also tried with the latest version of SlimDX (August) but seems AI Wars does a version check so it won't load those assemblies. Ah well, I'm giving up for now. Hopefully someone will discover a fix soon and I can steal it. Thanx for the help.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
No problem, I'm glad it's running well on your laptop at the least.  Bear in mind that the 18x.x series of nVidia drivers were where at least one other player had problems on a different card.  You might try something in the 17x.xx series, I'm not sure.  This is very curious, because out of thousands of players this particular error has never come up (go figure, right?).  Hopefully the next round of nVidia drivers will resolve this, although one other thing occurs to me -- you mention some pretty intense graphical games there, and I don't know off the top of my head, but are they running DX10 mode?  I wonder if there is something messed up with your DX9 in particular on that specific machine.

It's more than a little frustrating not to be able to find a solid fix for you with this, but I'm glad you've got such a nice laptop that this runs well on, at least.  Hopefully this will not be too much of an inconvenience; this is the first time I've come across a problem like this where a driver rollback or upgrades, or one of the many other solutions you tried, has not worked.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline hloken

  • Newbie
  • *
  • Posts: 5
Solved it!

The problem was caused by "EVGA Precision", a program from my graphic cards manufacturer that's used for monitoring GPU temps/frequencies and overclocking (which I never do). I suspect it is the "on-screen-display" functionality that interferes with DirectX, even though I turned it off. As long as I kill it before I start AI Wars the exception no longer occurs.

Thank you for all the assistance though, I am most impressed by the quick response I've received from you. This is the reason I love small independent development shops (Paradox, Kerberos and now Arcen), this level of service just can't be beat.

Edit: I'm trying to find a way to add (Solved) to topic title but can't find it. Help!?

« Last Edit: October 25, 2009, 10:12:58 am by hloken »

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Wonderful!  Boy, that's a real sideways solution there, so thanks so much for posting that so others will know the solution if they happen to have the EVGA Precision program. It's our pleasure to help. :)or

For the solved tag, simply edit your first post and changing the title will chang it for the topic. I'll take care of that now!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline hloken

  • Newbie
  • *
  • Posts: 5
Re: [Solved] SEHException: External component
« Reply #7 on: October 25, 2009, 02:54:49 pm »
Thanx for that. Now....back to the game.  :)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: [Solved] SEHException: External component
« Reply #8 on: October 25, 2009, 03:46:09 pm »
No problem -- enjoy!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!