When I try to load a texture, create a sprite with that texture, and then draw that sprite, I get a bunch of weird characters in the console and then a runtime error.
==Details==
- I am running Windows 10, with a Nvidia quadro K5000M graphics card
- Using dynamic SMFL 2.4.2
- Using Visual Studio 2015 community
Here is the code:
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Network.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <iostream>
int main()
{
sf::Texture myTexture;
myTexture.loadFromFile("Images/profilePicture.jpg");
sf::Sprite mySprite;
mySprite.setTexture(myTexture);
sf::RenderWindow window(sf::VideoMode(200, 200), "SFMLgame");
sf::Clock clock;
sf::CircleShape shape(100.f);
while (window.isOpen())
{
sf::Time theTime = clock.getElapsedTime();
std::cout << theTime.asSeconds() << std::endl;
sf::Event event;
while (window.pollEvent(event))
{
switch (event.type)
{
case sf::Event::Closed:
window.close();
break;
case sf::Event::MouseMoved:
break;
}
}
window.clear(sf::Color::Cyan);
window.draw(mySprite);
window.display();
}
system("pause");
return 0;
}
The console is attached, no other window is created
The debug text is this:
'SFMLgame.exe' (Win32): Loaded 'C:\Users\Kyle\Documents\Visual Studio 2015\Projects\SFMLgame\Debug\SFMLgame.exe'. Symbols loaded.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Users\Kyle\Documents\Visual Studio 2015\Projects\SFMLgame\SFMLgame\sfml-graphics-2.dll'. Module was built without symbols.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140d.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Users\Kyle\Documents\Visual Studio 2015\Projects\SFMLgame\SFMLgame\sfml-system-2.dll'. Module was built without symbols.
'SFMLgame.exe' (Win32): Loaded 'C:\Users\Kyle\Documents\Visual Studio 2015\Projects\SFMLgame\SFMLgame\sfml-window-2.dll'. Module was built without symbols.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ucrtbased.dll'
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32full.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ucrtbased.dll'
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\opengl32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp_win.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\win32u.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmmbase.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\winmmbase.dll'
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\glu32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\combase.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nvdm.inf_amd64_d7a8661bc29bbf05\nvinit.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ig7icd32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wtsapi32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\igdusc32.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
'SFMLgame.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\version.dll'
'SFMLgame.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nvdm.inf_amd64_d7a8661bc29bbf05\nvinit.dll'
The thread 0x2a30 has exited with code 0 (0x0).
'SFMLgame.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Cannot find or open the PDB file.
Exception thrown at 0x73DEE37D (vcruntime140.dll) in SFMLgame.exe: 0xC0000005: Access violation reading location 0x02BAF000.