https://bugs.winehq.org/show_bug.cgi?id=52574
Bug ID: 52574 Summary: PlayOnline Viewer: Unhandled exception crash after 10-20 seconds. Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: escomk3@hotmail.com Distribution: ---
After a13fc3bb7e0 [1], PlayOnline Viewer (used to launch Final Fantasy XI Online) crashes after running for a while, usually around 10-15 seconds.
For some reason the backtraces I'm getting are not very talkative:
Backtrace: =>0 0x7b060fc0 (0x10eafd3c) 0x7b060fc0: movl %edi,0x28(%edx)
To reproduce:
- Download and install the PlayOnline Viewer. - Launch PlayOnline Viewer and let it run.
1. https://source.winehq.org/git/wine.git/commitdiff/a13fc3bb7e055562b8b9deae98...
https://bugs.winehq.org/show_bug.cgi?id=52574
Chiitoo escomk3@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression Distribution|--- |Gentoo URL| |https://web.archive.org/web | |/20210810150839/http://www. | |playonline.com/ff11eu/downl | |oad/media/install_win.html Regression SHA1| |a13fc3bb7e055562b8b9deae985 | |c64c5c7861424
https://bugs.winehq.org/show_bug.cgi?id=52574
--- Comment #1 from Chiitoo escomk3@hotmail.com --- Created attachment 71907 --> https://bugs.winehq.org/attachment.cgi?id=71907 Terminal output with backtrace.
Managed to get some kind of a backtrace.
https://bugs.winehq.org/show_bug.cgi?id=52574
Chiitoo escomk3@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |7.3
https://bugs.winehq.org/show_bug.cgi?id=52574
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|PlayOnline Viewer: |PlayOnline Viewer crashes |Unhandled exception crash |after 10-20 seconds |after 10-20 seconds. | CC| |z.figura12@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=52574
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #2 from joaopa jeremielapuree@yahoo.fr --- Can you try with mesa driver?
https://bugs.winehq.org/show_bug.cgi?id=52574
farmboy0+winehq@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |farmboy0+winehq@googlemail. | |com
--- Comment #3 from farmboy0+winehq@googlemail.com --- I can confirm the problem with wine 7.3 Wine 7.2 works fine with the same mesa version. I'm using mesa 21.3.5.
https://bugs.winehq.org/show_bug.cgi?id=52574
--- Comment #4 from Chiitoo escomk3@hotmail.com --- The output I added is from Mesa 22.0.0_rc2 with xf86-video-amdgpu 22.0.0 (also tested Mesa 21.3.7 and git master at dd733fa52e).
https://bugs.winehq.org/show_bug.cgi?id=52574
--- Comment #5 from Zebediah Figura z.figura12@gmail.com --- It looks like we're probably running out of virtual address space. Evidently even 128 MB is too much. I'll have to download and try to figure out if there's anything we can do to save space.
https://bugs.winehq.org/show_bug.cgi?id=52574
--- Comment #6 from Zebediah Figura z.figura12@gmail.com --- Created attachment 71965 --> https://bugs.winehq.org/attachment.cgi?id=71965 submit GL command fences when blitting to the front buffer
The application is repeatedly issuing draw calls from a ddraw sysmem buffer. This causes ddraw to repeatedly discard a vertex buffer, asynchronously replacing the existing BO (block) with a new one.
The problem is that the old BOs aren't getting reclaimed. In order to be nice to the GL driver, we don't reclaim them until they aren't in use anymore by the GPU, and we use command fences to determine that. We submit command fences periodically so that we don't let retired resources pile up infinitely.
Unfortunately, our means of submitting command fences periodically is "when the swapchain is presented". The application uses IDirectDrawSurface7::Blt() to blit directly to the front buffer, which has the result that we apparently do correctly render to the screen, but never call wined3d_swapchain_present().
So there are multiple potential ways to fix this, and I don't know which is the correct one. We could be trying to submit command fences more often (when?). Or maybe ddraw should be actually presenting the swapchain, but the correct semantics associated with that are unclear to me.
The attached patch seems potentially correct, though, and does fix the application.
https://bugs.winehq.org/show_bug.cgi?id=52574
--- Comment #7 from Chiitoo escomk3@hotmail.com --- Interesting. Yeah, seems good with the patch here as well so far.
The "repeatedly issuing draw calls from a ddraw sysmem buffer" reminds me of how I've always (well over 10 years) had the feeling the PlayOnline Viewer and the game itself are probably not doing things in very efficient ways, and while they have their issues under Windows too, I do think the performance could be a lot better when running via Wine.
That's a whole another story though, for another time, for another bug.
Many thanks!
https://bugs.winehq.org/show_bug.cgi?id=52574
Chiitoo escomk3@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #8 from Chiitoo escomk3@hotmail.com --- Fixed by ee12556960e [1], thanks again!
[1] https://source.winehq.org/git/wine.git/commitdiff/ee12556960e30fc22f276d2de2...
https://bugs.winehq.org/show_bug.cgi?id=52574
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |ee12556960e30fc22f276d2de28 | |33e63be90cee9
https://bugs.winehq.org/show_bug.cgi?id=52574
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.5.