summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2017-03-29 00:01:04 +0200
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2017-04-04 14:35:16 +0000
commit3ecb9b4bd7dc70664bbb8d7c957ea8dc5015223f (patch)
tree3446bd81bcd905833fb46f1660bb2d6e095d358b /vcl/source/app
parent0144600bf5b5d8093f6a720ad21df221f08bce9e (diff)
tdf#99352: assert on stray VclPtrs past DeInit
- ignore on Windows for now, as it is acting up Change-Id: I98dbb887ed556b58188870c3eb3de1327bc58109 Reviewed-on: https://gerrit.libreoffice.org/35816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/svdata.cxx30
-rw-r--r--vcl/source/app/svmain.cxx42
2 files changed, 59 insertions, 13 deletions
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index b27abd9aa41f..65742be51afa 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -28,14 +28,19 @@
#include <tools/gen.hxx>
#include <uno/current_context.hxx>
-#include <vcl/configsettings.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/wrkwin.hxx>
-#include <vcl/layout.hxx>
#include <vcl/button.hxx>
+#include <vcl/configsettings.hxx>
#include <vcl/dockwin.hxx>
+#include <vcl/layout.hxx>
+#include <vcl/menu.hxx>
#include <vcl/print.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/wrkwin.hxx>
+#include <scrwnd.hxx>
+#include <helpwin.hxx>
+#include <vcl/dialog.hxx>
#include <vcl/virdev.hxx>
#include "salinst.hxx"
#include "salframe.hxx"
@@ -79,14 +84,6 @@ SalSystem* ImplGetSalSystem()
return pSVData->mpSalSystem;
}
-ImplSVGDIData::~ImplSVGDIData()
-{
- // FIXME: deliberately leak any remaining OutputDevice
- // until we have their pGraphics reference counted, doing
- // any disposes so late in shutdown is rather unsafe.
- memset( this, 0, sizeof( ImplSVGDIData ) );
-}
-
void ImplDeInitSVData()
{
ImplSVData* pSVData = ImplGetSVData();
@@ -301,4 +298,11 @@ void LocaleConfigurationListener::ConfigurationChanged( utl::ConfigurationBroadc
AllSettings::LocaleSettingsChanged( nHint );
}
+
+ImplSVData::~ImplSVData() {}
+ImplSVAppData::~ImplSVAppData() {}
+ImplSVGDIData::~ImplSVGDIData() {}
+ImplSVWinData::~ImplSVWinData() {}
+ImplSVHelpData::~ImplSVHelpData() {}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index c97080e46c1c..781f6b707ce1 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -46,6 +46,11 @@
#include <vcl/lazydelete.hxx>
#include <vcl/embeddedfontshelper.hxx>
#include <vcl/debugevent.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/menu.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/print.hxx>
+#include <scrwnd.hxx>
#ifdef _WIN32
#include <svsys.h>
@@ -267,6 +272,17 @@ static bool isInitVCL()
pSVData->mpDefInst != nullptr;
}
+#ifdef DBG_UTIL
+namespace vclmain
+{
+ bool isAlive()
+ {
+ return ImplGetSVData()->mpDefInst;
+ }
+}
+#endif
+
+
bool InitVCL()
{
if( pExceptionHandler != nullptr )
@@ -364,6 +380,7 @@ void DeInitVCL()
::comphelper::JoinAsyncEventNotifiers();
}
ImplSVData* pSVData = ImplGetSVData();
+
// lp#1560328: clear cache before disposing rest of VCL
if(pSVData->mpBlendFrameCache)
pSVData->mpBlendFrameCache->m_aLastResult.Clear();
@@ -545,6 +562,31 @@ void DeInitVCL()
delete pSVData->mpSalTimer;
pSVData->mpSalTimer = nullptr;
+ pSVData->mpDefaultWin = nullptr;
+ pSVData->mpIntroWindow = nullptr;
+ pSVData->maAppData.mpActivePopupMenu = nullptr;
+ pSVData->maAppData.mpWheelWindow = nullptr;
+ pSVData->maGDIData.mpFirstWinGraphics = nullptr;
+ pSVData->maGDIData.mpLastWinGraphics = nullptr;
+ pSVData->maGDIData.mpFirstVirGraphics = nullptr;
+ pSVData->maGDIData.mpLastVirGraphics = nullptr;
+ pSVData->maGDIData.mpFirstPrnGraphics = nullptr;
+ pSVData->maGDIData.mpLastPrnGraphics = nullptr;
+ pSVData->maGDIData.mpFirstVirDev = nullptr;
+ pSVData->maGDIData.mpLastVirDev = nullptr;
+ pSVData->maGDIData.mpFirstPrinter = nullptr;
+ pSVData->maGDIData.mpLastPrinter = nullptr;
+ pSVData->maWinData.mpFirstFrame = nullptr;
+ pSVData->maWinData.mpAppWin = nullptr;
+ pSVData->maWinData.mpActiveApplicationFrame = nullptr;
+ pSVData->maWinData.mpCaptureWin = nullptr;
+ pSVData->maWinData.mpLastDeacWin = nullptr;
+ pSVData->maWinData.mpFirstFloat = nullptr;
+ pSVData->maWinData.mpLastExecuteDlg = nullptr;
+ pSVData->maWinData.mpExtTextInputWin = nullptr;
+ pSVData->maWinData.mpTrackWin = nullptr;
+ pSVData->maWinData.mpAutoScrollWin = nullptr;
+ pSVData->maWinData.mpLastWheelWindow = nullptr;
// Deinit Sal
if (pSVData->mpDefInst)
{