https://bugs.winehq.org/show_bug.cgi?id=47940
Bug ID: 47940 Summary: Morrowind + MGE XE: MGE XE Doe not inject itself into Morrowind Product: Wine Version: 4.10 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: trymeout@tutanota.com Distribution: ---
Created attachment 65442 --> https://bugs.winehq.org/attachment.cgi?id=65442 log
https://www.nexusmods.com/morrowind/mods/41102
the MGE XE mod is a mod that enhances Morrowind in several ways, it adds distant land, adds MWSE which is a script extender and other minor tweaks to the game.
It will seem that the only thing that works is the Resolution change, I am able to set the resolution to 1600x900 in MGE XE and the main game supports 1024x768 at max.
MGE XE should add the MWSE into Morrowind to allow mods that use MWSE to work, but it does not seem to do so in Wine, same with the third person camera adjustment.
I did try this out in 4.10 since I was unable to get passed the main menu in 4.17 which I have opened another bug report on.
For whatever reason MGE XE is not integrating into Morrowind as it would on Windows.
https://bugs.winehq.org/show_bug.cgi?id=47940
Lorenzo Ferrillo lorenzofer@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lorenzofer@live.it
--- Comment #1 from Lorenzo Ferrillo lorenzofer@live.it --- Did you tryed to set d3d8.dll and dinput.dll in winecfg as "native,builtin" overrides?
https://bugs.winehq.org/show_bug.cgi?id=47940
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEEDINFO Ever confirmed|0 |1
--- Comment #2 from Ken Sharp imwellcushtymelike@gmail.com --- 003a:err:quartz:ACMWrapper_Receive Error sending sample (80040227)
As above: what workarounds are you using?
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #3 from trymeout@tutanota.com --- Created attachment 65732 --> https://bugs.winehq.org/attachment.cgi?id=65732 log
I added the dinput.dll and the d3d8.dll into winecfg but now when the game boots up I get an wine error message which crashes the game.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #4 from Lorenzo Ferrillo lorenzofer@live.it --- You also need d3dcompiler_47.dll (or _43 sometimes, you can check with WINEDEBUG=+loaddll) native. You can install it with winetricks
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #5 from trymeout@tutanota.com --- That seems to do the trick!
1. (Optional) Create a new wine prefix 2. Install Morrowind and MGE XE 3. Launch the terminal and enter the following command
WINEPREFIX="/path/to/wine/prefix" winecfg
4. Go to the Libraries tab 5. Add the dinput.dll and d3d8.dll and set the added DLLs to "native, builtin" 6. Close Wine Configuration 7. Install Winetricks 8. Launch the terminal and enter the following commands...
WINEPREFIX="/path/to/wine/prefix" sh winetricks d3dcompiler_43
WINEPREFIX="/path/to/wine/prefix" sh winetricks d3dcompiler_47
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #6 from trymeout@tutanota.com --- I still have not fully tested all of the MGE XE mod in Wine since there is an issue with setting up the Distant Land. Besides Distant land it will seem that the water works, MWSE, 3rd person camera angles works.
https://bugs.winehq.org/show_bug.cgi?id=39199
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #7 from trymeout@tutanota.com --- Created attachment 65746 --> https://bugs.winehq.org/attachment.cgi?id=65746 mwse log
I did some further testing and it seems some MWSE mods do not work. Here is a log. I do not think MWSE is fully injected into Morrowind or is not working in Wine.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #8 from Lorenzo Ferrillo lorenzofer@live.it --- MGE XE is loaded, but maybe MWSE is failing to load for some reason.
Can you post a MGE XE or a MWSE log if they generate one? (This time I mean proper mod generated logs not captured wine logs)
Also it seems that MGE XE is using a DrawFont call that is implemented only on wine-staging.
https://bugs.winehq.org/show_bug.cgi?id=47940
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|1 |0 Status|NEEDINFO |UNCONFIRMED CC| |z.figura12@gmail.com
--- Comment #9 from Zebediah Figura z.figura12@gmail.com --- There's an awful lot of quartz output in that log, followed by a crash in what looks like ntdll. I don't suppose there's a winedbg crash window that appears at any point? It'd be nice to get a backtrace, if possible.
Regarding the quartz output, it would be interesting to try with a more recent Wine, and also maybe to see if native quartz improves anything.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #10 from trymeout@tutanota.com --- Created attachment 65757 --> https://bugs.winehq.org/attachment.cgi?id=65757 MGE XE log
Here is a log file that was generated by MGE XE and MWSE. I cannot get Morrowind to work on newer version of wine due to this bug. Once I figure out the missing dependcy package name for my distro I will do more testing on the latest version of Wine.
https://bugs.winehq.org/show_bug.cgi?id=47939
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #11 from trymeout@tutanota.com --- (In reply to Zebediah Figura from comment #9)
I don't suppose there's a winedbg crash window that
Yes, once I quit Morrowind a Wine error message does appear sometimes.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #12 from trymeout@tutanota.com --- Created attachment 65758 --> https://bugs.winehq.org/attachment.cgi?id=65758 logs
Here is a test done in Wine 4.18. I have a wine log, mge xe log and a mwse log.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #13 from Lorenzo Ferrillo lorenzofer@live.it --- Morrowind Script Extender v2.0.0 (built Feb 5 2018) initialized. Error: unable to find malloc() Error: unable to find free() Error: unable to find realloc()
It seems that these errors are causing MWSE to not function.
Post a wine log obtained with WINEDEBUG=+loaddll
I want to know what MSVC version is using
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #14 from trymeout@tutanota.com --- Created attachment 65759 --> https://bugs.winehq.org/attachment.cgi?id=65759 wine log
env WINEPREFIX="/home/cameron/PlayOnLinux's virtual drives/Morrowind" wine "C:\windows\command\start.exe" /Unix "/home/cameron/PlayOnLinux's virtual drives/Morrowind/drive_c/Program Files/Bethesda Softworks/Morrowind/Morrowind Launcher.exe" &> mwse.txt WINEDEBUG=+loaddll
Here is the log for this test.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #15 from Lorenzo Ferrillo lorenzofer@live.it --- Also a WINEDEBUG=+dbghelp,+dbghelp_symt
MWSE use this code:
SymInitialize(process, NULL, TRUE); SymEnumSymbols(process, 0, "msvcrt!*", EnumSymbolsCallback, NULL); SymCleanup(process);
to store the symbol of malloc, realloc and free in one of the MSVCRT dlls.
Now or dbghelp is failing somewhat to detect the symbol in MSVCRT or the corrispondent wine msvcrt doesn't have the correct symbols.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #16 from Lorenzo Ferrillo lorenzofer@live.it --- WINEDEBUG must be putted before wine command.
Also don't use Play on Linux, at all.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #17 from trymeout@tutanota.com --- Created attachment 65760 --> https://bugs.winehq.org/attachment.cgi?id=65760 log
I put the WINEDEBUG=+loaddll after the WINEPREFIX and before the wine command.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #18 from Lorenzo Ferrillo lorenzofer@live.it --- Regarding Distand Land generation it require save dds to handle mipmaps, so require native d3dx9_43.dll installable with winetricks d3dx9_43
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #19 from trymeout@tutanota.com --- Installing d3dx9_43 in winetricks allowed me to generate distant land and it does load in the game. I will do further testing on this to ensure it fully works.
Is there any reason why MWSE is not fully working through?
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #20 from Lorenzo Ferrillo lorenzofer@live.it --- Yes actually, I was debugging it just now.
in the heap.c in the wine MSVCRT folder, the needed function have a signature in the MSVCRT_func style. So malloc is actually MSVCRT_malloc in the code.
Then in the msvcrt.spec it is defined as @cdecl malloc(long) MSVCRT_malloc
and so on.
the issue is that dbghelp doesn't expect this and instead expect the normal non prefixed name.
This is not a problem with wine dbghelp as native windows dbghelp as the same behaviour.
In fact if I add aq void* CDECL malloc(MSVCRT_size_t size) in heap.c with the same body of MSVCRT_malloc function MWSE detect it and store it's pointer.
However this is clearly not the right way as we got unneccessary duplicated code, and if MWSE use this function to do some internal hooking (and not just using it to allocate memory as it would be better to just directly link to the function without using dbghelp), it will silently fail to hook into the game.
Installing the native CRT may be a workaround, but I still need to check it.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #21 from trymeout@tutanota.com --- Thank you for looking into it. I cannot believe I got MGE XE and MWSE working this far which is amazing! let me know what you find out and I will happily test things out on my end.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #22 from trymeout@tutanota.com --- Created attachment 65773 --> https://bugs.winehq.org/attachment.cgi?id=65773 backtrace
I did some more tests with the distant land and all seems to be good, however when I exit the game I got a wine backtrace error which I was able to save.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #23 from Lorenzo Ferrillo lorenzofer@live.it --- I have a small but very bad hack that allow MWSE to hook, however Morrowind is crashing when clicking the Video tab in Settings. However this is no fault of MWSE or the hack, but seems an issue between an interaction with WINE and Morrowind Code PAtch
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #24 from Lorenzo Ferrillo lorenzofer@live.it --- Created attachment 65780 --> https://bugs.winehq.org/attachment.cgi?id=65780 HACK to allow MWSE to start.
Note it's untested where actual mods that use MWSE actually works
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #25 from trymeout@tutanota.com --- How do I test this hack? Do I need to wait for wine 4.20 to be released?
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #26 from Lorenzo Ferrillo lorenzofer@live.it --- You have to recompile wine on the current git after applying the patch.
This will never go into mainline wine becouse is clearly not the right solution.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #27 from trymeout@tutanota.com --- Will this go into a single staging version? I am not skilled at compiling wine versions and I do not understand how to add a patch to wine. Would it be possible to put this special wine version with the patch included on github in a zipped file? This will make it easy for me and anyone who wants MWSE to work on Linux.
https://bugs.winehq.org/show_bug.cgi?id=47940
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #28 from Lorenzo Ferrillo lorenzofer@live.it --- Again it's improbable that this will be included to staging.
However to simplify, you may try wine-tkg from Tk-Glitch CLone the Tk-Glitch/PKGBUILDS enter in the wine-tkg-git folder Download the patch, renomonate the extension from .patch to .mypatch, put it inside wine-tkg-userpatches folder.
set the configuration.cfg to your like (setting staging,fsync), and at the bottom of the file set _user_patches="true" if is "false".
from terminal execute makepkg from wine-tkg-git folder. Satisfy the missing dependancies if any.
install the reuslting package with pacman.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #29 from trymeout@tutanota.com --- I was about to compile wine 4.20 32 bit from source but I do not want to overwrite my system wine version. How do you compile wine as a portable application such as ~/Downloads/Wine4.20/ I was able to apply the patch to the wine 4.20 source code.
With PlayOnLinux I am able to download Wine versions which can be executed by /path/to/wine/version/bin/wine in the terminal
https://github.com/wine-mirror/wine/releases/tag/wine-4.20
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #30 from trymeout@tutanota.com --- Created attachment 65829 --> https://bugs.winehq.org/attachment.cgi?id=65829 log and symbol.c file
I got Wine built. What I did was the following...
I downloaded Wine 4.20 source code https://github.com/wine-mirror/wine/releases/tag/wine-4.20
I extracted the source code
I added the two patches to the ~/Downloads/wine-wine-4.20/wine-wine-4.20/dlls/dbghelp/symbol.c file
I open the terminal and entered the following commands
cd /home/cameron/Downloads/wine-wine-4.20/ ./configure prefix=/home/cameron/Downloads/wine4.20 && make make install
Then I ran Morrowind with this command
env WINEPREFIX="/home/cameron/PlayOnLinux's virtual drives/Morrowind" /home/cameron/Downloads/wine4.20/bin/wine "C:\windows\command\start.exe" /Unix "/home/cameron/PlayOnLinux's virtual drives/Morrowind/drive_c/Program Files/Bethesda Softworks/Morrowind/Morrowind Launcher.exe" &> mge.txt
But it did not seem to initialise MWSE into Morrowind. I have the wine log and I also included my symbol.c file so you can make sure I applied the patch correctly.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #31 from Zebediah Figura z.figura12@gmail.com --- I've only really skimmed this report, but does stripping msvcrt.dll help? I think in that case dbghelp should fall back to enumerating exports by their export name.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #32 from trymeout@tutanota.com --- (In reply to Zebediah Figura from comment #31)
I've only really skimmed this report, but does stripping msvcrt.dll help? I think in that case dbghelp should fall back to enumerating exports by their export name.
By stripping, should I delete the msvcrt.dll before building wine and not do the symbol.c patch?
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #33 from Lorenzo Ferrillo lorenzofer@live.it --- @zebedia
IIRC wine make install strip call strip on dlls and so files, and arch makepkg does another stripping passage, but it doesn't seem to do any differnece if I let it be called or stubbing it.
@trymeout WIne log is unhelpful in this situation, maybe a WINEDEBUG=+dbghelp,+dbghelp_symt would be more helping
HOwever MWSE log is needed to check where it failed.
Also try to start Morrowind.exe directly bypassing the launcher.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #34 from trymeout@tutanota.com --- Created attachment 65869 --> https://bugs.winehq.org/attachment.cgi?id=65869 logs
Here are some logs launching Morrowind with the Morrowind Launcher.exe using Wine 4.20 with the symbol.c patch.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #35 from trymeout@tutanota.com --- Created attachment 65870 --> https://bugs.winehq.org/attachment.cgi?id=65870 logs
Here are some logs launching Morrowind with the Morrowind.exe using Wine 4.20 with the symbol.c patch.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #36 from Lorenzo Ferrillo lorenzofer@live.it --- Look, MWSE should be loaded at this point, as there are no more errors in the logs. Do you have specific mods that doesn't work?
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #37 from trymeout@tutanota.com --- The only MWSE mod that is not working is this better blocking mod
https://www.nexusmods.com/morrowind/mods/43798
It was not working before the symbol.c patch. When you press the C key it should increase your block skill by 100 points and when you are not pressing C it should have it set to 0. It does make the blocking set to 0 but when I press C it does not increase the blocking skill.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #38 from Lorenzo Ferrillo lorenzofer@live.it --- to check if MWSE is working you may try to use xLogMessage "MWSE try" command from Morrowind console. If then the log file has the strin in it, then it is working, and there may be another issue somewhere else for specific functions (maybe keypress functions with GetAsyncKeyState)
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #39 from Lorenzo Ferrillo lorenzofer@live.it --- Also may check if Morrowind ini has a setting similar to Oblivion bBackground Keyboard. Oblivion OBSE mods that use keyboard keypresses don't work in wine without bBackground Keyboard = 1.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #40 from trymeout@tutanota.com --- Created attachment 65880 --> https://bugs.winehq.org/attachment.cgi?id=65880 wine 4.18 -- Background Keyboard=1
In the Morrowind.ini I did change Background Keyboard=0 to Background Keyboard=1 and now the better blocking mod works. I even tested it with wine 4.18 without the symbol.c patch, just the normal wine 4.18 and the mod works.
Does this mean I do not need symbol.c patch to make MWSE fully work? In my case with the MWSE mods I use right now I do not need the symbol.c patch but for others who will use other MWSE mods is this patch necessary?
Because I wonder if by simply setting Background Keyboard=1 will essentially do what symbol.c was trying to achieve. I hope symbol.c patch is not nessisary which will make getting Wine to work for Morrowind MWSE and MGE XE easy for people.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #41 from Lorenzo Ferrillo lorenzofer@live.it --- IT may be that old versions of MWSE will still initialize if the 3 functions are not found.
However MWSE wil fail badly when trying to use mods that use functions that manipulate Morrowind's heap. (so the symbol.c hack would be still needed)
The version I tried would actually bail out at the first not found function, preventing Morrowind to start at all.
Also newest nightly build actually hardcode the function address, after a report about this issue on MWSE side.
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #42 from trymeout@tutanota.com --- Since the symbol.c patch is in the nightly build, it possible it will be released in wine 4.22 or 4.22-staging?
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #43 from Lorenzo Ferrillo lorenzofer@live.it --- I was talking ABOUT mwse nightly, downlaodable by the MWSE updater executable
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #44 from trymeout@tutanota.com --- If I update to the new nightly build of MWSE, I will not need the symbol.c patch and I can get a fully working MWSE within the MGE XE mod?
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #45 from Lorenzo Ferrillo lorenzofer@live.it --- yeah, it should (you may expect bugs be a nightly however last versions have Lua scripting support)
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #46 from trymeout@tutanota.com --- I did install the nightly build of MWSE after installing MGE XE easily. Also MGE XE 0.11.6 the current version was released on June 15 2019 which tells me MGE XE is still getting updates and will probabily include MWSE 2.1 once there is an official release and there will be no need to install a MWSE update ontop of MGE XE.
Thank you Lorenzo Ferrillo for helping me make mod work! It really brings Morrowind to life and makes it feel more modern without needing to use Windows 10.
This setup to make MGE XE mod also works in Proton 4.11-7 as I have tested it. This setup to make MGE XE also seem to work in older Wine versions such as Wine 4.0.1.
https://bugs.winehq.org/show_bug.cgi?id=47940
maniikarabera@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |maniikarabera@protonmail.ch
https://bugs.winehq.org/show_bug.cgi?id=47940
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #47 from joaopa jeremielapuree@yahoo.fr --- Is still a bug in current wine-7.17?
https://bugs.winehq.org/show_bug.cgi?id=47940
--- Comment #48 from Lorenzo Ferrillo lorenzofer@live.it --- (In reply to joaopa from comment #47)
Is still a bug in current wine-7.17?
While IIRC the issue described here isn't fixed, an MWSE update fixed the problem on their side hardcoding the offsets instead of relying on dbghelp to find them
https://bugs.winehq.org/show_bug.cgi?id=47940
Neko-san nekoNexus@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nekoNexus@protonmail.ch
https://bugs.winehq.org/show_bug.cgi?id=47940
soredake broaden_acid002@simplelogin.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|broaden_acid002@simplelogin | |.com |