diff options
author | Jøger Hansegård <joger.hansegard@qt.io> | 2023-09-13 12:54:01 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-09-26 18:51:06 +0000 |
commit | e6bd5f2d21a36c7a8fe2036d09e701aac187b132 (patch) | |
tree | 00fa16969773fecb9ffdffe13c3c5ef7fcd6ce80 | |
parent | 01f75f81414840ea8cbadc79332f6197f637d47a (diff) |
Describe how to deal with COM reentrancy problems in ActiveQt
If two COM objects in two single threaded apartments can communicate and
both objects can initiate a call (typical situation if both client and
server have an user interface), the implementations must deal with
reentrancy problems. This is not always an obvious property of out-of-
process COM servers, and documenting it can help developers to solve or
prevent such issues.
Change-Id: Ibb1bb7e7a58709fdb23feb3ae68c9cbf62200d4b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 8ee924262ebded93dbe7799fd042cc9ccd558bc4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 7da79473fa59e936b06cb7311960e86ed84a1c8f)
-rw-r--r-- | src/activeqt/doc/src/qtaxserver.qdoc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/activeqt/doc/src/qtaxserver.qdoc b/src/activeqt/doc/src/qtaxserver.qdoc index ced88a3..c7fa1ff 100644 --- a/src/activeqt/doc/src/qtaxserver.qdoc +++ b/src/activeqt/doc/src/qtaxserver.qdoc @@ -665,6 +665,17 @@ Attempting to activate an in-process COM server that includes modules such as Qt Quick may result in a crash after unloading the COM server. + \section3 Crash or unexpected behavior during outgoing COM calls + + Be aware that an out-of-process COM server will be processing its message + queue while it is performing an outgoing call to the client. This can lead to + unexpected behavior or crash if the client is at the same time calling the + server. In this situation, the incoming call will be executed in the server + before the outgoing call returns. In particular, if the client closes + an ActiveX control while the control is calling back into the client, this + can lead to crash. Such reentrancy problems can be mitigated using message + filters (IMessageFilter and CoRegisterMessageFilter). + \section2 Debugging Runtime Errors To debug an in-process server in Visual Studio, set the server project |