https://bugs.winehq.org/show_bug.cgi?id=40304
Bug ID: 40304 Summary: EveHQ2 crashes with builtin gdiplus Product: Wine Version: 1.9.5 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: gdiplus Assignee: wine-bugs@winehq.org Reporter: xerox_xerox2000@yahoo.co.uk Distribution: ---
EveHQ2.exe from http://evehq.co/downloads/download.php?file=EveHQ2.25.2.exe crashes with builtin gdiplus.
I tried to find the bug using +gdiplus log and I came to this:
Just before the crash it says
trace:gdiplus:GdipTransformPath (0x1cc870, (nil))
The code for GdipTransformPath basically boils down to :
return GdipTransformMatrixPoints(matrix, path->pathdata.Points, path->pathdata.Count);
In code for GdipTransformMatrixPoints there is check
if(!matrix || !pts || count <= 0) return InvalidParameter;
So in the end GdipTransformPath will always return InvalidParameter when matrix=0.
From a quick test it seems to me that GdipTransformPath should return Ok when
matrix=0. I`ll attach possible fix and test hereafter
Bear in mind I have absolutely no knowledge about gdiplus, so any comment whether my fix ,analysis and test is correct/sufficient, is very welcome
https://bugs.winehq.org/show_bug.cgi?id=40304
--- Comment #1 from Louis Lenders xerox_xerox2000@yahoo.co.uk --- Created attachment 53944 --> https://bugs.winehq.org/attachment.cgi?id=53944 possible fix and test
Attached patch let`s the app proceed, the test succeeds on winxp, not tested any further, test probably not sufficient
Side-note: The app requires .net to be installed
https://bugs.winehq.org/show_bug.cgi?id=40304
--- Comment #2 from Louis Lenders xerox_xerox2000@yahoo.co.uk --- Created attachment 53945 --> https://bugs.winehq.org/attachment.cgi?id=53945 The errormessage from the application
Attached the errormessage from the application
https://bugs.winehq.org/show_bug.cgi?id=40304
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #53944|1 |0 is patch| | Attachment #53944|0 |1 is obsolete| |
--- Comment #3 from Louis Lenders xerox_xerox2000@yahoo.co.uk --- Comment on attachment 53944 --> https://bugs.winehq.org/attachment.cgi?id=53944 possible fix and test
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 58e99a2..84c13a7 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1677,7 +1677,7 @@ GpStatus WINGDIPAPI GdipTransformPath(GpPath *path, GpMatrix *matrix) if(!path) return InvalidParameter;
- if(path->pathdata.Count == 0) + if(path->pathdata.Count == 0 || !matrix) return Ok;
return GdipTransformMatrixPoints(matrix, path->pathdata.Points, diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index 24619e5..0481fef 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -1012,6 +1012,9 @@ static void test_flatten(void) status = GdipFlattenPath(path, NULL, 1.0); expect(Ok, status);
+ status = GdipTransformPath(path, 0); + expect(Ok, status); + status = GdipAddPathEllipse(path, 0.0, 0.0, 100.0, 50.0); expect(Ok, status);
https://bugs.winehq.org/show_bug.cgi?id=40304
--- Comment #4 from Louis Lenders xerox_xerox2000@yahoo.co.uk --- I attached wrong file.... possible fix and test is in Comment 3. Sorry about the noise....
https://bugs.winehq.org/show_bug.cgi?id=40304
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com --- This makes sense to me. Please remove check for NULL matrix in GdipFlattenPath() too before sending this.
https://bugs.winehq.org/show_bug.cgi?id=40304
--- Comment #6 from Louis Lenders xerox_xerox2000@yahoo.co.uk --- (In reply to Nikolay Sivov from comment #5)
This makes sense to me. Please remove check for NULL matrix in GdipFlattenPath() too before sending this.
Hi Nicolay, I`m not sure what you mean with that last remark. The code in GdipFlattenPath seems to handle things already correctly,right?:
GpStatus WINGDIPAPI GdipFlattenPath(GpPath *path, GpMatrix* matrix, REAL flatness) . . . .
if(matrix){ stat = GdipTransformPath(path, matrix); if (stat != Ok) return stat; }
. . .
https://bugs.winehq.org/show_bug.cgi?id=40304
--- Comment #7 from Louis Lenders xerox_xerox2000@yahoo.co.uk --- (In reply to Louis Lenders from comment #6)
(In reply to Nikolay Sivov from comment #5)
This makes sense to me. Please remove check for NULL matrix in GdipFlattenPath() too before sending this.
Hi Nicolay, I`m not sure what you mean with that last remark. The code in GdipFlattenPath seems to handle things already correctly,right?:
Ah, i get it, you meant the check isn`t necessary anymore.... Sorry about the noise
https://bugs.winehq.org/show_bug.cgi?id=40304
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #8 from Louis Lenders xerox_xerox2000@yahoo.co.uk --- fixe:d http://source.winehq.org/git/wine.git/?a=commit;h=36fdc6abf19bc53dfb33532464...
https://bugs.winehq.org/show_bug.cgi?id=40304
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |36fdc6abf19bc53dfb33532464f | |3613f95444239
https://bugs.winehq.org/show_bug.cgi?id=40304
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.7.
https://bugs.winehq.org/show_bug.cgi?id=40304
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani@redhat.com Target Milestone|--- |1.8.x
https://bugs.winehq.org/show_bug.cgi?id=40304
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #10 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.3.