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 12:38:21 +0000 |
commit | 7da79473fa59e936b06cb7311960e86ed84a1c8f (patch) | |
tree | 951007e00a6e71fae1ee8de9d2c36424da85ae2a | |
parent | c656b39932bd6cd3d6182e039d358cbfe2dfc492 (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.
Pick-to: 6.5
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>
-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 |