- 
    Bug 
- 
    Resolution: Done
- 
    P4: Low 
- 
    5.2.0
- 
    None
- 
    Microsoft Windows 7 64 Bit, Visual Studio 2012
- 
        131a511194935554357972c99c325c7202077560 (stable 5.2.1, 8.1.2014)
I use the command line option "-platformpluginpath" to specify a search path for plugins in QT software deployment. When I specified the additional library path ".", a crash arised. When using the debugger, the callstack is:
 	Qt5Cored.dll!QByteArray::QByteArray(const char * data, int size) Line 1386	C++
>	Qt5Cored.dll!QLibraryPrivate::fromRawMetaData(const char * raw) Line 115	C++
 	Qt5Cored.dll!findPatternUnloaded(const QString & library, QLibraryPrivate * lib) Line 307	C++
 	Qt5Cored.dll!QLibraryPrivate::updatePluginState() Line 689	C++
 	Qt5Cored.dll!QLibraryPrivate::isPlugin() Line 662	C++
 	Qt5Cored.dll!QFactoryLoader::update() Line 161	C++
 	Qt5Cored.dll!QFactoryLoader::refreshAll() Line 298	C++
 	Qt5Cored.dll!QCoreApplication::addLibraryPath(const QString & path) Line 2392	C++
When looking more closely at it, it seems that the problem arises when scanning the DLL Qt5Core.dll (which is located in directory "." in my case) in function "findPatternUnloaded".
I did some aditional tests let me get the impression that the function "findPatternUnloaded" crashes whenever it sees any DLL other that one foreseen as a QT plugin. I think that DLLs other than the QT plugin DLLs do not have the META DATA that QT scans for.
It may not be the common case to put a "normal" DLL into a plugin directory but QT should not crash, I think.
By the way, I need to specify a specific QT plugin search path since I load the complete QT system in Matlab via mex file. The typical way to locate the plugins for the platform do not really work for me.