I'm pretty sure you have some bugs in your code there.
The game instantly closes when you move the mouse or input anything, which sounds to me like you're not implementing a proper event loop, or rather than you're reusing event instances even though they're not valid anymore.
At least it renders stuff for me.
Without code, it's near impossible to say what's going on, but I'm pretty sure it's something in your code.