openage
openage copied to clipboard
Can't start the game after asset conversion due to missing Qt platform plugin on Windows 10
While trying to run the game on Windows 10, with this command:
python -m openage --add-dll-search-path C:\Users\Vlasnik\openage\build\libopenage\RelWithDebInfo --add-dll-search-path C:\Users\Vlasnik\nyan\build\nyan\RelWithDebInfo --add-dll-search-path C:\Users\Vlasnik\AppData\Local\Programs\Python\Python311 game --modpacks aoe2_base
It errors out with:
INFO [py] launching openage v0.5.3-187-g36e39076
INFO [py] compiled by MSVC 19.39.33523.0
INFO [py] running in DEVMODE
INFO [py] openage nyan API modpack is up to date
INFO [py] Found modpack aoe2_base
INFO [py] Found modpack engine
INFO loading configuration files...
INFO [py] loading config file [Union(Directory(C:/Users/Vlasnik/openage\cfg).root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x000002339C953C50>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO launching engine with root directoryPath(Union(Directory(C:/Users/Vlasnik/openage\cfg).root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x000002339C953C50>.root @ (b'assets',)):)
INFO loading configuration files...
INFO [py] loading config file [Union(Directory(C:/Users/Vlasnik/openage\cfg).root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x000002339C953C50>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO Found modpack: aoe2_base
INFO Found modpack: engine
INFO Created game simulation
INFO Activated modpack: engine
INFO Activated modpack: aoe2_base
INFO Using 3 threads (4 available)
INFO [T1] Time loop started
INFO [T2] Presenter: Launching subsystems...
INFO [T2] Presenter: Initializing graphics subsystems...
INFO Loading .nyan file: engine/ability/property/type.nyan
INFO Loading .nyan file: engine/util/lock.nyan
INFO Loading .nyan file: engine/ability/property.nyan
WARN [T2] Could not find the Qt platform plugin "windows" in ""
INFO Loading .nyan file: engine/util/animation_

override.nyan
CRIT [T2] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Here are some things I have stumbled upon, but still, I can't fix the issue:
- Somebody else had the same issue in a Python project using Qt: https://stackoverflow.com/questions/41994485/how-to-fix-could-not-find-or-load-the-qt-platform-plugin-windows-while-using-m. They suggest setting
QT_PLUGIN_PATHenvironment variable. - I suppose the error is about missing
qwindows.dllfile (as mentioned in one of the answers to the linked StackOverflow thread). If it helps, when installing dependencies in the way described in the docs, that file is found at:C:\vcpkg\buildtrees\qtbase\x64-windows-rel\Qt6\plugins\platforms\qwindows.dll. - Finally, it may not be required, but here I provided a gif that shows the directory structure of another program using Qt (that has
qwindows.dll):
Moved from #1644.
Can you try setting QT_QPA_PLATFORM_PLUGIN_PATH to C:\vcpkg\buildtrees\qtbase\x64-windows-rel\Qt6\plugins\platforms\?
Ok, after setting that, I don't get the error anymore. A window briefly shows up and then closes. Here is the log output:
This is how to window looks:
Ok we are slowly getting to the root of the problem :D
I think this is caused by a file load, specifically the loading of the placeholder animation for missing textures. Now I only have to find out why it fails...
Issue is still occurring.
`PS C:\Users\dmwev\Documents\GitHub\openage\build> python -m openage main INFO [py] launching openage v0.5.3-570-g4f0de632 INFO [py] compiled by MSVC 19.42.34433.0 INFO [py] running in DEVMODE INFO [py] openage nyan API modpack is up to date Do you want to convert assets? [Y/n]
n INFO [py] Found modpack de2_base v0.6.0 INFO [py] Found modpack engine v0.5.0 INFO [py] Found modpack hd_base v0.5.1 INFO [py] Modpack hd_base v0.5.1 is up-to-date INFO [py] Modpack de2_base v0.6.0 is up-to-date
Please select a modpack before starting. Enter the index of one of the proposals (Default = 0): (0) de2_base (1) hd_base
0 INFO loading configuration files... INFO [py] loading config file [Union(Directory(C:/Users/dmwev/Documents/GitHub/openage\cfg).root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x000001737771B250>.root @ (b'assets',))]:cfg/keybinds.oac... INFO launching engine with root directoryPath(Union(Directory(C:/Users/dmwev/Documents/GitHub/openage\cfg).root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x000001737771B250>.root @ (b'assets',)):) INFO loading configuration files... INFO [py] loading config file [Union(Directory(C:/Users/dmwev/Documents/GitHub/openage\cfg).root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x000001737771B250>.root @ (b'assets',))]:cfg/keybinds.oac... INFO Found modpack: de2_base INFO Found modpack: engine INFO Found modpack: hd_base INFO Created game simulation INFO Activated modpack: engine INFO Activated modpack: de2_base INFO Using 3 threads (8 available) INFO [T1] Time loop started INFO [T2] Presenter: Launching subsystems... INFO [T2] Presenter: Initializing graphics subsystems... INFO Loading .nyan file: engine/ability/property/type.nyan INFO Loading .nyan file: engine/util/lock.nyan INFO Loading .nyan file: engine/ability/property.nyan INFO Loading .nyan file: engine/util/animation_override.nyan INFO Loading .nyan file: engine/util/graphics.nyan INFO Loading .nyan file: engine/util/diplomatic_stance.nyan INFO Loading .nyan file: engine/util/sound.nyan WARN [T2] Could not find the Qt platform plugin "windows" in "" INFO Loading .nyan file: engine/root.nyan CRIT [T2] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.`
The following line worked for me:
python -m openage --add-dll-search-path C:\Users\dmwev\Documents\GitHub\openage\build\libopenage\RelWithDebInfo --add-dll-search-path C:\Users\dmwev\Documents\GitHub\nyan\build\nyan\RelWithDebInfo --add-dll-search-path C:\Users\dmwev\Documents\GitHub\vcpkg\installed\x64-windows\bin main
Adding the flag --add-dll-search-path C:\Users\dmwev\Documents\GitHub\vcpkg\installed\x64-windows\bin main resolved the issue for me.
Same issue. Solved by:
python -m openage --add-dll-search-path H:\workspaces\game\openage\build\libopenage\RelWithDebInfo --add-dll-search-path H:\workspaces\game\nyan\build\nyan\RelWithDebInfo --add-dll-search-path E:\Softwares\vcpkg\installed\x64-windows\bin main
However, meet the another issue https://github.com/SFTtech/openage/issues/1739.