[Development] QT dialogs loaded as DLLs in QT5 seem to be not safe against unload procedures

"Hauke Krüger(IND)" krueger at ind.rwth-aachen.de
Mon Feb 24 21:01:41 CET 2014


Hi everyone,

I have posted this question into another mailing list here,

http://www.qtcentre.org/threads/58194-QT-dialogs-loaded-as-DLLs-in-QT5-seem-to-be-not-safe-against-unload-procedures?p=259492&highlight=#post259492

and was then adviced to post it in the QT development forum. Hopefully,
this is the right place now...

I have a QT application which is started as an executable. In that
application, I load components stored in DLLs, each coming along with a
dialog window.
System is Windows 7, VS2012 and Qt 5.1.1 compiled from sources, by the way.

This worked well for a long time in QT4 but now that I switched to QT5,
there are numerous problems. Those problems are related to the fact that
DLLs are properly loaded with all symbols and stuff but the unload does
not really work properly in QT5.

I first reported a problem here

http://www.qtcentre.org/threads/5710...096#post255096

and finally solved this issue myself by fixing the respective lines of
code in QT5 sources. However, when reporting this as a bug, the answer
was that unloading DLLs with metatypes is not supported,

https://bugreports.qt-project.org/browse/QTBUG-35935.

Once I had fixed that problem, I started to run into the next problem
which was related to a QFontCache behavior which seemed not to be safe
against unload of DLLs. I did not check the reason for this in detail
since I need to use QT and do not have too much time to take part in the
development.

So, here is my question: is it worth checking the reason for these types
of errors or is the concept of "unloading QT DLLs" a feature which is
not meant to be supported in QT5? My feeling would be that unloading
DLLs should be supported whenever loading DLLs is. So, could anyone
comment on this?

If it is not supported officially I will either return back to QT4 which
did not make any problem in this regard or I will remove the "dynamic
load of components" feature.

Thank you for any comment and best regards

Hauke



More information about the Development mailing list