In your file loading test, it's actually loading it a second or maybe third time.
The test is usually just:
if (!texture.loadFromFile("image.png"))
{
std::cerr << "Failed to load image." << std::endl;
return EXIT_FAILURE;
}
That way everything else that follows this code knows that the texture loading was successful.
Your problem does sound strange although similar errors have popped up before due to builds so you should probably check it.
Is your SFML a downloaded binary or did you build it yourself from the master source?
Which version of SFML are you using?
If downloaded, is the compiler version of that library
identical to the compiler version you are using (not just "similar")?
Are you mixing builds? Using release/debug builds when you're trying to compile in the opposite? Same with 32-bit and 64-bit; they have to match perfectly too.
Are you mixing versions? We've all done it, right? You link the headers of the new version of SFML but forget to update the DLLs (or whatever) that are in your directory.