http://bugs.winehq.org/show_bug.cgi?id=28861
Bug #: 28861 Summary: Final Fantasy XI hangs after character selection Product: Wine Version: 1.3.29 Platform: x86-64 OS/Version: FreeBSD Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: llwang@infor.org CC: julliard@winehq.org Classification: Unclassified
Created attachment 37071 --> http://bugs.winehq.org/attachment.cgi?id=37071 WINEDEBUG=warn+all log for running pol.exe with wine-1.3.29
Final Fantasy XI hangs after character selection and setting active character on the server. The main game screen does not load. A log with WINEDEBUG=warn+all with wine-1.3.29 is attached. After doing a regression test, the commit that caused FFXI to hang after character selection seems to be:
79c2e55b5a6331d15788f65a929e9e002c2f8b05 is the first bad commit commit 79c2e55b5a6331d15788f65a929e9e002c2f8b05 Author: Alexandre Julliard julliard@winehq.org Date: Wed Apr 20 20:30:09 2011 +0200
user32: Only call the driver when the cursor position has really changed.
:040000 040000 5e335fb6e93ffa3171bd0ac90294f8088f64b749 b75dac74bbb00182b657a40cd0bf673aad71ace1 M dlls
http://bugs.winehq.org/show_bug.cgi?id=28861
Li-Lun Wang (Leland) llwang@infor.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Regression SHA1| |79c2e55b5a6331d15788f65a929 | |e9e002c2f8b05
http://bugs.winehq.org/show_bug.cgi?id=28861
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #1 from GyB gyebro69@gmail.com 2011-11-13 07:18:07 CST --- Does it help if you set the Windows version to Vista in winecfg? Also, have you tried the game in virtual desktop mode?
http://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #2 from Li-Lun Wang (Leland) llwang@infor.org 2011-11-13 11:30:32 CST --- I can't try it with vista mode right now because I cancelled my FFXI account until I have more spare time. Virtual desktop does not help in this issue. In fact, I have to use Virtual desktop for FFXI to work at all; otherwise direct X would fail to initialize.
http://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #3 from Mike Tedder mike@tedder.cc 2012-01-31 10:46:04 CST --- Created attachment 38628 --> http://bugs.winehq.org/attachment.cgi?id=38628 wine-1.4-rc1 log with FFXI hanging after character selection
I can confirm this happening for me even with the latest wine-1.4-rc1.
In actuality, I have been completely unable to get past the character select screen in FFXI with various versions of wine (1.2.1, 1.3.8, 1.3.10) for nearly two years now. I originally posted to the forum about a year ago, with no resolution as of yet: http://forum.winehq.org/viewtopic.php?t=10729
The difference for me, though, is I'm using the Japanese version of FFXI, not the English version which I suppose everyone else is using...
I've tried changing the Windows version to XP, Vista, and 7. All of them work the same: POL login works fine, FFXI launches, I select the character to login as, then the connection to the lobby server is made, and the screen fades out to black... and hangs there. The music is still playing looped in the background, and the "Downloading Data" icon which should appear in the bottom-right never shows.
System specs: - Linux pikachu 3.0.3-gentoo #1 SMP PREEMPT Sun Aug 21 12:47:01 JST 2011 x86_64 AMD Phenom(tm) 9650 Quad-Core Processor AuthenticAMD GNU/Linux - x11-drivers/nvidia-drivers-285.05.09 - KDE 4.7.4
I'll be more than happy to assist in tracking this bug down. I've attached a log with WINEDEBUG=warn+all with wine-1.4-rc1 set to Windows Vista mode for starters.
http://bugs.winehq.org/show_bug.cgi?id=28861
Mike Tedder bpoint42@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bpoint42@gmail.com
--- Comment #4 from Mike Tedder bpoint42@gmail.com 2012-02-17 22:08:35 CST --- Still no luck with wine-1.4-rc3.
http://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #5 from Mike Tedder bpoint42@gmail.com 2012-09-01 02:26:22 CDT --- Still fails with wine-1.5.11.
http://bugs.winehq.org/show_bug.cgi?id=28861
Brandon Corujo haku08879@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |haku08879@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=28861
Frédéric Delanoy frederic.delanoy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |frederic.delanoy@gmail.com Ever Confirmed|0 |1
--- Comment #6 from Frédéric Delanoy frederic.delanoy@gmail.com 2013-04-18 08:44:12 CDT --- Does this still happen with current wine (1.5.28 or later)?
http://bugs.winehq.org/show_bug.cgi?id=28861
Frédéric Delanoy frederic.delanoy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Abandoned?
--- Comment #7 from Frédéric Delanoy frederic.delanoy@gmail.com 2013-09-09 02:32:33 CDT --- Can you please retry with latest wine (1.7.1 or later) and report?
Otherwise this bug will be abandoned soon.
http://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #8 from Mike Tedder bpoint42@gmail.com 2013-09-22 04:04:33 CDT --- Apologies for the long delay.
I switched to a new PC (and also moved from Gentoo to Ubuntu) earlier this year, and haven't yet reinstalled FFXI since then.
I will try again here with the latest wine in another few weeks, and report back with my findings.
http://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #9 from Mike Tedder bpoint42@gmail.com --- I had some time to do some testing on this bug again over the holidays.
Somewhere between 1.5.13 and 1.5.14, something broke and FFXI now crashes with a page fault before the main menu even shows, so it is not possible to get to the character selection screen. This seems to continue all the way through to (at least) 1.7.8.
However, I was still able to confirm that FFXI still hangs at the character selection screen with 1.5.13.
Since the crash is a separate issue, I have filed a new bug here: http://bugs.winehq.org/show_bug.cgi?id=35323
http://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #10 from Mike Tedder bpoint42@gmail.com --- Just for reference, here's a quick memo dump of the various wine versions I tested and their results. Also note that I'm now using wine on OSX.
I didn't look into the D3D error I had with 1.5.9 and .10, since it seemed to be fixed by .13.
crash before ffxi main menu (#35323) ------------------------------------ 1.7.8 / win7 1.7.1 / win7 1.6.1 / win7 1.5.31 / win7 1.5.16 / win7 1.5.14 / win7
d3d error after launching from pol ---------------------------------- 1.5.10 / win7 1.5.9 / win7
hang after character selection ------------------------------ 1.5.13 / win7, vista, xp 1.5.8 / win7 1.5.5 / win7 1.4.1 / win7 1.3.18 / winxp
http://bugs.winehq.org/show_bug.cgi?id=28861
Frédéric Delanoy frederic.delanoy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|Abandoned? | Depends on| |35323
http://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #11 from Frédéric Delanoy frederic.delanoy@gmail.com --- (In reply to comment #10)
d3d error after launching from pol
Third party applications, like PlayOnLinux, Wineskin, WineBottler, etc., aren't supported here, so please test only with plain Wine.
http://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #12 from Frédéric Delanoy frederic.delanoy@gmail.com --- (In reply to comment #11)
(In reply to comment #10)
d3d error after launching from pol
Third party applications, like PlayOnLinux, Wineskin, WineBottler, etc., aren't supported here, so please test only with plain Wine.
I think I have been misled by pol abbreviation which is the same as "play on linux" 3rd party, hence the confusion. Sorry about the noise.
https://bugs.winehq.org/show_bug.cgi?id=28861
Chiitoo escomk3@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |escomk3@hotmail.com
--- Comment #13 from Chiitoo escomk3@hotmail.com --- Teegrins!
For as long as I can remember (possibly since late 2010), I have had to use Windows 7 mode for FINAL FANTASY XI. It would always get stuck in the darkness, with music playing, very much like described here.
As I was testing things for bug 35323, I noticed that I could 'fix' this by removing
else if (rc == NULL) rc = IMM_GetThreadData()->defaultContext;
from 'ImmGetContext' in 'imm.c'.
Tested on Gentoo Linux (~amd "unstable") with:
wine-1.7.9-197-gf76f34c
wine-1.7.10
wine-1.7.10-191-g8953c74
It's obviously no fix, but I hope it may point towards a helpful direction!
Kind Regards, Chiitoo/Dragoy
https://bugs.winehq.org/show_bug.cgi?id=28861 Bug 28861 depends on bug 35323, which changed state.
Bug 35323 Summary: Final Fantasy XI crashes with page fault before main menu https://bugs.winehq.org/show_bug.cgi?id=35323
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
https://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #14 from Mike Tedder bpoint42@gmail.com --- Ok, time to resurrect this bug and post my findings.
This bug is still reproducible with wine-1.7.28-107-g0eec97e, built on OSX 10.9.5, with a new install of FFXI (JP version) and all of the expansion packs and updates into a fresh, clean WINEPREFIX. It does not matter what the Windows version is set to. (I tried XP, Vista, and 7.)
During the black screen, I noticed a new log message I had not seen before:
err:ntdll:RtlpWaitForCriticalSection section 0x7bcab2ac "loader.c: loader_section" wait timed out in thread 0041, blocked by 000b, retrying (60 sec)
This message is repeated every 60 seconds until I kill the pol.exe process.
Thanks to Chiitoo's findings however, I can confirm that removing those two lines from ImmGetContext() fixes this issue:
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 2fa31ac..b3e9277 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -1424,8 +1424,6 @@ HIMC WINAPI ImmGetContext(HWND hWnd) rc = GetPropW(hWnd,szwWineIMCProperty); if (rc == (HIMC)-1) rc = NULL; - else if (rc == NULL) - rc = IMM_GetThreadData()->defaultContext;
if (rc) {
I also noticed two other minor issues this fixes:
1) After clicking on the SquareEnix password box (at the PlayOnline login screen) and the on-screen keyboard pops up, it is possible to simply type in one's password at that point on Windows, and with this patch. Without the patch, the keyboard focus doesn't seem to be correct, and the password cannot be entered without first clicking on the password input box inside the pop-up window.
2) After starting FFXI and getting to the main menu (before selecting a character), attempting to return to the PlayOnline viewer simply results in a hang with a black screen, with the same log message as above every 60 seconds. The above patch also fixes this issue.
It looks like commit b72dcd114d1c622b3046506563cc91fc38d40835 way back in 2008 updated the IMM code to store a context per thread using TLS.
What strikes me as odd though is if a context doesn't exist in the thread's local storage, one is automatically created regardless (lines 1421-1422). This created context is then returned to the application, however ImmGetContext() should return NULL if the window handle isn't owned by the process.
That might be what the -1 return result is from GetPropW(), but I'll have to debug this a bit to make a better guess.
If anything, I would propose that a context isn't generated unless the window handle is valid. I'll hack at this a bit and see if I can't find a solid patch for it.
https://bugs.winehq.org/show_bug.cgi?id=28861
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com Component|-unknown |imm32
https://bugs.winehq.org/show_bug.cgi?id=28861
jingai jingai@floatingpenguins.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jingai@floatingpenguins.com
https://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #15 from Alexandre Julliard julliard@winehq.org --- IMM context handling has changed since then, could you please retest with latest Wine?
https://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #16 from jingai jingai@floatingpenguins.com --- (In reply to Alexandre Julliard from comment #15)
IMM context handling has changed since then, could you please retest with latest Wine?
Same problem with 1.8rc3.
https://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #17 from jingai jingai@floatingpenguins.com --- (In reply to jingai from comment #16)
(In reply to Alexandre Julliard from comment #15)
IMM context handling has changed since then, could you please retest with latest Wine?
Same problem with 1.8rc3.
D'oh, sorry, I posted this to the wrong thread. However, my issue is somehow related to IMM at least:
wine: Unhandled page fault on write access to 0x00000014 at address 0x7e6ac449 (thread 0045), starting debugger... Unhandled exception: page fault on write access to 0x00000014 in 32-bit code (0x7e6ac449). err:dbghelp_msc:pe_load_debug_directory Got a page fault while loading symbols Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:7e6ac449 ESP:0d7ae824 EBP:0d7ae848 EFLAGS:00210246( R- -- I Z- -P- ) EAX:00000000 EBX:7e6e6a04 ECX:00000000 EDX:00000000 ESI:0013aa88 EDI:00030046 Stack dump: 0x0d7ae824: 09afe7c0 0d7ae848 7e75091d 09afe7c0 0x0d7ae834: 00000158 0d7ae8a8 7e6e6a04 00000012 0x0d7ae844: 09afe7c0 0d7ae878 7e6b7d82 00030046 0x0d7ae854: 0d7ae88c 0d7ae878 7e68bd15 09afe7c0 0x0d7ae864: 00000000 00000000 00000000 7e6e6a04 0x0d7ae874: 00000012 0d7ae8c8 7e68d974 00030046 000c: sel=0067 base=00000000 limit=00000000 32-bit --x Backtrace: =>0 0x7e6ac449 in winex11 (+0x3c449) (0x0d7ae848) 1 0x7e6b7d82 in winex11 (+0x47d81) (0x0d7ae878) 2 0x7e68d974 NotifyIME+0x253() in winex11 (0x0d7ae8c8) 3 0x7e755150 ImmNotifyIME+0x7f() in imm32 (0x0d7ae928) 0x7e6ac449: movl %edi,0x14(%eax)
https://bugs.winehq.org/show_bug.cgi?id=28861
Stefan G partyheld@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |partyheld@gmail.com
--- Comment #18 from Stefan G partyheld@gmail.com --- (In reply to Alexandre Julliard from comment #15)
IMM context handling has changed since then, could you please retest with latest Wine?
I've tried the patch with wine-1.9.22 on Debian stretch x64. The patch still works and allows the application to work, before I got the same crash report.
https://bugs.winehq.org/show_bug.cgi?id=28861
Rosanne DiMesio dimesio@earthlink.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |t3hyoshi@vivaldi.net
--- Comment #19 from Rosanne DiMesio dimesio@earthlink.net --- *** Bug 38151 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=28861
winehq@foreversmall.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winehq@foreversmall.com
--- Comment #20 from winehq@foreversmall.com --- Created attachment 61048 --> https://bugs.winehq.org/attachment.cgi?id=61048 20180408_ffxi_ashita_backtrace
I just wanted to report that this bug still persists in Wine 3.0. I've tried all the various fixes proposed in the comments and sites. Modifying imm.c also doesn't appear to help, it also appears slightly different than when this fix was first proposed.
I've tested this with standard POL as well as xiloader and ashita. All 3 will crash as the main screen is beginning to be drawn. I can accept the EULA and it will retrieve character information however a second after 3d graphics are displayed wine crashes. Appears to be the same crash previously reported.
https://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #21 from Chiitoo escomk3@hotmail.com --- (In reply to winehq from comment #20)
I just wanted to report that this bug still persists in Wine 3.0. I've tried all the various fixes proposed in the comments and sites. Modifying imm.c also doesn't appear to help, it also appears slightly different than when this fix was first proposed.
Which distribution of Linux are you using, and is this with the Japanese or English version of the PlayOnline Viewer/FFXI?
I've tested this with standard POL as well as xiloader and ashita. All 3 will crash as the main screen is beginning to be drawn. I can accept the EULA and it will retrieve character information however a second after 3d graphics are displayed wine crashes. Appears to be the same crash previously reported.
Adding third-party pieces, that I believe can be viewed as 'cracks' (which generally are off-topic here), will almost certainly not help the puzzle get solved in this case. :]
Just to be sure, you are able to reproduce this issue with a clean FFXI installation, without any third-party applications in the mix (windower, ashita, etc.), and when connecting to an official server?
https://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #22 from winehq@foreversmall.com --- I've tried this running vanilla Ubuntu 16.04 and KDE Neon, Wine 3.0 stable and staging, with the English version of POL/FFXI, both fail at the same exact point. I'm planning on trying this on Ubuntu 18.04 (when its released)and also KDE Neon when they upgrade to the new LTS release.
I've been messing around with this off and on since Wine 3.0 came out and I don't have an active subscription any longer. However I can confirm that I did have a problem back in February when I was attempting this the first time on a retail server. I unfortunately have no way to prove that. I proceeded to try out other windower apps and connecting to private servers thinking I may get a different result however I did not.
I've tried using 32bit and 64bit prefix. I've tried a number of .NET native vs built in DLLs. I tried your proposed imm.c patch and recompiled, however the exact lines you reference no longer exist, they were updated I believe, so I was sort of guessing there.
I can understand not wanting to support 3rd part apps, too many variables. Just curious if anyone else can confirm this issue still exists or is it just me?
I was also tempted to try and troubleshoot this myself, I'm an off and on wine user for a long time but never really dove into the wine debugging tools.
https://bugs.winehq.org/show_bug.cgi?id=28861
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #23 from Chiitoo escomk3@hotmail.com --- Created attachment 61062 --> https://bugs.winehq.org/attachment.cgi?id=61062 Combined Win7 and WinXP Output (tid,imm)
(In reply to Algaris from comment #22)
Thanks.
So far I'm (still) unable to reproduce the issue, while having Windows 7 set as the version to be reported to the application.
If set to Windows XP, however, differing a bit from the original report here, and even though bug 35323 was reportedly fixed, I can still see the crash before the title screen, right after the loading is done which occurs after having accepted to the “Rules of Conduct”.
The backtrace does seem to be similar to those seen here.
I'll attach some test runs from when it's working, as well as when it's not working.
Before I was wondering if this is somehow specific to macOS, since I couldn't see it on Gentoo Linux, but then there are those reports from Debian and Ubuntu. If I find the time, I may set up such a test system to see if I can not run the game in Windows 7 mode there either.
Forcing NULL in a way or another does still make things work for me even in Windows XP mode.
For example, just commenting out, or removing the mentioned lines (updated patch for that):
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 685eb018c4..522b01dd84 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -1509,8 +1509,8 @@ HIMC WINAPI ImmGetContext(HWND hWnd) rc = GetPropW(hWnd,szwWineIMCProperty); if (rc == (HIMC)-1) rc = NULL; - else if (rc == NULL) - rc = get_default_context( hWnd ); +/* else if (rc == NULL) + rc = get_default_context( hWnd );*/
if (rc) {
https://bugs.winehq.org/show_bug.cgi?id=28861
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #24 from joaopa jeremielapuree@yahoo.fr --- Is still a bug in current wine(3.20)?
https://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #25 from Chiitoo escomk3@hotmail.com --- If Windows XP is being reported, I can still see what I described in comment 23, with wine-3.20-217-gc83a9d6cda on Gentoo Linux.
https://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #26 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with wine-5.17?
https://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #27 from Chiitoo escomk3@hotmail.com --- If Windows XP is being reported, I can still see what I described in comment 23, with wine-5.17-110-g148d3aa461126 on Gentoo Linux.
https://bugs.winehq.org/show_bug.cgi?id=28861
--- Comment #28 from Chiitoo chiitoo@gentoo.org --- I can no longer re-produce this at current git master (wine-9.6).
https://bugs.winehq.org/show_bug.cgi?id=28861
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #29 from Alexandre Julliard julliard@winehq.org --- Marking fixed then, please reopen if you can still reproduce.
https://bugs.winehq.org/show_bug.cgi?id=28861
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #30 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 10.0-rc2.