Running my program was giving me a BadImageFormatException so I assumed this was due to me not entering a valid image file location. This was actually due to missing external libraries, which I have now added. The program just crashes now, with a single call to create a new render window.