summaryrefslogtreecommitdiff
path: root/vcl/source/window/dialog.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-01-21 22:10:09 +0300
committerAron Budea <aron.budea@collabora.com>2018-01-26 19:58:38 +0100
commit5ef05e2b54983a3937c0ecae09ef5808117596b1 (patch)
tree5031f1a1f150f097a673d7df90fe0554779bbf8b /vcl/source/window/dialog.cxx
parent7f7dd572d4fa4a46daff11c5a90655f689641758 (diff)
tdf#38915: set cProcessed condition on any process outcome
When application is initializing, initially request handler is not processing requests (its state is Starting). Requests processing is enabled in Desktop::OpenClients() after recovery had been processed. If another soffice process is started, it communicates over already established pipe, and sends a request to the first process. In IpcThread::process(), it is decided if the request needs to be checked for completion (e.g., if a file or specific module was requested to be open). After that, the prepared request is posted for processing. In case when the completion should be checked, PipeIpcThread::execute() then waits for Processed condition indefinitely. Request is processed in RequestHandler::ExecuteCmdLineRequests, which first checks that handler's state is RequestsEnabled, and if it isn't, then returns. Otherwise, after processing, Processed condition is set. The problem is, thus, in case when the request comes before requests processing is enabled (e.g., when recovery dialog is open): request handler thread waits indefinitely, but the processed condition will not be set. This will not allow to close the pipe to second process, and it will hang indefinitely. The IPC thread will be hung even after user closes recovery dialog, and continues working with program. So, subsequent attempts to open files from file manager (launching new process) will fail, and new zombie soffice processes will wait the first indefinitely. Also, when first process will be closed by user, the deinit sequence will attempt to wait for the IPC thread to finish (in RequestHandler::Disable(), after all visible windows had been closed), which will leave the first process hung, preventing all subsequent attempts to open LibreOffice. This patch ensures that the Processed condition is set at any outcome in RequestHandler::ExecuteCmdLineRequests. Also, it brings (possibly hidden) recovery dialog to front, making the reason why following attempts to open files fail apparent to user. Change-Id: Ibddf7483e5b1d6167ac7f307ea2442119f446129 Reviewed-on: https://gerrit.libreoffice.org/48280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/48292 Tested-by: Aron Budea <aron.budea@collabora.com> (cherry picked from commit 88a37944f55949c122fb4d5b7e504e40f25ed3a8)
Diffstat (limited to 'vcl/source/window/dialog.cxx')
0 files changed, 0 insertions, 0 deletions