"The operation completed successfully" error - nsight 4.0

I’m super keen to use nsight to work on my 3d engine, unfortunately when I start the nsight graphics debugger it errors immediately with a pointless error.

After a bunch of trial and error, I’ve whittled it down to a simple case/repro steps;

  1. Create a new VS (2013) WinForms project (.NET 4.5)
  2. Set it to x86 and ‘Start Graphics Debugging’, it works. Now set it to x64 and ‘Start Graphics Debugging’ it errors immediately with ‘The operation completed succesfully’ :(

I hope I’ve just missed something obvious and that x64 winforms apps will ‘just work’

Cheers,
Chad

Hi,

I am able to reproduce a similar issue (I get an “access denied”), but just making sure I did the same as you in #2, do you go to the project properties and set the “Platform target:” drop down under “Build” to x64?

Thanks

Correct, project properties > Build > Platform target to x64. After setting this (and building) I’m now unable to get nsight to attach, it returns ‘The operation completed successfully’ error (which a quick Google shows is a bug in the error handling code inside something related to GDI).

So the issue is related to the bitness (x86 vs x64) and having WinForms/GDI in the mix somehow…

In order to load a x64 .NET app which uses WinForms with nsight -

http://www.btbsoft.org/Tutorials/view/4/Debugging-64bit-managed-applications-with-PIX

It’s the same trick people use to get Microsoft’s PIX debugger to launch x64 apps.

Basically, it’s a C++/CLI bootstrap app which you launch with nsight and it in turn launches your main application in the same AppDomain.

Happy debugging :)