[Bug 59766] New: NtSetInformationFile FileRenameInformation in place move does not work correctly (PaintTool SAI 2)
http://bugs.winehq.org/show_bug.cgi?id=59766 Bug ID: 59766 Summary: NtSetInformationFile FileRenameInformation in place move does not work correctly (PaintTool SAI 2) Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@list.winehq.org Reporter: katharine.chui@gmail.com Distribution: --- Created attachment 80970 --> http://bugs.winehq.org/attachment.cgi?id=80970 small program for reproducting the error Under WINE, PaintTool SAI 2 (https://www.systemax.jp/bin/sai2-20241123-32bit-en.zip ) currently pops an error while user draws to a canvas, as it creates an on-disk undo/redo cache file, performs a few read/write, then uses `NtSetInformationFile FileRenameInformation` to in-place move the opened file. This does not currently work as WINE is not handling `FILE_RENAME_INFORMATION.RootDirectory == NULL` along with a simple path in `FILE_RENAME_INFORMATION.FileName` for in-place rename. The current code assumes `RootDirectory == NULL` means full path in `FileName`. The `NtSetInformationFile` call works under Windows 10. It is also noted here https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntif... , to perform in-place rename, it is okay for RootDirectory to be NULL, while FileName only needs to be a simple file name. Below attaches a small program for reproducing the error. The program can be built with mingw-w64 toolchain by running `i686-w64-mingw32-gcc -static file_rename.c -lntdll -o out.exe`. The program was tested working under Windows 10. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59766 --- Comment #1 from Katharine <katharine.chui@gmail.com> --- Created attachment 80971 --> http://bugs.winehq.org/attachment.cgi?id=80971 log snippet -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59766 Katharine <katharine.chui@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|NtSetInformationFile |PaintTool SAI 2: |FileRenameInformation in |NtSetInformationFile |place move does not work |FileRenameInformation in |correctly (PaintTool SAI 2) |place move does not work | |correctly -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59766 Katharine <katharine.chui@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59766 Katharine <katharine.chui@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80970|small program for |small program for description|reproducting the error |reproducing the error -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59766 Katharine <katharine.chui@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |11.9 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59766 Bernhard Übelacker <bernhardu@mailbox.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org --- Comment #2 from Bernhard Übelacker <bernhardu@mailbox.org> --- Currently we receive the error because FileName is not starting with a backslash. (rr) stepi 3742 if (!name_len || name[0] != '\\') return STATUS_OBJECT_PATH_SYNTAX_BAD; 4: x/i $pc => 0xf7bc596a <nt_to_unix_file_name_no_root+1740>: mov $0xc000003b,%esi (rr) bt #0 nt_to_unix_file_name_no_root at dlls/ntdll/unix/file.c:3742 #1 nt_to_unix_file_name dlls/ntdll/unix/file.c:3853 #2 get_nt_and_unix_names dlls/ntdll/unix/file.c:4412 #3 NtSetInformationFile dlls/ntdll/unix/file.c:5443 #4 __wine_syscall_dispatcher from dlls/ntdll/ntdll.so ... (rr) x/hs name 0x63f6c0: u"2.0.0.h.dat" -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59766 --- Comment #3 from Katharine <katharine.chui@gmail.com> --- Here is an inelegant shim for until it is fixed in WINE https://github.com/Kethen/sai2_wine_shim -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla