Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Can't compile basic program, exits with code 0xc0000417.  (Read 5287 times)

0 Members and 1 Guest are viewing this topic.

PizzaBoy

  • Newbie
  • *
  • Posts: 4
    • View Profile
Can't compile basic program, exits with code 0xc0000417.
« on: March 27, 2013, 03:04:18 pm »
I successfully compiled SFML 2.0 source using Visual Studio Express 2012 (v110) (x86), set up for static linking. (I have also tried the precompiled binaries available on this forum).

I created a new blank project with the following settings:

Include Path: Debug & Release
Lib Path: Debug & Release
Links: Debug | Release
Preprocessor: Debug & Release
Code Generation: Debug | Release

I created main.cpp and pasted this code:
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

When compiling and launching, a command window appears and then closes instantly.

Debug output:
Quote
'GameProject.exe' (Win32): Loaded 'C:\Users\PizzaBoy\Stuff\VS12 Projects\GameProject\Debug\GameProject.exe'. Symbols loaded.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\opengl32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\lpk.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\usp10.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\glu32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ddraw.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dciman32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nvoglv32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wintrust.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntmarta.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Wldap32.dll'. Cannot find or open the PDB file.
The thread 0x1064 has exited with code 0 (0x0).
'GameProject.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Cannot find or open the PDB file.
'GameProject.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\powrprof.dll'
The thread 0xd44 has exited with code 0 (0x0).
The thread 0xb38 has exited with code 0 (0x0).
The thread 0x1018 has exited with code -1073740777 (0xc0000417).
The thread 0x1360 has exited with code -1073740777 (0xc0000417).
The program '[4564] GameProject.exe' has exited with code -1073740777 (0xc0000417).

The same error occurs if I compile SFML for dynamic linking as well.



Compiler Info:

Quote
Microsoft Visual Studio Express 2012 for Windows Desktop
Version 11.0.60223.01 Update 2 CTP
Microsoft .NET Framework
Version 4.5.50709

Installed Version: Desktop Express

Team Explorer for Visual Studio 2012   05695-004-0030004-02700
Microsoft Team Explorer for Visual Studio 2012

Visual Basic 2012   05695-004-0030004-02700
Microsoft Visual Basic 2012

Visual C# 2012   05695-004-0030004-02700
Microsoft Visual C# 2012

Visual C++ 2012   05695-004-0030004-02700
Microsoft Visual C++ 2012

NuGet Package Manager   2.2.40116.9051
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools   11.1.20828.01
Microsoft SQL Server Data Tools


Aster

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Can't compile basic program, exits with code 0xc0000417.
« Reply #1 on: March 28, 2013, 12:42:03 am »
Have you tried compiling a simple "Hello, World!" program yet?

Is it me, or are you compiling a 64bit program using 32bit libraries?
I'm not much of a Windows developer, but maybe if you tried:
1) Compiling SFML in 64bit
or
2) Using a 32bit compiler
You may see different results?

Also, have you tried running your IDE as administrator?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10827
    • View Profile
    • development blog
    • Email
Re: Can't compile basic program, exits with code 0xc0000417.
« Reply #2 on: March 28, 2013, 12:49:40 am »
Is it me, or are you compiling a 64bit program using 32bit libraries?
Shouldn't be an issue here. If targets type don't match VS won't be able to compile.

'GameProject.exe' (Win32): Loaded *** Cannot find or open the PDB file.
No need to post those warnings, they are okay.

So are you running your application through the debugger? Where does it come to the crash?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

PizzaBoy

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Can't compile basic program, exits with code 0xc0000417.
« Reply #3 on: March 28, 2013, 12:41:15 pm »
So here is what I have tried. First, I did a complete reinstall of Visual Studio, which did not solve the issue.

I then stepped through the program with the Visual Studio debugger. The program terminates after creating a window.

Two steps before exit.
Step before exit.
And then it exits.

I tried a simple Hello World program and it worked fine.

I then tried to compile a basic GLFW program. It too crashed upon creating a window.

I tried creating a new project using the Win32Project template, and it creates a window just fine.

If it helps, I have uploaded my SFML project here.

PizzaBoy

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Can't compile basic program, exits with code 0xc0000417.
« Reply #4 on: March 28, 2013, 01:44:55 pm »
Apologies for double posting, but I would like to report success.

I uninstalled Visual Studio 2012 once more, then uninstalled absolutely everything related to Visual Studio or the .Net Framework. I then searched the registry and removed all keys related to Visual Studio, then search my hard drive for all files used by Visual Studio and removed them. I then reinstalled Visual Studio 2012 (and Update 1) and now my new projects are working! Odd, however, is that my old projects still do not work. Here is a functioning project, in case anyone here is curious and feels like comparing it to my project from my previous post.

 

anything