[Bug 59256] New: srgb support with OpenGL 3.2 causing crash in open source egui application
http://bugs.winehq.org/show_bug.cgi?id=59256 Bug ID: 59256 Summary: srgb support with OpenGL 3.2 causing crash in open source egui application Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: opengl Assignee: wine-bugs@list.winehq.org Reporter: bugs.winehq.org.odk14@passmail.com Distribution: --- Created attachment 80173 --> http://bugs.winehq.org/attachment.cgi?id=80173 console output I found a crash in an open source VST plugin. In trying to figure out exactly why it crashed, I ended up creating a standalone program that replicates the behavior: https://github.com/john-parton/egui-wine-test It's not as minimal as possible, but it's as minimal as I can get it with my knowledge and the tools I have at my disposal. You can cross-compile to windows from linux, and whether or not sRGB support is enabled is an environmental variable. I detailed exactly how to build it in the README, but at a high level, it uses rust and a library called egui. You build the program like this: cargo build --target x86_64-pc-windows-gnu You can then run FORCE_SRGB=0 RUST_BACKTRACE=full wine target/x86_64-pc-windows-gnu/debug/egui-wine-test.exe The program will work as expected. If you run FORCE_SRGB=1 RUST_BACKTRACE=full wine target/x86_64-pc-windows-gnu/debug/egui-wine-test.exe the program will almost immediately crash. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59256 John P <bugs.winehq.org.odk14@passmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Ubuntu -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59256 --- Comment #1 from John P <bugs.winehq.org.odk14@passmail.com> --- # Wine version wine --version wine-11.0-rc5 # Host info a8888b. Host - john@john d888888b. Machine - Dell Inc. XPS 15 9530 8P"YP"Y88 Kernel - 6.17.0-8-generic 8|o||o|88 Distro - Ubuntu 25.10 (Questing Quokka) 8' .88 DE - KDE 8`._.' Y8. WM - kwin_wayland_wr (Wayland) d/ `8b. Packages - 3516 (dpkg), 28 (cargo), 42 (flatpak) dP Y8b. Shell - bash d8: ::88b. Terminal - konsole d8" 'Y88b Brightness - 79% :8P :888 Resolution - 2560x1440, 3456x2160 8a. _a88P Uptime - 1d 12h 30m ._/"Yaa .| 88P| CPU - 13th Gen Intel® Core™ i9-13900H (20) \ YP" `| `. CPU Load - 12% / \.___.d| .' Memory - 39.9 GB / 65.5 GB `--..__) `._.' GPU - AD107M [GeForce RTX 4060 Max-Q / Mobile] GPU - Raptor Lake-P [Iris Xe Graphics] -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59256 --- Comment #2 from John P <bugs.winehq.org.odk14@passmail.com> --- I ran WINEDEBUG=+synchronous,+opengl wine target/x86_64-pc-windows-gnu/debug/egui-wine-test.exe and got some useful output. Here's three types of messages I'm getting that seem like culprits: 0740:trace:opengl:wglDescribePixelFormat hdc 0000000015010056, index 150, size 40, ppfd 00007FFFFE2FE0E0 0740:trace:opengl:wglChoosePixelFormat stencil mismatch for iPixelFormat=150 0740:trace:opengl:wglDescribePixelFormat hdc 0000000015010056, index 180, size 40, ppfd 00007FFFFE2FE0E0 0740:trace:opengl:wglChoosePixelFormat color mismatch for iPixelFormat=180 0740:trace:opengl:wglDescribePixelFormat hdc 0000000015010056, index 181, size 40, ppfd 00007FFFFE2FE0E0 0740:trace:opengl:wglChoosePixelFormat PFD_DRAW_TO_WINDOW required but not found for iPixelFormat=181 I'll attach the full output -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59256 John P <bugs.winehq.org.odk14@passmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80173|0 |1 is obsolete| | --- Comment #3 from John P <bugs.winehq.org.odk14@passmail.com> --- Created attachment 80174 --> http://bugs.winehq.org/attachment.cgi?id=80174 console output with WINEDEBUG=+synchronous,+opengl -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59256 --- Comment #4 from John P <bugs.winehq.org.odk14@passmail.com> --- I did some quick searches through the bug tracker for "color mismatch", "stencil mismatch", "PFD_DRAW_TO_WINDOW" and couldn't find any other relevant bugs -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59256 John P <bugs.winehq.org.odk14@passmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|srgb support with OpenGL |sRGB support with OpenGL |3.2 causing crash in open |3.2 in application causes |source egui application |crash with | |"PFD_DRAW_TO_WINDOW | |required but not found", | |possible additional causes | |"stencil mismatch"/"color | |mismatch" -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59256 --- Comment #5 from John P <bugs.winehq.org.odk14@passmail.com> --- Note that I have completely removed egui as a dependency to rule out that it's something specific to it, as it's a rather large library with a lot of dependencies. Compiling is simple, just replace any references to 'egui-wine-test' with 'baseview-wine-test' -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59256 John P <bugs.winehq.org.odk14@passmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugs.winehq.org.odk14@passm | |ail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59256 --- Comment #6 from John P <bugs.winehq.org.odk14@passmail.com> --- I have my first attempt at a unit / conformance test. I created a gitlab account (User ID 22414), but I'm not able to fork the main Wine repo. Is there some additional step I need to do? Thanks -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59256 --- Comment #7 from John P <bugs.winehq.org.odk14@passmail.com> --- I found the code path in the library which I was using where it returned zero supported pixel formats when requesting sRGB, and indeed it just forges ahead using zero/null for next function call. If I guard the call and fallback to a different pixel format, the crash goes away and the program works as expected. I've opened a PR with the library https://github.com/RustAudio/baseview/pull/221 to try and get it to behave a bit better, but I think this issue may still be useful to track closed-source programs that exhibit this behavior. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla