Jump to content

Nvidia crash with 361.75 driver [fix inside]


doc

Recommended Posts

I had a very bad surprise: Torque was crashing at startup!

It keeps crashing since the Nvidia card driver 361.75.


If you have this problem too, don't worry and say thanks to @Lopuska for the fix!


The problem was in GFXD3D9CardProfiler::init(). For some reason, the driver combined with my hardware didn't

really loved the way Torque was asking to enumerate the devices, leading to a crash on startup.


here's the fix:


gfxD3D9CardProfiler.cpp


include this:

 

#include 
 
#pragma comment(lib, "dxgi.lib")

 


then replace the function "void GFXD3D9CardProfiler::init()" with this one:

 

void GFXD3D9CardProfiler::init()
{
   mD3DDevice = static_cast(GFX)->getDevice();
 
   IDXGIAdapter1 *adapter;
   IDXGIFactory1* factory;
   HRESULT hres;
   hres = CreateDXGIFactory1(__uuidof(IDXGIFactory1), reinterpret_cast(&factory));
   factory->EnumAdapters1(static_cast(GFX)->getAdaterIndex(), &adapter);
   DXGI_ADAPTER_DESC1 desc;
   adapter->GetDesc1(&desc);
 
   mCardDescription = desc.Description;
   mVideoMemory = desc.DedicatedVideoMemory / 1048576; //convert to megabytes
 
   adapter->Release();
   factory->Release();
   Parent::init();
}

 

compile, and here's torque working again!

Link to comment
Share on other sites

Just an update on this, while the above fix from anis does work perfectly (for Window 7 and later), the actual problem is an NVidia driver bug. It is fixed in the latest beta driver 364.51 so i assume that will be rolled out soon enough.

Link to comment
Share on other sites

Just another update for this, I was telling big fat porkies above, the new beta driver doesn't fix the problem and the problem has only ever been reported on GTX 760 GPU's so far. It is actually crashing when using dxdiag to look up information in WMIVideoInfo. So i have enabled DGXI 1.1 in WMIVideoInfo, so this will cause all Windows 7 or above to use DXGI instead of dxdiag for information, those with Windows vista or less it will fall-back to using dxdiag or WMI (in that order). Fix will be included with DX11 in a few days, if you want it now the commit is here (only touches WMIVideoInfo.h/cpp) https://github.com/rextimmy/Torque3D/commit/4a15179cce1b4d19ba7d07d4778e8e69b021b20f

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...