I've downloaded the graphics-sprite tutorial source code but when I run it with an image of my own the program crashes. The only change I've made to the code is:
if (!Image.LoadFromFile("sprite.tga"))
return EXIT_FAILURE;
if (!Image.LoadFromFile("C:\\zorg_logo.png"))
return EXIT_FAILURE;
Replacing the sprite.tga file with one of my own. I originally put the zorg_logo image in the folder containing the project file. I also put it in all other folders I thought it might read it from, including the folder containing the solution, and the debug folder containing the executable. And as you can see I've now tried just putting the image in the C:\\ directory to try loading it from there but that doesn't work either.
When I run debug in VS2008 it points to the "if (!Image.LoadFromFile("C:\\zorg_logo.png"))" line and gives the error:
"First-chance exception at 0x72e065af in sfmlGraphicsSprite.exe: 0xC0000005: Access violation reading location 0xcccccccc.
A buffer overrun has occurred in sfmlGraphicsSprite.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program."
The strange thing is that when I run the code from the previous tutorial (graphics-window) it also gives a similar error, however this time pointing to the "App.Display();" line. This is particularly strange because in the tutorial code there is no image being loaded. So I don't know why I can successfully run the previous tutorial code in the Window section but not this code in the graphics section.
Ideas are much appreciated - thanks!