https://bugs.winehq.org/show_bug.cgi?id=40714
Bug ID: 40714 Summary: Oblivon Script Extender cannot load under wine-staging Product: Wine-staging Version: 1.9.10 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: lorenzofer@live.it CC: erich.e.hoover@wine-staging.com, michael@fds-team.de, sebastian@fds-team.de Distribution: ---
Created attachment 54609 --> https://bugs.winehq.org/attachment.cgi?id=54609 obse.log
I'm having an issues with Oblivion script extender program and wine-staging 1.9.10 and 1.9.11, prepackaged from arch repository or self-compiled. Arch linux x86_64
When I start obse_loader.exe, check the obse plugins installed and try to load them. But after hvaing loaded first plugin (according to the obse log) it freeze until giving the error "Could not inject DLL"
It worked perfectly until wine-staging 1.9.8 (I didn't tried 1.9.9 but I jumped direclty to 1.9.10 becouse of the exp preshading function)
The wine log, often doesn't say anything (the log has no message except the wine version + start warnings (as the one that warning you about CMST patchset)) some other times it give a ntdll warning about a blocked thread
It work perfectly with the last wine-dev (1.9.11, but it worked also with 1.9.10)
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #1 from Lorenzo Ferrillo lorenzofer@live.it --- Created attachment 54610 --> https://bugs.winehq.org/attachment.cgi?id=54610 obse_loader log
this is the ntdll error:
err:ntdll:RtlpWaitForCriticalSection section 0x7bce98e0 "../../../wine-staging/dlls/ntdll/loader.c: loader_section" wait timed out in thread 002a, blocked by 0028, retrying (60 sec)
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #2 from Lorenzo Ferrillo lorenzofer@live.it --- I can make obse work launching it with -nosync option (an optin that was intended probably to workaround a bug that existed in previous wine version, but it is no more an iusse with the recents wine development version and wine-stagingh until 1.9.8) Maybe a recent winestaging patch modified how thread synchronization work and it cause a deadlock in obse. I'm experimenting further.
However the bug can be workarounded.
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #3 from Michael Müller michael@fds-team.de --- I bought the game to debug the problem, but didn't succeed. Your bug description does not contain detailed steps to reproduce the issue. You haven't mentioned which version of the game your are using (Steam, non Steam), which version of Oblivion Script Extender you are using, nor did you provide a download link. You also didn't mention which plugins you have installed. Please keep in mind that this is a bug tracker for Wine and not a forum for Oblivion players, so providing instructions for someone who was never played Oblivion nor used OBSE will increase your chances of getting the bug fixed.
In my configuration (non Steam version, OBSE v0021, -Elys- Universal Silent Voice plugin as randomly selected plugin, Wine Staging 1.9.11) everything works fine:
OBSE: initialize (version = 21.4 010201A0) oblivion root = C:\Program Files\Bethesda Softworks\Oblivion\ config path = C:\Program Files\Bethesda Softworks\Oblivion\Data\OBSE\obse.ini plugin directory = C:\Program Files\Bethesda Softworks\Oblivion\Data\OBSE\Plugins\ checking plugin C:\Program Files\Bethesda Softworks\Oblivion\Data\OBSE\Plugins\Elys_USV.dll plugin C:\Program Files\Bethesda Softworks\Oblivion\Data\OBSE\Plugins\Elys_USV.dll (00000001 Elys_USV 0000005B) loaded correctly patched OBSE: deinitialize
I can not reproduce any freezes, the game loads to the main menu without problems.
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #4 from Lorenzo Ferrillo lorenzofer@live.it --- The bug happen only when I have more than one Plugin installed.
My first pugin is AddActorValue.
Also, but I need to test more, it seems to happen only if I have a non loadable plugin installed. (As for example Construction set specific plugins)
In the test case they was AddActorValue first(sucesfully loaded) and AddActorValue_CS (deadlocked) second.
I use retail version ,last obse (v21)
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #5 from Lorenzo Ferrillo lorenzofer@live.it --- EDIT:
"Also, but I need to test more, it seems to happen only if I have a non loadable plugin installed. (As for example Construction set specific plugins or plugins that miss a runtime component)"
And it block when its encountered (the unloadable plugin).
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #6 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Lorenzo Ferrillo from comment #5)
EDIT:
"Also, but I need to test more, it seems to happen only if I have a non loadable plugin installed. (As for example Construction set specific plugins or plugins that miss a runtime component)"
And it block when its encountered (the unloadable plugin).
To make reproducing this issue as easy as possible, it might help to be a bit more precise. Which "unloadable" plugins are you using exactly, and why are there runtime components missing (this should not be the case when properly installing those plugins)? Also, it might help to test with Wine Staging 1.9.11 to make sure the issue has not been fixed in the meantime.
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #7 from Lorenzo Ferrillo lorenzofer@live.it --- Ok Steps to reproduce,
Install Oblivion version 1.2.406 (last version). I tested with Retail, so I don't know how steam version reacts.
Install obse v21.
Download AddActorValue plugin.
AAV link: http://www.nexusmods.com/oblivion/mods/33248/?
Extract AddActorValues.dll and AddActorValues_CS.dll in /Data/OBSE/Plugins folder
start obse_loader.exe
Result Expected: AddActorValues.dll load sucesfully AddActorValues_CS.dll fail to load becouse is for editor only. Game start.
Result obtained: AddActorValues.dll load sucesfully. AddActorValues_CS is tried to load but it hangs (It's not failing as it should do). OBSE error: Cannot inject dll. WAIT_TIMEOUT.
This test is reproducible also with Oblivion Magic Extender plugin.
OBSE plugins can be of three types: Games Only plugins. Editor Only plugins Plugins that contain both mode.
This issue seems to trigger only when an Editor only plugins is queried when I'm starting the game. Leaving only AddActorValues_CS,dll doesn't allow the game to start.
Issue is reproduced also with the OBME_CS.dll plugin.
Games only plugins or Mixed mode plugins doesn't suffer from this issue.
With non staging wine the issue was non-existent.
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #8 from Lorenzo Ferrillo lorenzofer@live.it --- EDIT: issue is still present with wine-staging 1.9.11
P.S you guys should really allow to edit bugzilla's posts.
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #9 from Austin English austinenglish@gmail.com --- (In reply to Lorenzo Ferrillo from comment #8)
EDIT: issue is still present with wine-staging 1.9.11
P.S you guys should really allow to edit bugzilla's posts.
AFAIK that's not supported in bugzilla (and would be confusing with email notifications, which most developers use).
https://bugs.winehq.org/show_bug.cgi?id=40714
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |loader Ever confirmed|0 |1 Summary|Oblivon Script Extender |process_attach is executed |cannot load under |too early for forwarded |wine-staging |exports (Oblivon Script | |Extender cannot load under | |wine-staging) Product|Wine-staging |Wine Status|UNCONFIRMED |NEW
--- Comment #10 from Sebastian Lackner sebastian@fds-team.de --- I do not have a proposed patch yet, but I'm going to post my analysis here to make sure it doesn't get lost in the meantime. As it turns out this is not really a Wine Staging regression, its a loader issue which occurs under specific circumstances.
Explanation of what is happening:
* OBSE starts the main process in suspended mode.
* Main process has finished process initialization and calls the init_process_done wineserver call. A signal is sent to suspend the thread as soon as possible.
* Main process calls fixup_imports, which in turn imports additional dlls (import_dll). find_forwarded_export gets called and runs find_forwarded_export. Unfortunately, this immediately calls process_attach, although the signals are still blocked (!)
* Main process performs gdi32 font initialization (although signals are blocked). When performing the select wineserver call to wait on the font mutex, this request is never fulfilled. Please note that the thread is not properly suspended though, the wineserver has no suspend context for example.
* OBSE sends APCs to allocate memory and start a new thread. Those APCs are processed by the main process which is still stuck in the select call.
* The newly created thread tries to run other gdi32 functions (although the font initialization is not done yet).
In the development version of wine, the new thread will initialize the fonts itself, and OBSE will magically work although things are going terribly wrong in the background. In Wine Staging however, a run-once section is used to control initialization of the freetype. This will lead to a deadlock because the main thread is still stuck in the middle of the initialization, and the new thread will not attempt to run initialization itself.
The real problem however is not a Wine Staging issue, but instead that font initialization (or in general process_attach) is called too early for forwarded imports.
https://bugs.winehq.org/show_bug.cgi?id=40714
winebugs@63bit.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winebugs@63bit.net
--- Comment #11 from winebugs@63bit.net --- This bug also affects SKSE (basically obse for skyrim). Unfortunately SKSE does not have the nosync flag, meaning that SKSE simply will not work on wine staging.
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #12 from winebugs@63bit.net --- I attempted to replicate the -nosync behavior for skse by compiling a version which does not wait for threads (the same behavior as obse -nosync). This unfortunately crashes very nastily. I will try removing various plugin dlls and see if a workaround for skyrim is even possible.
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #13 from winebugs@63bit.net --- Removing plugins does not help SKSE, still get a deadlock
https://bugs.winehq.org/show_bug.cgi?id=40714
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED CC| |dmitry@baikal.ru Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/ntdll-Attach_P | |rocess_DLLs
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #14 from Sebastian Lackner sebastian@fds-team.de --- (In reply to winebugs from comment #11)
This bug also affects SKSE (basically obse for skyrim). Unfortunately SKSE does not have the nosync flag, meaning that SKSE simply will not work on wine staging.
At the time you wrote this the OBSE issue was already gone with current versions of Wine Staging. There was a recent restructuring of d3dx9_* libraries, which solved the problem in most cases.
In addition I've added a patch to fix the more general case which is included in Wine Staging 1.9.15. Please let me know if there are any remaining issues.
https://bugs.winehq.org/show_bug.cgi?id=40714
--- Comment #15 from Lorenzo Ferrillo lorenzofer@live.it --- Confirm that the patch solve this issue
https://bugs.winehq.org/show_bug.cgi?id=40714
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Fixed by SHA1| |ed893d3591802bb562d100b277f | |968be402af740 Resolution|--- |FIXED
--- Comment #16 from Alexandre Julliard julliard@winehq.org --- Fix merged as ed893d3591802bb562d100b277f968be402af740.
https://bugs.winehq.org/show_bug.cgi?id=40714
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #17 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.0-rc1.
https://bugs.winehq.org/show_bug.cgi?id=40714
Jonas Jelten jj@stusta.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jj@stusta.net