project compiles and links, but it crashes immediately