SDL_Init gives out a segfault or sigstop when building as debug

I use Manjaro linux (a distro based on arch) and I’ve installed SDL with pacman.
I was trying to make a framework around SDL 2, when all of a sudden, SDL_Init started giving me a segfault, killing the process. I don’t know what started causing this or when. Even simple code like this stops the process.

int main(int argc, char *argv[])
		return -1;
	return 0;

The only thing that fixed it, was building in Release mode. Why can’t I debug anymore? Why does this happen? Is there something with my system?