Its not entirely surprising that you get a window system error when you keep restarting the window manager.
This is generally not a problem on X since the WM is just another client. You don't even need to be running a window manager and everything should more or less work (except window placement/sizing/etc obviously).
That being said, this almost surely not a bug in Geany. As @shevegen said, it's probably something with i3 (most likely) or GTK+/GDK. The message from X server is misleading at best, either GDK (in process) or i3 (out-of-process) could also make X give such a message.