Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOOT v0.20.0 crashes on startup when run under Wine #1886

Closed
Ortham opened this issue Jul 20, 2023 · 22 comments
Closed

LOOT v0.20.0 crashes on startup when run under Wine #1886

Ortham opened this issue Jul 20, 2023 · 22 comments

Comments

@Ortham
Copy link
Member

Ortham commented Jul 20, 2023

First reported on Discord here. LOOT v0.19.1 works. This was confirmed here to be due to the update to Qt 6.5.1 in 638c8a2. Here's an excerpt from the Wine trace that was shared:

crash.txt

This looks like something that Wine will need to fix, or maybe a future Qt release will change the implementation in a way that doesn't trigger this bug. 6.5.2 is available so it would be good to retry this once LOOT has been updated to that.

@Ortham
Copy link
Member Author

Ortham commented Jul 29, 2023

Updating to Qt 6.5.2 does not fix the issue. I can't copy the console output from my VM, so here's a screenshot instead:

image

That's with Wine 8.13 (on the development branch).

@Ortham
Copy link
Member Author

Ortham commented Jul 29, 2023

A LOOT build cross-compiled from Linux to Windows (based on 368e07b so also using Qt 6.5.2) and then run using Wine 8.13 is able to start up:

image

@kleshas
Copy link

kleshas commented Aug 15, 2023

Same error here. Arch, sway, fully updated. qt6-base and -wayland installed.
no difference running under i3

@mz1193
Copy link

mz1193 commented Aug 17, 2023

Same experience here. Version 0.19.1 continues to work fine, though, as you said.

@RacerBG
Copy link
Contributor

RacerBG commented Aug 23, 2023

LOOT 0.20.0 works with Wine in my case but I'm using the flatpak version of Wine 8.0.2 and my distribution is Debian 12 Bookworm.

Either Wine 8.0.2 fixed the issue or the flatpak packaging but in any case I can't reproduce this issue.

@monyarm
Copy link

monyarm commented Aug 28, 2023

Wine 8.13, 0.20.0, the latest artifact, and surprisingly 0.19.1 all fail to start due to:

qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the appl
ication may fix this problem.

Available platform plugins are: windows.

@Ortham
Copy link
Member Author

Ortham commented Aug 28, 2023

@RacerBG @monyarm I'd appreciate it if you could try the native Linux Flatpak package here and give me feedback on how you find it, hopefully it works well enough that you won't need to run LOOT in Wine.

@monyarm
Copy link

monyarm commented Aug 28, 2023

@RacerBG @monyarm I'd appreciate it if you could try the native Linux Flatpak package here and give me feedback on how you find it, hopefully it works well enough that you won't need to run LOOT in Wine.

I use MO2, so the flatpak won't do me any good. I've known of the native version for a while, but until we have a high quality native mod manager, I feel like its kind of pointless.

@monyarm
Copy link

monyarm commented Aug 28, 2023

It's interesting to note however, that 0.19.1 doesn't give me the error when launched through MO2, but it did when launched through the console.
I'm thinking that at least part of the issue is that when it isn't supplied a start in directory, it looks for the platform dll in the wrong place, and can't find it.

@LinAGKar
Copy link

I can't get either 0.20.0 or 0.19.1 to run, with wine-8.15 on OpenSUSE Tumbleweed, but I get a different error:

002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (126).
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0024:err:seh:NtRaiseException Unhandled exception code c0000005 flags 0 addr 0x170034546

Output with full WINE_DEBUG=+all: output.txt.gz

And another error for 0.18.6:

002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (126).
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
wine: failed to start L"Z:\\home\\linus\\.local\\share\\Steam\\steamapps\\compatdata\\489830\\pfx\\drive_c\\Modding\\Tools\\loot_0.18.6-0-g3aab033_0.18.6\\LOOT.exe"
Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: Bad EXE format for Z:\home\linus\.local\share\Steam\steamapps\compatdata\489830\pfx\drive_c\Modding\Tools\loot_0.18.6-0-g3aab033_0.18.6\LOOT.exe.

0.18.5 starts properly however

@Ortham
Copy link
Member Author

Ortham commented Oct 1, 2023

Closing this as wontfix as there's now a native Linux release available on Flathub, and there's not really anything LOOT can do about Qt using Windows APIs that Wine doesn't implement (aside from downgrade to an older version of Qt, but that's not desirable as it means missing out on bug fixes and new features).

@Ortham Ortham closed this as completed Oct 1, 2023
@Ortham Ortham added the wontfix label Oct 1, 2023
@sibir-ine sibir-ine closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2023
@Ortham
Copy link
Member Author

Ortham commented Nov 1, 2023

Reopening this as it's still relevant to MO2 users on Linux, as MO2 runs under Wine and so running LOOT through it needs a Windows LOOT build.

@suamor
Copy link

suamor commented Nov 1, 2023

I have tried out the latest available stable version of proton and a later (staged) version but everytime loot is crashing.
I needed to research because I wanted to exclude issues in my setup.

This proton prefix works with mo2 and other programs. All the messages shown during start have nothing to do with the crash.
There were several changes in Qt6.5 that causes now issues with proton (and maybe older Windows 10 releases).

