The GtkBuilder window containing the complex popover UI was left dangling, and with a dangling pointer to its former child, causing crashes on gtk_grab_notify() after the popover was destroyed.
In this demo several widget create popovers with different complexities, positions, and grabbing behavior.