C++ application fails to start correctly (0xc000000d)

6

I'm writing a C++ application using VS2010 on two dev computers - both are Win7 64bit SP1. I use git to sync the repositories.

On one of the machines the compiled executable (and also the test exec) stopped working with the following error, while on the other machine it works fine and I'm able to continue development.

The application was unable to start correctly (0xc000000d). Click OK to close the application.

I tried deleting the repository and cloning it again. I also made sure I have the same versions of Boost, git, Visual Studio. Also, I tried debugging (stepping in) but the error occurs before any line of code is reached.

Notice as far as I understand I'm tracking Visual Studio's solution\project configuration files as detailed here.

I'm at a loss, how would you debug this?

UPDATE 1: Only the Debug version fails to run. The Release version runs fine

UPDATE 2: The executable that doesn't work does work on the other computer!

UPDATE 3: I've reinstalled VS2010 (exactly the same version) - didn't help. Surprisingly the compiled files are not the same size between the two machines.

c++
visual-studio
asked on Stack Overflow Apr 13, 2011 by Jonathan • edited May 23, 2017 by Community

9 Answers

3

I got the same problem as you mentioned. My solution:

  1. Clean the manifest file and rebuild
  2. In the property page-> Manifest tool -> make sure "Additional Options" is set to nothing. (I set it as "/validate_manifest" before).

Or you can try "Embed Manifest -> NO", rebuild and then set back to Yes. It sounds to be ridiculous, but it really works sometimes. I don't know why.

answered on Stack Overflow May 26, 2012 by Steve • edited May 26, 2012 by Martijn Pieters
2

I got the same phenomenon suddenly without a warning on Win7 / VS2010 / C++. Debug App couldn't be launched, got 0xC000000D at initializing and loading multiple dlls. Found one base dll of my own responsible, played around with linker settings. Modifying settings, incremential rebuild -> app starts, rebuild all -> app crashes again. After setting "generate manifest" to "no" in the linker settings the sample app works, but the main app still crashes. After setting "generate manifest" to "no" for the most of my dlls -> the app starts in debug mode again. The stuff is very spurious, because some dlls need the modified settings others do not.

answered on Stack Overflow Sep 28, 2011 by Martin Seck • edited Nov 10, 2012 by gregwhitaker
1

Have a look at the top two answers to this question

Program crashes with 0xC000000D and no exceptions - how do I debug it?

On the machine where it fails, try running the debug executable NOT under the debugger, and update your question to say what happens. If it crashes, are you able to then attach the debugger whilst the message box is still there and get a stack trace that tells you what function it is crashing in?

answered on Stack Overflow Apr 16, 2011 by James Crook • edited May 23, 2017 by Community
1

This is the weirdest thing....

Try deleting the "ipch" directory and then rebuilding.

Hope it works for you, I have wasted hours on this.

answered on Stack Overflow May 13, 2011 by Amir
1

disabling/enabling precompiled headers fixed the issue for me. I was facing crash on Debug x64 only - I guess it was related to an upgrade from boost 1.50 to 1.52, while keeping pch files.

answered on Stack Overflow Feb 27, 2013 by hervé meunier
0

in my case i got it working again by setting generate manifest to NO on all projects

answered on Stack Overflow Dec 10, 2012 by ColacX
0

I have changed "Embed manifest" setting to NO and then back to YES but it didn't help. For me setting General->Platform Toolset to Windows SDK 7.1 for my program and all dependent libraries compiled with it helped.

answered on Stack Overflow Jan 8, 2013 by user1957825
0

It's the ipch just delete the entire folder and it will clear it up. I was confused for a while too.

answered on Stack Overflow Jul 28, 2015 by Franky Rivera
0

I saw the error while using OpenCV library compiled with MSVC2010 in a project running on MSVC2015. Changing project configuration properties->General->Platform toolset from Visual Studio 2015(v140) to Visual studio 2010(v100) resolved the error.

answered on Stack Overflow Jan 18, 2018 by AMRAY

User contributions licensed under CC BY-SA 3.0