Here are the collected issue report and merge request (for wine) that could solve the issue (I do not build wine myself):
ModOrganizer2/modorganizer#372
https://gitlab.winehq.org/wine/wine/-/merge_requests/3931 (is on hold because tests are missing).

Summary: I need to downgrade loot to a version that does not use Qt 6.5 (and can't build later version with QT 6.4 myself since I don't have windows). (Linux version can't obviously not be used from mo2).

Workaround: Use Loot 0.19.1 or find a build service (by forking loot) that builds 0.22.0 with Qt6.4.

Host system: Ubuntu 22.04. Started from within MO2 as well as alone from command line (same behaviour).
Version tested: Loot 0.22.0 (uses Qt 6.5.3.0)
Also not working: Loot 0.21 (Qt 6.5.2), 0.20 (Qt 6.5.1).

Update: A local setup with crosscompiler might be possible to get Loot to build (with windows qt6.4 and all it's build dependencies as windows binaries).

@qsniyg
Copy link

qsniyg commented Nov 16, 2023

The patch has been merged and should be included in next week's wine release.

@Ortham
Copy link
Member Author

Ortham commented Dec 1, 2023

Looks like this is fixed as of Wine 8.21, so closing this.

@Ortham Ortham closed this as completed Dec 1, 2023
@kleshas
Copy link

kleshas commented Dec 1, 2023

doesn't work for me still. loot 0.20 - 0.22, wine-staging 8.21-1.

ah, noticed you need the flatpak version now. How do you run that from within MO2? never used flatpak, and the instructions on the LOOT page say you run it from command line rather than from within MO2.

@qsniyg
Copy link

qsniyg commented Dec 1, 2023

doesn't work for me still. loot 0.20 - 0.22, wine-staging 8.21-1.

Can you share your logs?

@kleshas
Copy link

kleshas commented Dec 1, 2023

[2023-12-01 23:38:19.275 D] spawning binary:
[2023-12-01 23:38:19.275 D] . exe: 'Z:/mnt/nvme0n1p3/skyrimmodlists/sme2.6.1/Tools/loot_0.20.0-0-gc2c552a_0.20.0/LOOT.exe'
[2023-12-01 23:38:19.275 D] . args: '--game="Skyrim Special Edition"'
[2023-12-01 23:38:19.275 D] . cwd: 'Z:/mnt/nvme0n1p3/skyrimmodlists/sme2.6.1/Game Root'
[2023-12-01 23:38:19.276 D] . steam id: ''
[2023-12-01 23:38:19.276 D] . hooked: true
[2023-12-01 23:38:19.276 D] . stdout: no
[2023-12-01 23:38:19.276 D] . stderr: no
[2023-12-01 23:38:19.276 D] . real cmd: '"Z:\mnt\nvme0n1p3\skyrimmodlists\sme2.6.1\Tools\loot_0.20.0-0-gc2c552a_0.20.0\LOOT.exe" --game="Skyrim Special Edition"'
[2023-12-01 23:38:19.401 D] process tree:
[2023-12-01 23:38:19.402 D] LOOT.exe, pid=1144, ppid=344
[2023-12-01 23:38:19.402 D] waiting for completion on LOOT.exe (1144), strong interest
qt.qpa.window: SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) failed: COM error 0x57: Invalid parameter.
Qt's default DPI awareness context is DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2. If you know what you are doing you can overwrite this default using qt.conf (https://doc.qt.io/qt-6/highdpi.html#configuring-windows)
[2023-12-01 23:38:19.515 D] process 1144 completed
[2023-12-01 23:38:19.515 D] nothing to wait for
[2023-12-01 23:38:19.516 D] process runner: refreshing because the process completed

I have a qt.conf in the same folder as loot with
[Platforms]
WindowsArguments = dpiawareness = 2

@Ortham
Copy link
Member Author

Ortham commented Dec 2, 2023

ah, noticed you need the flatpak version now. How do you run that from within MO2? never used flatpak, and the instructions on the LOOT page say you run it from command line rather than from within MO2.

No, the Flatpak version is a Linux build, if you're trying to run LOOT through Wine then you still need the Windows build.

[Platforms]
WindowsArguments = dpiawareness = 2

@kleshas have you tried without this qt.conf? I'm able to run the v0.22.1 release and the Qt 6.6 update branch with Wine 8.21 on Manjaro.

@kleshas
Copy link

kleshas commented Dec 2, 2023

Same error as above, with the extra lines:
qt.qpa.screen: "Unable to open monitor interface to \\.\DISPLAY1:" "Success."
qt.qpa.screen: "Unable to open monitor interface to \\.\DISPLAY2:" "Success."

@cprin21
Copy link

cprin21 commented Dec 16, 2023

Just adding to this thread - so, the windows version runs on Linux, by running it through the system's WINE however trying to run it through MO2 on Proton (see: https://github.com/rockerbacon/modorganizer2-linux-installer ), it just does not run. Click run in MO2 and nothing.

@suamor
Copy link

suamor commented Jan 24, 2024

@cprin21 It does not run on proton since Valve has not integrated any wine patches after january 23. You will either need to wait or build proton yourself (proton tkg). If you're lucky you can use one of the nightly builds with MO2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

10 participants