You probably use some globally initialized SFML resource, which have an undefined destruction order, so the SFML global variables are destructed before your own SFML resource, causing a crash.
Don't use global or static variables, especially for SFML classes.