What is "Error flushing display"?

I’m porting an app to GTK4 that draws to GtkDrawingArea. Occasionally I get Gdk-Message: [Timestamp]: Error flushing display: Resource temporarily unavailable. The app terminates without a segfault or any hint what might be wrong. What does this mean? Is it my fault?