Ok, I made a little more testing to check where and how exactly this happen!
I noticed that the game self resize the window so it doesn't have this black spots! Sound like you did this on purpose @HopFrog, idk why maybe you can tell me! hehe But that's it! this black area on the right side causes the crash!