https://bugs.winehq.org/show_bug.cgi?id=45279
Bug ID: 45279 Summary: Final Fantasy XI crashes on startup Product: Wine Version: 3.9 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: farmboy0+winehq@googlemail.com Distribution: ---
Created attachment 61539 --> https://bugs.winehq.org/attachment.cgi?id=61539 crash backtrace
This is new behaviour with wine 3.9, with wine 3.8 and older the game starts successfully.
This is mostly probably related to the switch to core contexts.
The following output is shown right before the crash:
003c:fixme:d3d:state_linepattern_w Setting line patterns is not supported in OpenGL core contexts. 003c:err:d3d:wined3d_debug_callback 0x181218: "GL_INVALID_OPERATION in glVertexAttribPointer(non-VBO array)". 003c:err:d3d:wined3d_debug_callback 0x181218: "GL_INVALID_OPERATION in glVertexAttribPointer(non-VBO array)". 003c:err:d3d:wined3d_debug_callback 0x181218: "GL_INVALID_OPERATION in glVertexAttribPointer(non-VBO array)".
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #1 from Matteo Bruni matteo.mystral@gmail.com --- (In reply to farmboy0+winehq from comment #0)
Created attachment 61539 [details] crash backtrace
This is new behaviour with wine 3.9, with wine 3.8 and older the game starts successfully.
This is mostly probably related to the switch to core contexts.
The following output is shown right before the crash:
003c:fixme:d3d:state_linepattern_w Setting line patterns is not supported in OpenGL core contexts. 003c:err:d3d:wined3d_debug_callback 0x181218: "GL_INVALID_OPERATION in glVertexAttribPointer(non-VBO array)". 003c:err:d3d:wined3d_debug_callback 0x181218: "GL_INVALID_OPERATION in glVertexAttribPointer(non-VBO array)". 003c:err:d3d:wined3d_debug_callback 0x181218: "GL_INVALID_OPERATION in glVertexAttribPointer(non-VBO array)".
Can you please attach a +ddraw,d3d8,d3d9,d3d log?
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #2 from farmboy0+winehq@googlemail.com --- Created attachment 61556 --> https://bugs.winehq.org/attachment.cgi?id=61556 WINEDEBUG=+ddraw,+d3d8,+d3d9,+d3d log
https://bugs.winehq.org/show_bug.cgi?id=45279
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #61556|text/plain |application/x-gzip mime type| |
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #3 from Matteo Bruni matteo.mystral@gmail.com --- Thank you for the log. The GL errors are caused by:
0036:trace:d3d:buffer_init Not creating a BO because the buffer is not GPU accessible.
I have a patch in my queue that should help with that.
That said, the crash doesn't seem to be directly related to those. The game crashes inside the radeonsi driver, while uploading texture data, and I didn't notice anything obviously wrong with that. The page fault address is also pretty weird. Maybe somehow it has to do with the previous GL errors?
https://bugs.winehq.org/show_bug.cgi?id=45279
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |joseph.kucia@gmail.com Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #4 from farmboy0+winehq@googlemail.com --- @Matteo Bruni Can you point me to your patch?
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #5 from farmboy0+winehq@googlemail.com --- Still happens with 3.11
https://bugs.winehq.org/show_bug.cgi?id=45279
Seth VanHeulen svanheulen@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |svanheulen@gmail.com
--- Comment #6 from Seth VanHeulen svanheulen@gmail.com --- I'm having this same exact issue (running 3.13 currently) and I *think* it might be specific to AMD video cards. I just recently switched to an AMD card from an Nvidia and that's when I noticed the issue. The only thing is that it's been a while since I tried running the game so I'm not 100% sure that I had it running on the Nvidia card after the 3.9 release.
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #7 from Seth VanHeulen svanheulen@gmail.com --- I did some more testing and I can confirm that it is version 3.9+ that has the issue. Version 3.8 works fine and 3.9 gets this crash.
I can also confirm that this crash does NOT happen with an NVidia video card using the proprietary driver. Both test systems are using an up to date Arch Linux install so all the other software should be the same, except the video drivers of course.
Also, I notice this bug isn't linked to Final Fantasy XI in the AppDB. Can someone do that? (I don't see any way to do it myself)
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #8 from Seth VanHeulen svanheulen@gmail.com --- I've found that reverting commit 0db4d1c251d293333e2721a78d6156008a90ff6f fixes the issue (tested in version 3.9 and 3.13). Judging by the commit message it looks like an issue with AMD's OpenGL 4.4 support. I'll test with the Nouveau driver soon to see if it's an issue with Mesa in general or specifically AMD.
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #9 from Seth VanHeulen svanheulen@gmail.com --- I tested it with the Nouveau driver and it runs fine, so this must be specific to AMD.
https://bugs.winehq.org/show_bug.cgi?id=45279
headbandcube@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |headbandcube@protonmail.com
--- Comment #10 from headbandcube@protonmail.com --- This also affects "planetarian ~the reverie of a little planet~", https://steamdb.info/app/316720, resulting in a crash after launch with similar errors.
A regression test revealed the same bad commit: 0db4d1c251d293333e2721a78d6156008a90ff6f
https://bugs.winehq.org/show_bug.cgi?id=45279
Gauvain Roussel-Tarbouriech gauvain@govanify.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gauvain@govanify.com
--- Comment #11 from Gauvain Roussel-Tarbouriech gauvain@govanify.com --- Can confirm too, any news on the patchset/any potential fix?
https://bugs.winehq.org/show_bug.cgi?id=45279
Andrew Wesie awesie@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |awesie@gmail.com
--- Comment #12 from Andrew Wesie awesie@gmail.com --- The error:
0036:trace:d3d:buffer_init Not creating a BO because the buffer is not GPU accessible.
is the root cause. If the vertex buffer does not have a BO, then GL_ARRAY_BUFFER == 0 when context_load_numbered_arrays calls glVertexAttribPointer. Since element->data.addr is a pointer into heap memory (and non-zero), this makes Mesa very unhappy because Wine is violating the opengl spec.
The attached patch forces a vertex buffer to be GPU-accessible, which causes a BO to be used and the call to glVertexAttribPointer to now be valid.
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #13 from Andrew Wesie awesie@gmail.com --- Created attachment 62460 --> https://bugs.winehq.org/attachment.cgi?id=62460 Patch
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #14 from Seth VanHeulen svanheulen@gmail.com --- Thanks Andrew! I just tested your patch with Wine 3.17 and it works perfectly.
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #15 from farmboy0+winehq@googlemail.com --- I can also confirm that wine 3.17 + the attached patch works for me in FFXI.
https://bugs.winehq.org/show_bug.cgi?id=45279
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |vulture6@mail.com
--- Comment #16 from Józef Kucia joseph.kucia@gmail.com --- *** Bug 45987 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=45279
winehq@nerdbynature.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winehq@nerdbynature.de
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #17 from winehq@nerdbynature.de --- I see the same messages when running Unreal[0], printed over and over to stdout:
005e:err:d3d:wined3d_debug_callback 0x20b190: "GL_INVALID_OPERATION in glVertexAttribPointer(non-VBO array)".
But the game starts (mouse doesn't work though) and did not crash so far. This is with Wine 3.17 on Fedora 28 (x86_64) and as I did not see the patch in the commitlog so far, and 3.18 has already been released, I guess the patch will only make it into 3.19?
[0] https://appdb.winehq.org/objectManager.php?sClass=application&iId=89
https://bugs.winehq.org/show_bug.cgi?id=45279
Chiitoo escomk3@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |escomk3@hotmail.com
--- Comment #18 from Chiitoo escomk3@hotmail.com --- Just to mention it here, too, though bug 45987 makes it obvious if one checks a look: this affects nvidia now as well, and indeed is still present in 3.19/current git master in case some are wondering.
The patch didn't pass review yet. [1]
1. https://www.winehq.org/pipermail/wine-devel/2018-October/133580.html
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #19 from Seth VanHeulen svanheulen@gmail.com --- I created a new patch that works with 3.19 but I only changed what was specifically needed to get Final Fantasy XI running. Also, I don't know enough about Wine or graphics APIs to know if this is the *correct* way to fix the issue, but it works (for me at least).
There are 2 places in the ddraw library where vertex buffers are created without being GPU accessible, but only one of them was causing this crash in Final Fantasy XI so that's the only instance I changed.
Also according to this comment, some of the other games effected are using d3d9, so this patch wont fix those either: https://www.winehq.org/pipermail/wine-devel/2018-October/133580.html
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #20 from Seth VanHeulen svanheulen@gmail.com --- Created attachment 62646 --> https://bugs.winehq.org/attachment.cgi?id=62646 wine 3.19 ffxi patch
https://bugs.winehq.org/show_bug.cgi?id=45279
reaper2021@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |reaper2021@protonmail.com
--- Comment #21 from reaper2021@protonmail.com --- pol.exe still crashes under Wine-3.20, with
0050:err:d3d:wined3d_debug_callback 0x6d9df50: "GL_INVALID_OPERATION error generated. Invalid VAO/VBO/pointer usage.". 0050:err:d3d:wined3d_debug_callback 0x6d9df50: "GL_INVALID_OPERATION error generated. Invalid VAO/VBO/pointer usage.". 0050:err:d3d:wined3d_debug_callback 0x6d9df50: "GL_INVALID_OPERATION error generated. Invalid VAO/VBO/pointer usage.".
Tested on Manjaro (4.19.1-1-MANJARO kernel) running proprietary nvidia driver.
My apologies for this report if the crash is due to the fact that the proposed patch did not make it into the 3.20 release.
https://bugs.winehq.org/show_bug.cgi?id=45279
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |0db4d1c251d293333e2721a78d6 | |156008a90ff6f
https://bugs.winehq.org/show_bug.cgi?id=45279
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #22 from Fabian Maurer dark.shadow4@web.de --- Also affects undertale. Reverting the commit fixes the issue.
https://bugs.winehq.org/show_bug.cgi?id=45279
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Final Fantasy XI crashes on |Multiple applications crash |startup |due to usage of OpenGL core | |context (Final Fantasy XI, | |Undertale, ...)
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #23 from Fabian Maurer dark.shadow4@web.de --- Problem is that in context_load_numbered_arrays, glVertexAttribPointer expects an VBO to be bound - 0 is not accepted anymore in core contexts.
https://bugs.winehq.org/show_bug.cgi?id=45279
Robert Walker bob.mt.wya@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bob.mt.wya@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45279
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #24 from flobob vulture6@mail.com --- Hope this problem can be fixed before release of 4.0. Keep finding games which no longer work with Nvidia due to problem with "GL_INVALID_OPERATION error generated. Invalid VAO/VBO/pointer usage.".
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #25 from Fabian Maurer dark.shadow4@web.de --- FWIW, there were some patches: https://www.winehq.org/pipermail/wine-devel/2018-November/134575.html But they weren't accepted.
https://bugs.winehq.org/show_bug.cgi?id=45279
Paul Gofman gofmanp@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gofmanp@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45279
pattietreutel katyaberezyaka@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |katyaberezyaka@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #26 from pattietreutel katyaberezyaka@gmail.com --- VA-11 Hall-A: Cyberpunk Bartender Action is affected too.
https://bugs.winehq.org/show_bug.cgi?id=45279
Anders Jonsson anders.jonsson@norsjovallen.se changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |anders.jonsson@norsjovallen | |.se
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #27 from Seth VanHeulen svanheulen@gmail.com --- commit 5a8e430b96ab429a85f82f26ba9d2de4729954c2 fixes the issue for Final Fantasy XI at least.
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #28 from Fabian Maurer dark.shadow4@web.de --- Also fixed Undertale.
https://bugs.winehq.org/show_bug.cgi?id=45279
--- Comment #29 from pattietreutel katyaberezyaka@gmail.com --- VA-11 Hall-A: Cyberpunk Bartender Action fixed too.
https://bugs.winehq.org/show_bug.cgi?id=45279
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |5a8e430b96ab429a85f82f26ba9 | |d2de4729954c2
--- Comment #30 from Józef Kucia joseph.kucia@gmail.com --- Marking as fixed by commit https://source.winehq.org/git/wine.git/?a=commit;h=5a8e430b96ab429a85f82f26b...
https://bugs.winehq.org/show_bug.cgi?id=45279
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #31 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 4.0-rc3.