A Mind Lost

Anything and everything.

Borderlands General Protection Fault

I’m usually long-winded about my trials and tribulations with software, but I’ll endeavour to be brief here.

Steam had Borderlands GOTY Edition on sale for about $8.00 US today, which includes the game and all four downloadable content packs.  I already own the game and the first two DLC, having purchased their DVD releases.

Since it was already installed, I let Steam download a little bit, paused it, and copied the previously installed data over to the Steam install location.  Like NWN2, it switched to “Suspended” after it downloaded whatever was missing/invalid.  A little bit of jockeying files back and forth, with no clue which files might have broken things, and it finally showed as Ready to Play.

After the trouble I had with NWN2 where, between Steam sessions, the game would inexplicably think it had more to download, I performed a backup of the data, deleted the local content, and reinstalled from said backup.  The game was ready to play.

Launching, I received a “Stopped Unexpectedly” error from Windows, followed by another messagebox:

While this screenshot is not from my error, as I foolishly didn’t think to take one until after I had resolved the problem, the error is identical.  Of course, the path to the executable is wrong, but for our purposes that doesn’t matter.

Googling for a solution turned up quite a few hits, but no answers.  I tried running the borderlands.exe straight from it’s installed location and received another error complaining that physxcudart_20.dll and (after clicking ok) cudart32_30_9.dll couldn’t be found.

cuda is part of nVidia’s PhysX runtime software.  While I have PhysX installed thanks to the nVidia display drivers, Borderlands wasn’t able to find it.

Long story short, reinstalling PhysX from the standalone installer available from nVidia fixed the problem.  I have a feeling that I may have broken it myself by removing PhysX’s installed location from my PATH environment variable at some point, although I didn’t try that out before reinstalling the software.

I’ll also note that in spite of uninstalling the DVD copy of Borderlands, there was a lot of cruft left over in the registry.  I just F3’d my way through a search for “2k ” (from 2k Games) and deleted them all.

As an aside, I really cannot stand the practice of some software modifying the global PATH environment variable.  We’re not running DOS any more; thanks to the Windows registry there’s no longer any reason to require modifying the path.  A process can change it’s search path for shared libraries at startup via SetDllDirectory, and a registry key exists under “HKLM\SOFTWARE\AGEIA Technologies” that points to the Engine subdirectory of the PhysX install path.

Leave my PATH alone!

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: