That’s not the best kind of mystery, but please let me know if you find a way to consistently reproduce this on a small project.
The message suggests that something fails in one of GM graphics functions, but creating a window doesn’t call any of those - only drawing to the window does.