http://bugs.winehq.org/show_bug.cgi?id=28791
Bug #: 28791 Summary: XSetDashes is being passed 0 as one of the dashes causing a BadValue Error Product: Wine Version: 1.3.30 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: critical Priority: P2 Component: winex11.drv AssignedTo: wine-bugs@winehq.org ReportedBy: damian.dixon@gmail.com Classification: Unclassified
Created attachment 36985 --> http://bugs.winehq.org/attachment.cgi?id=36985 backtrace in winedbg with +synchronous set
Wine should either check the dash values in X11DRV_SetupGCForPen.
I suspect that ideally the code that sets a linestyle up should ensure the dash values are in range for X11.
The particular sequence I am seeing is '0 3 13 0'. It is the '0' that causes the BadValue.
Looking in pen.c (X11DRV_SelectPen, line 108) the recent PS_USERSTYLE change is not complete:
case PS_USERSTYLE: physDev->pen.dash_len = min(elp->elpNumEntries, MAX_DASHLEN); for(i = 0; i < physDev->pen.dash_len ; i++) physDev->pen.dashes[i] = min(elp->elpStyleEntry[i], 255);
I believe that the code should be:
case PS_USERSTYLE: physDev->pen.dash_len = min(elp->elpNumEntries, MAX_DASHLEN); for(i = 0; i < physDev->pen.dash_len ; i++) physDev->pen.dashes[i] = min(elp->elpStyleEntry[i], 255) ? min(elp->elpStyleEntry[i], 255) : 1;
This simple change works for the application I am testing.
http://bugs.winehq.org/show_bug.cgi?id=28791
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |normal
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru 2011-10-18 11:10:55 CDT --- http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
http://bugs.winehq.org/show_bug.cgi?id=28791
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |f839e5327255077ba6f569d2e8e | |907eaba98ce97 Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #2 from Alexandre Julliard julliard@winehq.org 2011-10-21 11:08:21 CDT --- Should be fixed now.
http://bugs.winehq.org/show_bug.cgi?id=28791
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org 2011-10-21 13:49:47 CDT --- Closing bugs fixed in 1.3.31.