Linux VSTGUI crashing in Reaper after opening and closing UI several times

I tested with my own plugin as well as the Panner plugin. It’s reporting SIGABRT in the DrawHandler constructor in x11frame.cpp. It’s dying on cairo_xcb_surface_create().

DrawHandler (const ChildWindow& window)
        auto s = cairo_xcb_surface_create (RunLoop::instance ().getXcbConnection (),
                                           window.getID (), window.getVisual (),
                                           window.getSize ().x, window.getSize ().y);
        windowSurface.assign (s);
        onSizeChanged (window.getSize ());
        device = cairo_device_reference (cairo_surface_get_device (s));

Shouldn’t there be a call to cairo_surface_destroy() in the DrawHandler deconstructor?

Please use the develop branch of VSTGUI as there is a important bug fix for this.

That fixes things in Reaper. VSTGUI plugs are crashing in Ardour however. I’m having troubles loading it in the debugger though to find out what’s going on.