summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-03-10 18:46:07 +0100
committerMichael Stahl <mstahl@redhat.com>2018-03-13 21:08:16 +0100
commit96cd4feb3ae133c19808ca0df2dab02595bb5588 (patch)
tree7935e40939a4fc6bb1b0865ceb4588b5288baae3
parentb8345af80078f9eee29a391fe84b2506b37d24ea (diff)
tdf#115649: ensure we own SolarMutex in the callback
The crash is caused by releasing SolarMutex we don't own; the release happens in Application::Reschedule() inside SalPrintAbortProc. The crashing callstack: ucrtbase.dll!abort() mergedlo.dll!comphelper::GenericSolarMutex::doRelease(bool bUnlockAll) Line 72 mergedlo.dll!SalYieldMutex::doRelease(bool bUnlockAll) Line 177 [Inline Frame] mergedlo.dll!SolarMutexReleaser::{ctor}() Line 1473 mergedlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 550 mergedlo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 469 mergedlo.dll!SalPrintAbortProc(HDC__ * hPrnDC, int __formal) Line 1308 gdi32full.dll!vSAPCallback() gdi32full.dll!ExtEscapeImpl() gdi32.dll!ExtEscape() [Frames may be missing, no binary loaded for KMUU727V.DLL] KMUU727V.DLL!0000000011d0dc21() Change-Id: I955eab7894186900d0d99e28f62d87cc645e4a5a Reviewed-on: https://gerrit.libreoffice.org/51052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 43bf50d5ced4b878f747075f8c0f1b32991c290e) Reviewed-on: https://gerrit.libreoffice.org/51153 Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--vcl/win/gdi/salprn.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index a961bbf4ace2..2ad7e345f8f9 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1300,6 +1300,8 @@ BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
WinSalPrinter* pPrinter;
bool bWhile = true;
+ // Ensure we handle the mutex which will be released in WinSalInstance::DoYield
+ SolarMutexGuard aSolarMutexGuard;
do
{
// process messages