https://bugs.winehq.org/show_bug.cgi?id=55717
Bug ID: 55717 Summary: mono's IsOutlineVisible_Line_WithGraphics test fails Product: Wine Version: 8.17 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: gdiplus Assignee: wine-bugs@winehq.org Reporter: madewokherd@gmail.com Distribution: ---
The MonoTests.System.Drawing.Drawing2D.GraphicsPathTest.IsOutlineVisible_Line_WithGraphics test stopped working in Wine. To test, download the Wine Mono tests and run: $ run-tests.exe MonoTests.System.Drawing.Drawing2D.GraphicsPathTest.IsOutlineVisible_Line_WithGraphics
This is a regression caused by 0c777a7d5cab90ab59d7a4a6b60c516efa7a9830.
https://bugs.winehq.org/show_bug.cgi?id=55717
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |whydoubt@gmail.com Keywords| |download, regression, | |testcase URL| |https://dl.winehq.org/wine/ | |wine-mono/8.0.0/wine-mono-8 | |.0.0-tests.zip Regression SHA1| |0c777a7d5cab90ab59d7a4a6b60 | |c516efa7a9830
https://bugs.winehq.org/show_bug.cgi?id=55717
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #1 from Esme Povirk madewokherd@gmail.com --- Source code: https://github.com/madewokherd/mono/blob/develop/mcs/class/System.Drawing/Te...
The same commit fixed some other related tests that had been broken in Wine. All of the IsOutlineVisible tests are working now except for this one.
https://bugs.winehq.org/show_bug.cgi?id=55717
Bartosz gang65@poczta.onet.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gang65@poczta.onet.pl
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #2 from Bartosz gang65@poczta.onet.pl --- Created attachment 75307 --> https://bugs.winehq.org/attachment.cgi?id=75307 Potential fix for GdipIsVisiblePathPoint
@Jeff Maybe you would like to proceed with the fix.
It should be trivial to check if image is set (see attachment).
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #3 from Esme Povirk madewokherd@gmail.com --- (In reply to Bartosz from comment #2)
Created attachment 75307 [details] Potential fix for GdipIsVisiblePathPoint
@Jeff Maybe you would like to proceed with the fix.
It should be trivial to check if image is set (see attachment).
This change fixes IsOutlineVisible_Line_WithGraphics, but it also breaks IsOutlineVisible_Line_WithGraphics_PageUnit and IsOutlineVisible_Line_WithGraphics_Transform, which had been fixed by the same patch that caused this regression.
We also need to NULL-check graphics before accessing graphics->image, otherwise it crashes in Wine tests.
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #4 from Jeff Smith whydoubt@gmail.com --- I have done a fair bit of experimenting around this, but I haven't nailed it down yet. It does NOT seem to rest on the backing context type (for example graphics->image). It may be something along the lines of the transform applying to both the region and the point under test, and in some edge cases native's result is "wrong"... The IsOutlineVisible_Line_WithGraphics test hitting on one such case.
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #5 from Bartosz gang65@poczta.onet.pl --- Yes, it seems that GdipIsOutlineVisiblePathPoint needs to be modified instead of GdipIsVisiblePathPoint, which is taking into account pen's weight.
My patch is wrong then
I will try to create unit tests for that.
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #6 from Jeff Smith whydoubt@gmail.com --- FYI, I boiled down the failing IsOutlineVisible_Line_WithGraphics test to a GdipIsVisiblePathPoint test and see the same quirk on native with both, which I take as confirmation of GdipIsVisiblePathPoint being where the fault lies. I have run across some other quirks as well, but have yet to find the pattern in the noise.
If GdipIsVisiblePathPoint matched, I suspect everything up the stack would match as well.
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #7 from Bartosz gang65@poczta.onet.pl --- I have created initial test for that: https://gitlab.winehq.org/wine/wine/-/merge_requests/4165
Feel free to do whatever you want with it.
Generally after applying Transformation or PageUnit the Pen's Weight is always 1.0
That's really strange.
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #8 from Esme Povirk madewokherd@gmail.com --- (In reply to Jeff Smith from comment #4)
I have done a fair bit of experimenting around this, but I haven't nailed it down yet. It does NOT seem to rest on the backing context type (for example graphics->image). It may be something along the lines of the transform applying to both the region and the point under test, and in some edge cases native's result is "wrong"... The IsOutlineVisible_Line_WithGraphics test hitting on one such case.
I always thought it was strange that they rasterize the path to begin with, but given that they do it kinda makes sense to do it in device coordinates (which means transforming both of those).
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #9 from Bartosz gang65@poczta.onet.pl --- I think I found a root cause of problem.
I have created Merge Request: https://gitlab.winehq.org/wine/wine/-/merge_requests/4165/diffs
Please take a look.
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #10 from Esme Povirk madewokherd@gmail.com --- I made a mistake on the instructions, the correct argument to run-tests is MonoTests.System.Drawing.Drawing2D.GraphicsPathTest:IsOutlineVisible_Line_WithGraphics
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #11 from Hans Leidekker hans@meelstraat.net --- (In reply to Bartosz from comment #7)
I have created initial test for that: https://gitlab.winehq.org/wine/wine/-/merge_requests/4165
This MR was merged, is this bug fixed?
https://bugs.winehq.org/show_bug.cgi?id=55717
--- Comment #12 from Esme Povirk madewokherd@gmail.com --- Nope, still present in 8.21.
https://bugs.winehq.org/show_bug.cgi?id=55717
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com