chart::ChartController::queryGL3DChart(): crash on concurrent model close
authorMichael Stahl <mstahl@redhat.com>
Wed, 30 Apr 2014 12:04:14 +0000 (14:04 +0200)
committerMichael Stahl <mstahl@redhat.com>
Fri, 2 May 2014 22:48:13 +0000 (00:48 +0200)
commit45e7b4c18d8061692f753a05283b00f746010916
tree669cb6bb749e6a78781272c1b7c45059a1f22e98
parent66c3d569187c4cef80b9c46ce216a8b2af0ebf02
chart::ChartController::queryGL3DChart(): crash on concurrent model close

As seen in JunitTest_chart2_unoapi
[sch.ChXChartDocument::com::sun::star::beans::XPropertySet]
it is possible that one thread closes the model while the main thread
tries to paint the chart via timeout.
In  chart::ChartController::modeChanged() It's not obviously possible
to lock m_aModelMutex since that might deadlock with SolarMutex.

6  in SolarMutexGuard::SolarMutexGuard (this=0x2b742f846cc0) at /include/vcl/svapp.hxx:1579
7  in (anonymous namespace)::Frame::isActionLocked (this=0x1dbe1b0) at /framework/source/services/frame.cxx:2597
8  in (anonymous namespace)::Frame::close (this=0x1dbe1b0, bDeliverOwnership=0 '\000') at /framework/source/services/frame.cxx:1773
9  in chart::ChartController::notifyClosing (this=0x1e4ec00, rSource=...) at /chart2/source/controller/main/ChartController.cxx:877
10 in apphelper::CloseableLifeTimeManager::impl_doClose (this=0x1e03b98) at /chart2/source/tools/LifeTime.cxx:368
11 in apphelper::CloseableLifeTimeManager::g_close_endTryClose_doClose (this=0x1e03b98) at /chart2/source/tools/LifeTime.cxx:311
12 in chart::ChartModel::close (this=0x1e03ac0, bDeliverOwnership=1 '\001') at /chart2/source/model/main/ChartModel.cxx:654

main thread:

21 in chart::ChartController::TheModel::getModel (this=0x0) at /chart2/source/controller/main/ChartController.hxx:470
22 in chart::ChartController::queryGL3DChart (this=0x1e4ec00) at /chart2/source/controller/main/ChartController.cxx:1398
23 in chart::ChartController::modeChanged (this=0x1e4ec00, rEvent=...) at /chart2/source/controller/main/ChartController.cxx:486
24 in chart::ChartView::impl_notifyModeChangeListener (this=0x1e149f0, rNewMode="valid") at /chart2/source/view/main/ChartView.cxx:2823
25 in chart::ChartView::impl_updateView (this=0x1e149f0) at /chart2/source/view/main/ChartView.cxx:2730
26 in chart::ChartView::update (this=0x1e149f0) at /chart2/source/view/main/ChartView.cxx:2861
27 in chart::ChartController::execute_Paint (this=0x1e4ec00, rRect=Rectangle = {...}) at /chart2/source/controller/main/ChartController_Window.cxx:493
28 in chart::ChartWindow::Paint (this=0x201c970, rRect=Rectangle = {...}) at /chart2/source/controller/main/ChartWindow.cxx:83

Change-Id: Ib99edbb9862bc9dab76ed3e0c21eca5589fe7fdb
chart2/source/controller/main/ChartController.cxx