-
Notifications
You must be signed in to change notification settings - Fork 167
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
USVFS Issues on Windows 11 24H2 #2174
Comments
Related issue/commits from Wrye Bash: |
This may be related to the starting issues of Python executables built with cx_Freeze or PyInstaller, that I encountered, recently:
The AV part was fixed in the meantime, but the issues with launching via MO2 persist. |
The above code works fine with 24H2 and Python 3.11. Are you sure this is related to Windows 24H2 and not Python 3.12? |
Unless someone reproduces the issue with Python 3.11 on Windows 24H2, I would say the issue comes from the use of Hooking |
Wine doesn't seem to have an implementation of |
I went down to As far as I can tell, Wine does that even deeper by hooking |
@wxMichael @Cutleast You can try this version of USVFS if you want - I am not 100% sure I did not modify the API between MO2 and USVFS, so these may not work at all but let me know if you try them. |
Can confirm that it fixes the issues with the Pyinstaller build of DIP, didn't test it with cx_Freeze, though. And since DIP makes use of |
It's possible it's also specific to Python 3.12+. |
@Holt59 That version of USVFS does work with the repro code on my PC, both when run from source and when compiled with PyInstaller. |
Can you provide a reproducible example? I tried building DIP but it fails to run even outside of MO2 so I cannot really check anything. |
Here you go, a minimal reproducable example (I just adapted OP's repro to test an import from PySide6). The command to build the executable is in the first line. # nuitka --msvc="latest" --standalone --windows-console-mode=force --enable-plugin=pyside6 --remove-output --nofollow-import-to=tkinter "usvfs_test.py"
import sys
from pathlib import Path
from PySide6.QtWidgets import QApplication
if sys.getwindowsversion().build != 26100:
print("This repro requires Windows 11 24H2")
else:
# Provide a file or folder present only in the VFS
file = Path(R".\DIP\DIP.exe")
print(f"""path: {file}
exists: {file.exists()}
is_file: {file.is_file()}
is_dir: {file.is_dir()}
iterdir: {next(f for f in file.parent.iterdir() if f.name == file.name)}""")
input() When launched via MO2, the same error and crash occur:
|
I cannot reproduce... I get
...which is 100% expected since I do not have such folder, but that also means that the Does |
Here's some more information about the environment: UVFS Log: https://gist.github.com/Cutleast/451bb5d0e9119bb621bdf0c4904d167e |
Okay I was simply launching the executable through MO2 but if I understand correctly you are actually launching a bat file that launches the executable that is in the VFS? What is the content of the bat file? |
I just created it to better capture the error message since it immediately closes: usvfs_test.exe
pause Starting the exe directly doesn't change the outcome. |
I cannot reproduce, with or without Can you try with a MO2 instance with only a mod containing the build executable (+ dependencies) and launch it once (with debug logs) to get clean USVFS logs? |
I now created a new portable instance, fresh from MO2 v2.5.2 (+ your USVFS files) and set the log level to "Debug": |
The problem:
On Windows 11 24H2, checks for files existing in Python apps launched via MO2 fail for any file that is in the VFS but not overriding a file actually present in Data/.
None of the following work:
exists()
/isfile()
/isdir()
exists()
/is_file()
/is_dir()
/glob()
e.g.
path.is_dir()
will return False whilepath.iterdir()
returns its contents.To Reproduce:
Steps to reproduce the behavior:
python repro.py
repro.py
with the below code.Environment:
Details:
Output showing the file existing but checks failing:
Link to Mod Organizer logs:
USVFS: https://gist.github.com/wxMichael/9e8b04c3865495c2108863fec2f7f6cd
MO Interface: https://gist.github.com/wxMichael/8a40ac3e0b788515c86ee744644c4416
The text was updated successfully, but these errors were encountered: