This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH setup] Don't fatal() on unexpected early window messages
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: cygwin-apps at cygwin dot com
- Cc: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Date: Thu, 9 Nov 2017 09:47:23 +0000
- Subject: [PATCH setup] Don't fatal() on unexpected early window messages
- Authentication-results: sourceware.org; auth=none
There's no good reason for this to be immediately fatal, and we have at
least one report of this happening [1], so don't fatal(), just warn.
[1] https://cygwin.com/ml/cygwin/2017-07/msg00428.html
---
res.rc | 1 -
resource.h | 1 -
window.cc | 4 +++-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/res.rc b/res.rc
index 40e464b..09b3fc0 100644
--- a/res.rc
+++ b/res.rc
@@ -528,7 +528,6 @@ BEGIN
IDS_INSTALL_INCOMPLETE "Installation incomplete. Check %s for details"
IDS_CORRUPT_PACKAGE "Package file %s has a corrupt local copy, please remove and retry."
IDS_SKIP_PACKAGE "%s\nDo you want to skip this package ?"
- IDS_WINDOW_INIT_BADMSG "Fatal Error: Unexpected windows message %u received too early in window initialization."
IDS_UNCAUGHT_EXCEPTION "Fatal Error: Uncaught Exception\nThread: %s\nType: %s\nMessage: %s"
IDS_UNCAUGHT_EXCEPTION_WITH_ERRNO "Fatal Error: Uncaught Exception\nThread: %s\nType: %s\nMessage: %s\nAppErrNo: %d"
IDS_TRUSTKEEP_TOOLTIP "Sets all packages to their currently installed "
diff --git a/resource.h b/resource.h
index b6685e5..fdebc8f 100644
--- a/resource.h
+++ b/resource.h
@@ -20,7 +20,6 @@
#define IDS_REBOOT_REQUIRED 118
#define IDS_CORRUPT_PACKAGE 119
#define IDS_INSTALL_ERROR 120
-#define IDS_WINDOW_INIT_BADMSG 121
#define IDS_UNCAUGHT_EXCEPTION 122
#define IDS_UNCAUGHT_EXCEPTION_WITH_ERRNO 123
#define IDS_SKIP_PACKAGE 124
diff --git a/window.cc b/window.cc
index d97ef6a..c4006d6 100644
--- a/window.cc
+++ b/window.cc
@@ -79,7 +79,9 @@ Window::FirstWindowProcReflector (HWND hwnd, UINT uMsg, WPARAM wParam,
else
{
// Should never get here.
- fatal(NULL, IDS_WINDOW_INIT_BADMSG, uMsg);
+ Log (LOG_PLAIN) << "Warning: Unexpected windows message " << uMsg
+ << "received early in window initialization."
+ << endLog;
}
return wnd->WindowProc (uMsg, wParam, lParam);
--
2.15.0