Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
5.12.2, 5.12.3
-
None
-
Windows 10, x64, msvc2017
Description
Placing something on clipboard in a DLL which is used in QApplication via LoadLibrary produces access violation when QApplication is destroyed because it clears the clipboard.
Clearing clipboard before FreeLibrary is called, removes AV, however is not desired in my case. I need the data on clipbard retained after FreeLibrary is called.
QByteArray xml; QMimeData* mimedata = new QMimeData(); mimedata->setData("lasernet/xmltransformeractionslist", xml); QApplication::clipboard()->setMimeData(mimedata);
If I add dependency to DLL and not using Load/FreeLibrary there is not problem, but I cannot do this in this case since DLL is a plugin that may or may not be used.
Steps to reproduce:
Run the attached project. Add -w as a command line argument for a workaround. Crash does not occur with MinGW.