http://bugs.winehq.org/show_bug.cgi?id=10949
Summary: Photoshop 6 divide by zero crash on startup in wintab with 0.9.52 Product: Wine Version: CVS/GIT Platform: Other OS/Version: other Status: NEW Keywords: download, regression Severity: normal Priority: P2 Component: wine-x11driver AssignedTo: jwhite@codeweavers.com ReportedBy: dank@kegel.com CC: wine-bugs@winehq.org
http://appdb.winehq.org/objectManager.php?sClass=version&iId=88#Comment-... says: "0.9.52 Divide by zero regression PS 6 loads and then crashes. Unhandled exception: divide by zero in 32-bit code (0x7c752897). Backtrace: =>1 0x7c752897 AddPacketToContextQueue+0x347() in wintab32 (0x0034f198) 2 0x7c7534ab in wintab32 (+0x134ab) (0x0034f218) "
http://bugs.winehq.org/show_bug.cgi?id=10949
--- Comment #1 from Dan Kegel dank@kegel.com 2007-12-29 11:16:47 --- I should mention: I can't reproduce this myself, but it probably requires a particular tablet, so that's not a big surprise.
http://bugs.winehq.org/show_bug.cgi?id=10949
Jeremy White jwhite@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #2 from Jeremy White jwhite@codeweavers.com 2007-12-30 09:18:50 --- I have a hunch I know what this is. Many tablet programs seem to pass in a a context with 0'd lcInExtX and lcInExtY. That wintab specification does not make it clear, but it appears as though programs expect wintab.dll to override those values. But Wine does not, and that leads to a divide by zero error. You'll also see it in some sample tablet programs as well.
A +wintab32 log file would help. I'll attach a patch (that is not correct for submission to WineHQ) which should, if my theory is correct, get you past this crash. A +wintab32 log file with this patch would be great.
If my hunch is correct, then we would need to write a test program and observe exactly how this behaves in Windows, particularly wrt to context initialization and default values, and then model Wine's wintab32 after that behavior.
http://bugs.winehq.org/show_bug.cgi?id=10949
--- Comment #3 from Jeremy White jwhite@codeweavers.com 2007-12-30 09:19:28 --- Created an attachment (id=9906) --> (http://bugs.winehq.org/attachment.cgi?id=9906) (Not correct) patch that works around a divide by zero error
http://bugs.winehq.org/show_bug.cgi?id=10949
Jeremy White jwhite@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #9906 is|0 |1 obsolete| |
--- Comment #4 from Jeremy White jwhite@codeweavers.com 2007-12-30 10:41:50 --- Created an attachment (id=9911) --> (http://bugs.winehq.org/attachment.cgi?id=9911) Correct hack patch
Sorry, previous one didn't compile. This one does.
http://bugs.winehq.org/show_bug.cgi?id=10949
--- Comment #5 from Robert Isaac rjisaac@gmail.com 2007-12-30 12:52:05 --- Created an attachment (id=9917) --> (http://bugs.winehq.org/attachment.cgi?id=9917) wintab32 ps6 log
The wintab32 post-hack log which seems to workaround the crash issue.
http://bugs.winehq.org/show_bug.cgi?id=10949
Jeremy White jwhite@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jwhite@codeweavers.com AssignedTo|jwhite@codeweavers.com |wine-bugs@winehq.org Status|ASSIGNED |NEW Summary|Photoshop 6 divide by zero |Divide by zero crash on |crash on startup in wintab |startup in wintab; Affects |with 0.9.52 |Photoshop 6, many tablet | |sample programs
http://bugs.winehq.org/show_bug.cgi?id=10949
Jeremy White jwhite@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Summary|Divide by zero crash on |Divide by zero crash on |startup in wintab; Affects |startup in wintab due to |Photoshop 6, many tablet |lack of 'real' tablet |sample programs |devices; affects Photoshop 6
--- Comment #6 from Jeremy White jwhite@codeweavers.com 2007-12-30 16:29:07 --- Thanks; that's exactly the issue I was expecting.
The issue is that you do not have a tablet, but the Wine code incorrectly thinks that you do; it treats a mouse device as a tablet. Further, due to some (justifiable) code changes I made, your mouse doesn't initialize the values for lcInExtX or lcInExtY, which leaves them as 0, which causes a divide by 0 error.
The correct fix is to have your mouse not count as a tablet. I've submitted a patch to wine-patches to do just that: http://www.winehq.org/pipermail/wine-patches/2007-December/048367.html but that patch has not yet been accepted. I've sent an email to Alexandre asking what the issues are.
Cheers,
Jeremy
(In reply to comment #5)
Created an attachment (id=9917)
--> (http://bugs.winehq.org/attachment.cgi?id=9917) [details]
wintab32 ps6 log
The wintab32 post-hack log which seems to workaround the crash issue.
http://bugs.winehq.org/show_bug.cgi?id=10949
Jeremy White jwhite@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |jwhite@codeweavers.com Status|ASSIGNED |NEW
--- Comment #7 from Jeremy White jwhite@codeweavers.com 2007-12-31 10:02:07 --- After some reflection, I realized that this error could be correctly resolved with an additional patch, which I've sent off to wine-patches.
I would greatly appreciate it if the reporter could revert my previous hack patch, and apply this patch: http://www.winehq.org/pipermail/wine-patches/2007-December/048506.html
and confirm that it also prevents the crash. (A +wintab32 log should show a message to the effect of "Did not find a valid stylus cursor with >= 5 axes, returning 0 valid devices.")
The key is to do this before my previous patch is committed, as it would also prevent this crash from happening.
Cheers,
Jeremy
http://bugs.winehq.org/show_bug.cgi?id=10949
Jeremy White jwhite@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #8 from Jeremy White jwhite@codeweavers.com 2007-12-31 20:25:51 --- Alexandre has now committed 2 patches, either of which should avoid this error in the future.
http://bugs.winehq.org/show_bug.cgi?id=10949
Robert Isaac rjisaac@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rjisaac@gmail.com
--- Comment #9 from Robert Isaac rjisaac@gmail.com 2008-01-03 15:40:10 --- Just to confirm, your second patch (http://www.winehq.org/pipermail/wine-patches/2007-December/048506.html) also avoids the issue, sorry for the delay.
Thank you very much.
http://bugs.winehq.org/show_bug.cgi?id=10949
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Dan Kegel dank@kegel.com 2008-01-28 06:13:23 --- Closing all RESOLVED FIXED bugs older than 0.9.54.
http://bugs.winehq.org/show_bug.cgi?id=10949
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified