When you run using the GDK Broadway backend, this turns out to happen, and it's new in my experience - I was cheerfully iterating over event->string and calling strlen on it without ever checking it for NULL.