[LV2] Qt5 plugin UIs and libsuil

David Robillard d at drobilla.net
Sun Feb 26 03:34:18 PST 2017


On Thu, 2017-02-23 at 13:57 +0100, Filipe Coelho wrote:
> On 23.02.2017 13:35, Stefan Westerfeld wrote:
> >     Hi!
> > 
> > My SpectMorph LV2 plugin uses Qt5 for its UI. Ardour (and maybe
> > other hosts)
> > uses libsuil, but since libsuil doesn't support embedding Qt5
> > widgets, the
> > plugin UI won't work. This is not only the case for SpectMorph,
> > other Qt based
> > plugins like synthv1 can also be compiled against Qt5.
> 
> Hello there.
> Just a few days ago I took my chances on this too.
> See 
> https://github.com/falkTX/suil/commit/6123337a316d95b9fe70037c738e084
> 0fb707ccb

I have added a cleaned up version of these to master, but it crashes
(as do both original versions) for me with jalv.gtk almost every time. 
Gtkmm hosts like Ardour usually, but not always, avoid this problem.

http://git.drobilla.net/cgit.cgi/suil.git/commit/?id=176e3c9146d01d35b8
71b7a00e3c8c2482b008ec

The fix is to call XInitThreads() in the host before any Gtk functions.
  Nothing else I've tried in the past several miserable hours works. 
Otherwise, cairo/pango explode by accessing a garbage mutex.

Of course, this makes host code depend on X11 which defeats at least
some of the point of suil, but I don't know what the proper solution to
this is.  Presumably the messy late creation of QApplication is a
similar problem here that a suil_init() function could resolve, but
that function couldn't literally call this stuff because that would
make libsuil depend on the libraries.

Doing it dynamically would avoid that, which is better, but still
brings everything into the address space.

Patches welcome, I've suffered enough with this nonsense for a while :)

-- 
dr



More information about the Devel mailing list