https://bugs.winehq.org/show_bug.cgi?id=42646
Bug ID: 42646 Summary: GdipDrawPath call raises "Invalid floating point operation." exception Product: Wine Version: 2.3 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdiplus Assignee: wine-bugs@winehq.org Reporter: remk_1@yahoo.com Distribution: ---
Created attachment 57579 --> https://bugs.winehq.org/attachment.cgi?id=57579 Testcase - Unzip and run under Wine to see the error
Applications calling GdipDrawPath function (part of gdiplus.dll) raise "Invalid floating point operation." exception when the following two conditions are met:
- pen width used to draw the path is 1 (the shape is drawed correctly when the pen is wider) - the graphics object used to draw the shape is a bitmap (when it is drawn directly on a form canvas without the temporary bitmap, there is no exception raised)
See the attached WineGdipBug.exe file that demonstrates the problem. I attach also a very simple Delphi XE2 source code used to build the testcase.
Under native Windows, the testcase application correctly displays simple form with a rectangle drawn inside it.
In wine-2.0 or higher, including wine-2.3, the application displays exception window with a message "Invalid floating point operation." The message is shown several times, whenever the form has to be repainted.
In older Wine versions up to wine-1.9.9, the exceptions are not risen, but the path rectangle was not drawn either. Shell windows shows a warning "fixme:gdiplus:GdipDrawPath graphics object has no HDC", which is probably related to the bug. Needless to say that the missing frame and warning was just a little annoyance compared to the current Wine versions, that makes affected applications almost unusable.
Tested at Fedora 24 and Ubuntu 16.04 LTS