[PATCH 1/5] msi/tests: Work around a hang on Windows.

Zebediah Figura z.figura12 at gmail.com
Mon Jul 3 21:29:48 CDT 2017


It's unclear why this hang occurs. It doesn't affect the TERMINATE
message sent upon opening an invalid package. At a best guess some
bug in MSI causes a thread lock when the package has been closed
and the external UI thread attempts to access the API.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
This is a resend with this patch attached first; the other patches
in this series have not been changed.

 dlls/msi/tests/package.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index a46bb20..720be58 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -9343,6 +9343,13 @@ static INT CALLBACK externalui_message_callback(void *context, UINT message, MSI
     int i;
 
     msg.message = message;
+    if (message == INSTALLMESSAGE_TERMINATE)
+    {
+        /* trying to access the record seems to hang on some versions of Windows */
+        msg.field_count = -1;
+        add_message(&msg);
+        return 1;
+    }
     msg.field_count = MsiRecordGetFieldCount(hrecord);
     for (i = 0; i <= msg.field_count; i++)
     {
-- 
2.7.4




More information about the wine-patches mailing list