RFC: wintab32: Qt applications crash after WTOpen

Alex Henrie alexhenrie24 at gmail.com
Fri Oct 19 22:34:34 CDT 2018


On Thu, Sep 13, 2018 at 10:13 AM Bernhard Übelacker
<bernhardu at mailbox.org> wrote:
>
> Hello all,
> I tried to look into a Debian bug [1] where Qt applications started
> to crash in recent wine-development versions.
>
> In my opinion WTInfo returns some uninitialized stack memory in LOGCONTEXTW.
> Qt does not look at the return value at all and calls then WTOpen,
> which puts some window messages near lcMsgBase into the message queue.
>
> Most of the time this works as a random window message is just ignored.
> But under some circumstances an existing wine internal window message is hit,
> but that message needs parameters which are not given, therefore it is crashing.
>
> This happens when there is no device attached that is usable via wintab32.dll.
>
> I have prepared two patches:
> - first avoids the copy of the uninitilized stack memory.
> - second makes WTOpen just succeed if there is any usable device found.
>
> But as I have no suitable hardware I could just test the behaviour in that case.
> Tried to use the qemu usb-wacom-tablet, but I fear that this also relies on
> present hardware outside of the VM.
>
> Also I found all testbot VMs having no wintab32.dll available at all.
>
> Therefore I would be glad if I could receive some feedback on the patches and
> how I should proceed with this issue, because I do really not want to break
> the case where such hardware is present and working.
>
> Also should I create a Wine bug for it.
>
> Or should this considered a Qt bug because on most systems wintab32.dll is
> possibly not pressent and therefore no problem. Should a bug be opened there?

Hi Bernhard, thank you for your excellent analysis of this problem!
Yes, please file a report at <https://bugs.winehq.org/>.

I looked at your patches and I'd like to propose a simpler solution:
If the computer is not a tablet, return FALSE from
X11DRV_LoadTabletInfo (see attached patch). This will make WTOpen
fail, and Qt will see the error and disable its tablet support. What
do you think?

-Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tablet.diff
Type: text/x-patch
Size: 677 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20181019/d11eb622/attachment.bin>


More information about the wine-devel mailing list