[Bug 40476] New: ITH(-VNR) does not work in wine
https://bugs.winehq.org/show_bug.cgi?id=40476 Bug ID: 40476 Summary: ITH(-VNR) does not work in wine Product: Wine Version: 1.9.7 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: compulsorylocales(a)gmail.com Distribution: --- Created attachment 54236 --> https://bugs.winehq.org/attachment.cgi?id=54236 Warn log output when trying to execute with 32-bit WINEPREFIX So um, this particular program has never worked in wine if I'm not wrong. I'm using wine-staging but this should be the same for any version of wine. Program name: ITH-VNR Details: It's a hooking program that attaches itself to a running process. Used mainly to extract text at runtime from Japanese games (Visual Novels). Download + Source code link: http://www.hongfire.com/forum/showthread.php/438331-ITHVNR-ITH-with-the-VNR-... (There is an older version, but since this is the latest maintained one, posting this.) It seems that Visual C++ Runtime 2013 is required. Steps: 1. Create a clean 32-bit WINEPREFIX in, let's say ~/wine32. 2. Run winetricks vsrun2013 (to install the 2013 runtime x86 version). 3. Do env LANG=WINEDEBUG=warn+all WINEPREFIX=/home/user1/wine32 WINEARCH=win32 wine ITHVNR.exe Result: It does not start at all. Same for the default 64-bit wine. Possible culprit might be this line: warn:module:load_builtin_dll failed to load .so lib for builtin L"Z:\\run\\media\\user1\\blahblah\\ITHVNR-3.5640.1-win32\\vnrhost.dll": /home/user1/wine32/dosdevices/z:/run/media/user1/32F84632F845F51F/VN Support/ITHVNR-3.5640.1-win32/vnrhost.dll: invalid ELF header Attaching the full output of the command in step 3. Please take a look... Thanks a lot! -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40476 Mokou <mokouthrowaway(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mokouthrowaway(a)gmail.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40476 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Ever confirmed|0 |1 URL| |http://www.mediafire.com/do | |wnload/fnrgrlp6l0v6v71/ITHV | |NR-3.4152.0-win32.zip Status|UNCONFIRMED |NEW --- Comment #1 from Bruno Jesus <00cpxxx(a)gmail.com> --- I can confirm the program does not start, no standard output for me. It was compiled with Visual Studio 2013. Setting to Windows 7 does not change anything. tested in 1.9.11. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40476 Dmitry Timoshkov <dmitry(a)baikal.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #2 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- The application ships the vnrhost.dll which intentionally prevents running under Wine using various tricks like GetFileAttributes("winecfg.exe") and NtQueryVirtualMemory(0xffffffff,...). There is the source of the project at https://code.google.com/archive/p/interactive-text-hooker/source/default/sou... but it seems that it doesn't include the vnrhost.dll sources. Anyway, I'd say invalid or not our bug. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40476 --- Comment #3 from Mokou <mokouthrowaway(a)gmail.com> --- (In reply to Dmitry Timoshkov from comment #2)
There is the source of the project at https://code.google.com/archive/p/interactive-text-hooker/source/default/ source but it seems that it doesn't include the vnrhost.dll sources.
That's the source for ITH. ITHVNR is a different application (but contains some code from ITH). The latest source code for ITHVNR (as of 2016-06-18) can be downloaded here: http://www.mediafire.com/download/o1jvv62hodbl291/ITHVNR-3.5640.1-Source.zip Sources for vnrhost.dll seem to be located in vnr/texthook/host. After a quick look it seems like it actually tries to work around some Wine issues, perhaps no one has tested it in Wine recently. Changing the IthIsWine() function to always return FALSE doesn't make it run, so I think it is a Wine issue. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40476 --- Comment #4 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Mokou from comment #3)
There is the source of the project at https://code.google.com/archive/p/interactive-text-hooker/source/default/ source but it seems that it doesn't include the vnrhost.dll sources.
That's the source for ITH. ITHVNR is a different application (but contains some code from ITH). The latest source code for ITHVNR (as of 2016-06-18) can be downloaded here: http://www.mediafire.com/download/o1jvv62hodbl291/ITHVNR-3.5640.1-Source.zip Sources for vnrhost.dll seem to be located in vnr/texthook/host.
After a quick look it seems like it actually tries to work around some Wine issues, perhaps no one has tested it in Wine recently. Changing the IthIsWine() function to always return FALSE doesn't make it run, so I think it is a Wine issue.
The source above seems to be for a different (or older) version than what is actually used since in the sources I don't see the checks for winecfg.exe, and it doesn't forcibly quit with TerminateProcess() once it detects Wine. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40476 --- Comment #5 from Mokou <mokouthrowaway(a)gmail.com> --- After some more poking around and MessageBox-driven debugging I've managed to find the issue. The IthInitSystemService() function fails when it tries to open the NT directory object \Sessions\$session_id\BaseNamedObjects. On Wine \Sessions\$session_id seems to be a symlink to \BaseNamedObjects, but on Windows the BaseNamedObjects directory obj is not linked to \Sessions\$session_id, it's inside of it. Here's a link to the ITHVNR build with a workaround and the modified source: https://a.pomf.cat/zbiwsf.zip (sha1 208bdb83126365ce53a5c70a8b3f221b22995e04, md5 835f91a38a4c63b6fbdc50a8f2ce2654) -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40476 --- Comment #6 from Mokou <mokouthrowaway(a)gmail.com> --- Is it possible to reopen the issue? The cause seems to be a Wine defect, namely the NT obj directory structure being different than on Windows. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40476 --- Comment #7 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Mokou from comment #6)
Is it possible to reopen the issue? The cause seems to be a Wine defect, namely the NT obj directory structure being different than on Windows.
Please open a separate bug for it, this one is definitely invalid (caused by an explicit Wine check and process termination by vnrhost.dll). Specify an exact version you are testing with the source (if available). -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40476 --- Comment #8 from Mokou <mokouthrowaway(a)gmail.com> --- Created attachment 54783 --> https://bugs.winehq.org/attachment.cgi?id=54783 Adds \Sessions\1\BaseNamedObjects NT dir object (In reply to Dmitry Timoshkov from comment #7)
(In reply to Mokou from comment #6)
Is it possible to reopen the issue? The cause seems to be a Wine defect, namely the NT obj directory structure being different than on Windows.
Please open a separate bug for it, this one is definitely invalid (caused by an explicit Wine check and process termination by vnrhost.dll).
Specify an exact version you are testing with the source (if available).
The process gets terminated because IthInitSystemService() returns FALSE (gui/main.cpp:246). IthInitSystemService() returns FALSE because it can't open the \Sessions\$id\BaseNamedObjects NT dir obj (vnr/ithsys/ithsys.cc:828). Tested both 3.4152.0 (the one in the URL field of this bug report) and 3.5640.1. The issue seems to be the same on both. Could you test 3.4152.0 on Wine with the attached patch applied? It works here. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40476 --- Comment #9 from S M <compulsorylocales(a)gmail.com> --- (In reply to Mokou from comment #5)
After some more poking around and MessageBox-driven debugging I've managed to find the issue. The IthInitSystemService() function fails when it tries to open the NT directory object \Sessions\$session_id\BaseNamedObjects. On Wine \Sessions\$session_id seems to be a symlink to \BaseNamedObjects, but on Windows the BaseNamedObjects directory obj is not linked to \Sessions\$session_id, it's inside of it.
Here's a link to the ITHVNR build with a workaround and the modified source: https://a.pomf.cat/zbiwsf.zip (sha1 208bdb83126365ce53a5c70a8b3f221b22995e04, md5 835f91a38a4c63b6fbdc50a8f2ce2654)
I just tested your build of ITH, and well, it works just as it should. Or well, works wonderfully, haha. Thank you so much for taking the time to go through this! -- 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.
https://bugs.winehq.org/show_bug.cgi?id=40476 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from Bruno Jesus <00cpxxx(a)gmail.com> --- Closing invalid bugs. -- 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)
-
wine-bugs@winehq.org