Sapphire’s RedLine breaks on 64-bit due to compile error

committed to database on January 31, 2010 at 2:33 am Eastern Standard Time 21 comments digg this

Every several years or so, I undergo a complete system overhaul to keep up with the increasing demands of PC games. One of the components I try not to cut corners on is the GPU. While I was on the NVIDIA track for some time, I decided to pick up an ATI Radeon HD 5970 at Sapphire’s premium price and then some more, due to eBay sharks. (NVIDIA’s Fermi chip is going to be a complete and utter failure, jump ship now.)

Sorry, this tool is not supported on your graphics card. Thanks for your business, though!Of course, I’m not here to write about the hardware.

After installing the card, I registered at Sapphire for their “gold club” membership; in other words, I registered my card for warranty services. One of the benefits to registration is access to an exclusive tool that allows users to tweak the card’s voltages for (enthusiast) overclocking purposes. After download I ran it a small issue. It doesn’t work at all.

The error baffled me a bit. It was specifically written for the 5970 yet doesn’t work on the 5970. What the hell? Poking around a bit, I discovered the executable was written in a .NET language making troubleshooting much easier.

Sapphire's Redline Disassembly 

After disassembling RedLine in Reflector, I noticed two things. First, the error popping up was due to an error being caught by a generic exception handler [1]  in the code. In other words, if anything happened during the initialization of the interface it would cower behind the “not supported” error and shut down. Hardly an accurate message, but at least it isn’t an error with hexadecimal digits.

Notice the program makes use of Windows Event logging? I did. Firing up Event Viewer, I caught a break and found the event generated by the disassembled code above [2].

VoltDisplayViewModel Failed Instantiation:System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
   at HemlockOvervolt.ViewModel.VoltDisplayViewModel..ctor()
   at HemlockOvervolt.MainWindow..ctor()

Whoa whoa whoa. This looks familiar. Oh, that’s right… Yahoo made this same mistake a little over a year ago with their WPF-based Yahoo Messenger application. This “troubleshooting signature” is usually indicative of an application being compiled with “Any CPU” mistakenly selected as the target platform. (The target, “Any CPU”, was designed for applications that don’t have a reliance on platform-specific assemblies.) In this case, RedLine is attempting to load a 32-bit (GPU) hardware interoperability assembly into its 64-bit process, which is a big no-no.

Thankfully, the RedLine tool isn’t digitally signed making correction very simple:

  • If you have Visual Studio installed, open an instance of the Visual Studio Command Prompt, execute corflags /32BIT+ SapphireRedLine.exe, and be on your way.
  • If you’d rather use a hex editor – I recommend XVI32 – simply navigate to file offset 0x218 ($218), change the byte 01 to 03, and save.

Sapphire should feel ashamed for not releasing a quick fix for this by now. It’s been available (and buggy) since November 2009 plus they charge over $700 for the card. Tsk tsk tsk.

  1. Leith January 31, 2010 at 4:34 am

    Did you remove that hideous heat-sink sticker?

    Anyway why do you need to use Sapphire’s volt mod tool. There are plenty of other tools by other 5970 vendors that should work (as long as they don’t check vendor IDs). Failing that you could just use AMD’s generic volt mod tool they gave to reviewers, or just use the best 5000 series over-clocking tool, MSI Afterburner.

    Can’t sleep tonight due to the fact my 5850 will arrive tomorrow… Lets hope the courier is nice and early…

  2. Leith January 31, 2010 at 4:38 am

    Also what frames are you seeing in say, Crysis?

  3. Dan January 31, 2010 at 9:19 am

    Ugh, recently I had a problem with one of my .NET programs. It runs fine on 32bit XP but on 64bit 7 I get random crashes that the VS Express 2008 debugger won’t catch, and that I can’t pin down. It can be reproducible in the same spot but then inserting debug statements totally changes where it crashes. If I choose to debug the crashed program, VS2010 opens (I have the beta 2 installed side by side, for some reason 2008 is no longer in the debug list pfft) and declares the heap is corrupted, making it rather useless.

    I don’t even use P/Invoke in this app (I think, I should probably double check).

    Hopefully turning off “Any CPU” and using x86 will fix it, haven’t had the chance to really test it much and I’m still not really sure that’s the cause…

  4. Dan January 31, 2010 at 9:38 am

    Addendum: Nevermind, I found one, and remembered I’m using a class from CodeProject that has tons of it. Joy, this’ll be fun to debug. I thought .NET caught stack corruption from P/Invoke. :(

  5. Mark Sowul January 31, 2010 at 10:46 am

    That’s like this gem from Adobe for fixing the PDF preview handler in 64 bit windows, which is even more pathetic. It’s been broken for years, and all it needs is a registry key to be changed for it to work.

    http://www.ditii.com/2009/09/11/fix-for-adobe-pdf-preview-handler-bug-in-64-bit-windows/

  6. Rafael January 31, 2010 at 1:50 pm

    I haven’t benchmarked Crysis, but I’m not happy the game doesn’t run well with AA turned on. I have 12GB of RAM, 4ghz CPU, and this video card and still can’t play Crysis @ Very High/AA 12x. The game is fucked.

  7. Leith January 31, 2010 at 2:16 pm

    Thats’s interesting that it doesn’t like fast PCs…
    I always though it was not optimizied as other games that look just as good always seem to run faster than Crysis.
    Hopefully Crysis 2 being a console game, the PC version will be optimized.

    You can always play it on DX9 using that ‘Ultra High’ config file hack.

  8. Leith January 31, 2010 at 2:19 pm

    The idea that DX9 is always faster than DX10/11 is actually true. I tried a sample from the DirectX11 SDK that uses the same shader for DX9/11 render paths. On DX11 I get 700 FPS. On DX9 I get 900 FPS. It seems DX10/11 has more CPU overhead.

  9. Brandon January 31, 2010 at 2:25 pm

    10.1 and 11 are pretty damn fast. Try out the demo for BFBC2!

  10. Mattisdada January 31, 2010 at 10:41 pm

    @Leith
    Not true

    Depends what your doing. Several component within DX10 has components of DX9 running more efficiently. But DX10 also enhances certain parts as well, which decreases performance but looks nicer+has more developer features to use.

    Eg, shadowing and lighting has a few bits running more effectively, but most of it has been revamped to be more accurate and nicer looking (+by using less code to do so)

  11. Singh400 February 1, 2010 at 5:33 am

    @Mark Sowul: Thanks for that. I’ve never really used the preview pane but I will now. Handy little fix thanks!

  12. Mark Sowul February 1, 2010 at 8:15 am

    The more important draw for me was that it fixes the attachment preview in Outlook.

  13. Rafa Ruano February 2, 2010 at 2:36 am

    Hi , yesterday I installed your Anolis NT.X on my pc and it died , when I try to start it , never ends it is starting and restarting again and again , I can only acced to BIOS , did it happenned before , can you help please ????

    Thanks & excuse my english ( I´m spanish)

  14. FrameBuffer February 2, 2010 at 5:42 pm

    Just DLed latest Redline from Sapphires site (http://www.sapphiretech.com/presentation/downloads/download_index_01.aspx?psn=0006) – SAPPHIRE_Redline_Overvolt_Utility_V1_633959667574 401665.1.zip dated Dec 9, 2009, using XIV32 and Go to Address $218 (as instructed above), the address shows as 03 already. Still not working get same error (Sorry, blah blah blah). Might install VS2008 and give it a go.

  15. Rafael February 2, 2010 at 5:44 pm

    Make sure you also run it as an Administrator. It will show the same error if you’re trying to execute it as a User.

  16. anonymuos February 3, 2010 at 3:27 am

    Or simply use PowerStrip to turn up the engine and memory clocks instead of voltages.

  17. Raphael is a moron February 3, 2010 at 12:32 pm

    “NVIDIA’s Fermi chip is going to be a complete and utter failure, jump ship now.”

    Enjoy your shitty broken buggy ATI hardware and drivers and 30FPS slower DX11 slideshows. More like Raphael is a complete and utter failure, jump ship now.

    http://www.bit-tech.net/gaming/pc/2009/12/01/directx-11-performance-first-look-dirt-2/3

    “The difference between DirectX 9 and DirectX 11 is clear, and it doesn’t make for good reading for the new API. The average score in DirectX 11 is 30% slower than in DirectX 9. The story of minimum frame rates is even harder to ignore – in DirectX 9, the game is nearly 40% faster. “

  18. Rafael February 3, 2010 at 1:48 pm

    Not sure what DirectX 9 benchmarks have to do with Fermi, given it’s a DirectX 11 chip. The reason I switched to ATI was due to NVIDIA’s repeated failures at producing the Fermi chip. Read the news, sheep.

  19. AlikDesk February 5, 2010 at 2:40 am

    I tried and on behalf of the Administrator, the same error output

  20. Marvin February 5, 2010 at 1:25 pm

    @Rafael
    is it possible to port the “remote access website” to the old version of Windows Home Server? Would be greate to have mms there too. =)

  21. Leo Davidson February 9, 2010 at 10:32 am

    The link to the Adobe PDF 64-bit fix in the comments above is broken now since the site in question direct-linked to a file they shouldn’t have.

    The fix is here for anyone who wants it (and now includes a fix for thumbnails in addition to the preview handler fix, and also an installer/automated fix-it tool):

    http://www.pretentiousname.com/adobe_pdf_x64_fix/