No Qt platform plugin could be initialized
-
Installed Qt 5.12 using Qt installer. QtCreator will not start. Error "Application failed to start - No qt platform plugin could be initialized".
Searched Google and this form for the answer. Found lots of users with the same problem in the forum with the same problem but, no real fixes.
The same problem occurs with QT6. There QtCreator, QtDesiner etc. do not start.
All replies are appreciated.
Thanks
-
Hi,
Which Linux distribution are you using ?
Which desktop environment ? -
@ham13 I had the same problem a couple of times, Windows too, installed by an online installer. I reinstalled it twice, created 2-3 new projects and suddenly it worked again (not for so long). I have no idea why this problem occurs but before i got this problem, Qt replied with info about missing .dll, and when i manually added them plugin error appeard. And well, this morning got same problem again :/
-
Thank you all for your responses! I installed Qt and QtCreator using the Qt installer I downloaded from the Qt site. Installed both Qt5 and Qt6 separately
after removing the previous version. I used the maintenance tool to remove the previous versions before installing the next. Both Qt5 and Qt6 gave the same error.The net talks about moving .dll files but the info is old and the directories are not the same in current versions.
My OneDrive has been down but, I'll try to update it. MS did something to it so that it stopped working on Windows 10.
Thanks
-
Regarding MS OneDrive. My PC originally had MSW 8.1 installed when I purchased it. Since then we did the "free" upgrade to Windows 10 and have kept up-to-date on the updates. Now the PC its running Windows 10 but the "System page" still show 8.1. The problem is that the OneDrive app came on the PC. Now to use it I have to upgrade Windows. Well since the OS is Windows 10 there are no updates available and the new OneDrive will not install because "update" thinks it is Win8.1. UGG!
I may just unistall it.Looked at all the paths in the environment. None contain any reference to OneDrive or Qt. Is there a path to Qt I should add? If so what should I add to the path?
Thanks
-
Well I think then OneDrive is not blame for your Qt failing.
So perhaps start at square 1, open a CMD window and type
set QT_DEBUG_PLUGINS=1
then start Qt Creator from that same CMD window, say like this:
C:\Qt\Tools\QtCreator\bin\qtcreator.exe
(or wherever your Qt Creator is located)To see the debug oiutput you need to download DbgView from here
Note: start DbgView before starting Qt Creator :-)
Then post say the last 100 lines or so of the output here (i.e. where it fails) -
@ham13 said in No Qt platform plugin could be initialized:
Regarding MS OneDrive
Don't rely on me for this, because I would not want you to lose access to any data because I am not correct. But it sounds like you are running some old Win8 OneDrive app on your newer OS. There should be a OneDrive app or just inbuilt support in the newer one. What matters is not which app you use to access OneDrive but just your login so that you can access your data; the client app (so long as it works) should not be relevant. But as I said I don't want you to let me make you lose your data!
-
Regarding OneDrive. OneDrive will not run. It since it thinks the OS is win 8.1 it will not start unless I update windows. Windows update has no available updates as the OS is now Win 10. I downloaded the current OneDrive but it will not install. It tells me "You have an preinstalled app for this". Seems like catch 22. Should I copy the OneDrive offline files for BU the uninstall OneDrive using the programs/app from the control panel?
I'll post the output of the debugger later today.
Thanks
-
@ham13 said in No Qt platform plugin could be initialized:
I downloaded the current OneDrive but it will not install. It tells me "You have an preinstalled app for this".
I have no idea. Maybe you are supposed to uninstall the existing one first. You should not need to use some Win8 OneDrive client under Win10. But like I said, I am not making any promises, only assumptions.
Should I copy the OneDrive offline files for BU the uninstall OneDrive using the programs/app from the control panel?
If you have the space somewhere it might be a sensible precaution :)
-
Ok on OneDrive. Will BU files the delete them from OneDrive.
The results of the debug are below.
00000001 0.00000000 [12004] 12840 0000000000000000 ENTER: DllCanUnloadNow
00000002 22.68410873 [12004] 6884 0000000000000000 ENTER: DllCanUnloadNow
00000003 104.30684662 [12004] 8832 0000000000000000 ENTER: DllCanUnloadNow
00000004 104.81434631 [12004] 10088 0000000000000000 ENTER: DllCanUnloadNow
00000005 111.02730560 [12004] 6884 0000000000000000 ENTER: DllCanUnloadNow
00000006 123.44914246 [5840] qt.core.plugin.factoryloader: checking directory path "C:/Qt5/Tools/QtCreator/bin/plugins/platforms" ...
00000007 123.45053101 [5840] qt.core.plugin.factoryloader: looking at "C:/Qt5/Tools/QtCreator/bin/plugins/platforms/qdirect2d.dll"
00000008 123.46178436 [5840] qt.core.plugin.loader: Found metadata in lib C:/Qt5/Tools/QtCreator/bin/plugins/platforms/qdirect2d.dll, metadata=
00000009 123.46178436 [5840] {
00000010 123.46178436 [5840] "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
00000011 123.46178436 [5840] "MetaData": {
00000012 123.46178436 [5840] "Keys": [
00000013 123.46178436 [5840] "direct2d"
00000014 123.46178436 [5840] ]
00000015 123.46178436 [5840] },
00000016 123.46178436 [5840] "archlevel": 0,
00000017 123.46178436 [5840] "className": "QWindowsDirect2DIntegrationPlugin",
00000018 123.46178436 [5840] "debug": false,
00000019 123.46178436 [5840] "version": 393984
00000020 123.46178436 [5840] }
00000021 123.46178436 [5840]
00000022 123.46178436 [5840]
00000023 123.47000885 [5840] qt.core.plugin.factoryloader: Got keys from plugin meta data QList("direct2d")
00000024 123.47006226 [5840] qt.core.plugin.factoryloader: looking at "C:/Qt5/Tools/QtCreator/bin/plugins/platforms/qminimal.dll"
00000025 123.47084045 [5840] qt.core.plugin.loader: Found metadata in lib C:/Qt5/Tools/QtCreator/bin/plugins/platforms/qminimal.dll, metadata=
00000026 123.47084045 [5840] {
00000027 123.47084045 [5840] "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
00000028 123.47084045 [5840] "MetaData": {
00000029 123.47084045 [5840] "Keys": [
00000030 123.47084045 [5840] "minimal"
00000031 123.47084045 [5840] ]
00000032 123.47084045 [5840] },
00000033 123.47084045 [5840] "archlevel": 0,
00000034 123.47084045 [5840] "className": "QMinimalIntegrationPlugin",
00000035 123.47084045 [5840] "debug": false,
00000036 123.47084045 [5840] "version": 393984
00000037 123.47084045 [5840] }
00000038 123.47084045 [5840]
00000039 123.47084045 [5840]
00000040 123.47090912 [5840] qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
00000041 123.47094727 [5840] qt.core.plugin.factoryloader: looking at "C:/Qt5/Tools/QtCreator/bin/plugins/platforms/qoffscreen.dll"
00000042 123.47157288 [5840] qt.core.plugin.loader: Found metadata in lib C:/Qt5/Tools/QtCreator/bin/plugins/platforms/qoffscreen.dll, metadata=
00000043 123.47157288 [5840] {
00000044 123.47157288 [5840] "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
00000045 123.47157288 [5840] "MetaData": {
00000046 123.47157288 [5840] "Keys": [
00000047 123.47157288 [5840] "offscreen"
00000048 123.47157288 [5840] ]
00000049 123.47157288 [5840] },
00000050 123.47157288 [5840] "archlevel": 0,
00000051 123.47157288 [5840] "className": "QOffscreenIntegrationPlugin",
00000052 123.47157288 [5840] "debug": false,
00000053 123.47157288 [5840] "version": 393984
00000054 123.47157288 [5840] }
00000055 123.47157288 [5840]
00000056 123.47157288 [5840]
00000057 123.47167206 [5840] qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
00000058 123.47171783 [5840] qt.core.plugin.factoryloader: looking at "C:/Qt5/Tools/QtCreator/bin/plugins/platforms/qwindows.dll"
00000059 123.47232056 [5840] qt.core.plugin.loader: Found metadata in lib C:/Qt5/Tools/QtCreator/bin/plugins/platforms/qwindows.dll, metadata=
00000060 123.47232056 [5840] {
00000061 123.47232056 [5840] "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
00000062 123.47232056 [5840] "MetaData": {
00000063 123.47232056 [5840] "Keys": [
00000064 123.47232056 [5840] "windows"
00000065 123.47232056 [5840] ]
00000066 123.47232056 [5840] },
00000067 123.47232056 [5840] "archlevel": 0,
00000068 123.47232056 [5840] "className": "QWindowsIntegrationPlugin",
00000069 123.47232056 [5840] "debug": false,
00000070 123.47232056 [5840] "version": 393984
00000071 123.47232056 [5840] }
00000072 123.47232056 [5840]
00000073 123.47232056 [5840]
00000074 123.47239685 [5840] qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windows")
00000075 123.47244263 [5840] qt.core.plugin.factoryloader: checking directory path "C:/Qt5/Tools/QtCreator/bin/platforms" ...
00000076 123.56985474 [5840] qt.core.library: "C:/Qt5/Tools/QtCreator/bin/plugins/platforms/qwindows.dll" cannot load: Cannot load library C:\Qt5\Tools\QtCreator\bin\plugins\platforms\qwindows.dll: The specified procedure could not be found.
00000077 123.56987762 [5840] qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "C:/Qt5/Tools/QtCreator/bin/plugins/platforms/qwindows.dll" : "Cannot load library C:\Qt5\Tools\QtCreator\bin\plugins\platforms\qwindows.dll: The specified procedure could not be found."
00000078 123.56994629 [5840] qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
00000079 128.48297119 [5840] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
00000080 128.48297119 [5840]
00000081 128.48297119 [5840] Available platform plugins are: direct2d, minimal, offscreen, windows.
00000082 128.48297119 [5840]
00000083 186.36808777 [12004] 6968 0000000000000000 ENTER: DllCanUnloadNow
00000084 199.37474060 [12004] 6884 0000000000000000 ENTER: DllCanUnloadNow
00000085 287.71145630 [12004] 6884 0000000000000000 ENTER: DllCanUnloadNow
00000086 287.90173340 [12004] 3992 0000000000000000 ENTER: DllCanUnloadNow
00000087 297.08096313 [1660] ShellStreams: Attach
00000088 297.08258057 [1660] ShellStreams: Initialized
00000089 297.10009766 [1660] Trying to load localized resources for LANGID 1033 with Primary LANGID 9 code en name English (Universal)
00000090 297.11761475 [1660] Resource DLL loaded at path C:\Program Files (x86)\Common Files\Apple\Internet Services\ShellStreams.resources\en.lproj\ShellStreamsLocalized.dll
00000091 297.13519287 [1660] Not running under explorer. Will not set thread locale
00000092 297.15405273 [1660] 13276 051E95F8 ENTER: ShellStreamsFolder::ShellStreamsFolder
00000093 297.17083740 [1660] pidl = 1f50e04fd020ea3a6910a2d8802b30309d140 -> 2e80853fd6f0ec379740b3d61b4a891711800 ->
00000094 297.18710327 [1660]
00000095 297.20248413 [1660] 13276 051E95F8 ENTER: ShellStreamsFolder::ShellStreamsFolder
00000096 297.21844482 [1660] pidl = 1f50e04fd020ea3a6910a2d8802b30309d140 -> 2e80853fd6f0ec379740b3d61b4a891711800 ->
00000097 297.23428345 [1660]Hope it helps.
Thanks
-
Hi it's complaining about the C:\Qt5\Tools\QtCreator\bin\plugins\platforms\qwindows.dll file, that it's a not a valid .dll. Do you have any 3rd party antivirus program like Avast installed?
Also check the size and date of that file, mine looks like this:C:\Qt\Tools\QtCreator\bin\plugins\platforms>dir qwindows.dll Volume in drive C has no label. Volume Serial Number is 2468-E241 Directory of C:\Qt\Tools\QtCreator\bin\plugins\platforms 2022-06-02 16:18 802 704 qwindows.dll 1 File(s) 802 704 bytes 0 Dir(s) 70 671 708 160 bytes free
-
Mine reads:
06/02/2022 10:18 AM 802,704 qwindows.dll
1 File(s) 802,704 bytes
0 Dir(s) 273,429,200,896 bytes freeC:\Qt5\Tools\QtCreator\bin\plugins\platforms>
Properties:
6/2/22 - Version 6.3.1Yes I'm running Trendmicro antivirus with Windows Defender.
Thanks
-
qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "C:/Qt5/Tools/QtCreator/bin/plugins/platforms/qwindows.dll" : "Cannot load library C:\Qt5\Tools\QtCreator\bin\plugins\platforms\qwindows.dll: The specified procedure could not be found."
It's not actually complaining that it cannot load the DLL per se, it's saying that it could not find the exported procedure it was asking for/expecting to find. Unfortunately we don't know which procedure name. Not that it helps much solve why/what to do.
-
If you disable TrendMicro do you get the same error?
Edit: forgot to say, it could be you're missing some stuff from Microsoft that qwindows.dll needs to load ok, I'm thinking about the Visual C++ redistrubuable files (early versions of Windows 10 do not have them). Go here to install and choose the X64 flavor.
-
Hi, you could try launching Qt Creator without loading or requiring qwindows.dll, open a CMD window:
C:\Qt5\Tools\QtCreator\bin\qtcreator.exe -platform direct2d
If that fails: the problem could be some detritus from previous Qt versions that still remains. One way to test that is if you create a new user on your PC, log out and log in as that new user. Then try start Qt Creator on that desktop (if there's no icon to launch it you might have to navigate to the qtcreator.exe file manually).
*Edit": also a good test of Qt's health is to run qtdiag.exe from a CMD window. (There's usually 2 of them for a given Qt release, one in the mscv2019\bin subdirectory and one in Qt\Tools\QtCreator\bin so try running all 4 of them :-)