This issue only happens in release, in debug everything works fine. I get a sigsev in release as soon as I click save. But the execution still hasn't returned to the program yet. So some parameter to the fuction call for the save dialog is making the thing crash in release for some reasons..