RFC: wintab32: Qt applications crash after WTOpen

Bernhard Übelacker bernhardu at mailbox.org
Thu Sep 13 11:12:42 CDT 2018


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?

Kind regards,
Bernhard

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905090
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-wintab32-Do-not-return-an-uninitialized-record-witho.patch
Type: text/x-patch
Size: 5052 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20180913/8712dacb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-wintab32-Make-WTOpen-return-if-no-usable-device-is-f.patch
Type: text/x-patch
Size: 4495 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20180913/8712dacb/attachment-0001.bin>


More information about the wine-devel mailing list