On 21.09.2010, at 14:25, Andy Fillebrown wrote: > In the 1.3 branch's Fl.cxx @ line 493 there is a call to OleUninitialize that > is causing problems in Qt based apps that use Csound. > > In the process of loading and compiling Csound input files, the dynamic FLTK > libraries are sometimes loaded and unloaded without any FLTK windows being > created, so OleInitialize (or CoInitialize) never gets called. This does not > stop FLTK from calling OleUninitialize in the Fl_Win32_At_Exit destructor, > though, which means the OleUninitialize call gets paired to Qt's > OleInitialize call instead of FLTK's. The immediate result is that the Qt > app can no longer set data on the system clipboard after running Csound. The > app also becomes unstable and crashes when alt-tabbing back and forth to > another window. > > Is there a way to work around this issue? Should I post a bug report?
Hmm, I think I understood the problem, and it's probably possible to fix it - but that needs some more investigation (there's a flag that should show the initialization state, but there's also at least one place in the code that doesn't set the flag...). That said, I'm curious to understand completely what you're saying about the environment where this happens: - there's a Qt based app - that uses Csound - and loads the dynamic FLTK libraries - w/o opening any (FLTK) window. What does it do with the FLTK libraries? Does it only use some functions? Is this specific to *your* app, or does Csound (or Qt ???) use FLTK's library? I'm puzzled... And, BTW, what's the difference between OleInitialize and CoInitialize? Can they be interchanged? FLTK code uses both, and I'm wondering why... Should we maybe replace CoInitialize with OleInitialize - setting the flag to know about initialization properly and using this to call OleUninitialize in the mentioned d'tor (if I understand it correctly, this would be called at dll unloading, right?). Albrecht _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
