1. Do what Nexus asks.
2. Some random guesses and suggestions below:
- enable more warnings for your build and fix them.
- make sure the SFML version you are using is built for your compiler (or build it yourself if it is not).
- use tools like "address sanitizer", "valgrind" and similar to track down the bug (Google them).
- use a debugger to help track down what's going on.
- use static code analysis to track down what you are doing wrong ("coverity prevent" is awesome but commercial, "clang analyze" is free and pretty good).
- build with a different compiler (and/or different OS) and compare warnings and runtime results.