HelloWorld.exe - The application failed to initalize properly 0xc000000d

Using a fresh download of Cocos2D-X 2.0 rc0a (tried 0.13 as well) I get the error message “The application failed to initialize properly (0xc000000d)” when trying to build and run HelloWorld on Windows. Anyone seen this before?

It happens whether I choose “Start new instance” or “Step into new instance” from the Debug menu of the HelloWorld project’s context menu. It also happens whether running in Debug or Release configuration.

The last few lines from the Output window are:

‘HelloWorld.exe’: Loaded ‘C:and Settings\Nat\Desktop\cocos2d-2.0-rc0a-x-2.0\Release.win32\libcocos2d.dll’, Symbols loaded.
SXS: RtlCreateActivationContext() failed 0xc000000d
LDR: LdrpWalkImportDescriptor() failed to probe C:and Settings\Nat\Desktop\cocos2d-2.0-rc0a-x-2.0\Release.win32\libcocos2d.dll for its manifest, ntstatus 0xc000000d
Debugger:: An unhandled non-continuable exception was thrown during process load
The program ‘[476] HelloWorld.exe: Native’ has exited with code –1073741811 (0xc000000d).

Using:
Windows XP SP3
Visual C++ Express 2010
Bootcamp drivers from the Snow Leopard DVD
MacBook Pro 15" version 1,1

Tried using the “build_win32.bat” file and still get the same error message.

Tried installing all updates for XP, but still get the error.

Looks like it might have to do with this line in the output:
SXS: RtlCreateActivationContext() failed 0xc000000d

Does anyone have any clues?

Thank you for your feed back.
There is a known bug on windows caused by OpenGL ES lib.
Have you tried latest codes in github?
Now, it uses OpenGL instead of OpenGL ES on windows.

Minggo,

Thanks for your help. Using the latest code from Github, the HelloWorld.exe works now, but only in debug mode. The release mode crashes with the same (0xc000000d) error.

All other test projects, including HelloLua, tests and testjs, crash with the same error, whether in debug or release mode.

So that’s a start…

I’d like to help debug or fix this problem. Where is a good place to look in the code?

Hey, just figured it all out. It was libCocosDenshion.dll being linked incrementally. I don’t know why it causes the “Application failed to initialize” message listed above, but whenever I set the linker option on the libCocosDenshion project to /INCREMENTAL:NO, it fixes the problem.

That also explains why it worked sometimes in the Debug configuration, because /INCREMENTAL is more suited for a debug build.

I just read through Microsoft’s explanation of /INCREMENTAL and I cannot see why it is enabled in Cocos2D-X’s release builds. Shall I submit a pull request that disables incremental linking for release configurations?

Nat Weiss wrote:

Hey, just figured it all out. It was libCocosDenshion.dll being linked incrementally. I don’t know why it causes the “Application failed to initialize” message listed above, but whenever I set the linker option on the libCocosDenshion project to /INCREMENTAL:NO, it fixes the problem.
>
That also explains why it worked sometimes in the Debug configuration, because /INCREMENTAL is more suited for a debug build.
>
I just read through Microsoft’s explanation of /INCREMENTAL and I cannot see why it is enabled in Cocos2D-X’s release builds. Shall I submit a pull request that disables incremental linking for release configurations?

it’s really great helpful, change the link optiono of project libCocosDenshion project could let the application goes well.
Thx