Description: On pc Debian x86-64 with master sources updated today, I got an assert when clicking on report wizard. Steps to Reproduce: 1. Create a brand new odb file (hsqldb embedded) 2. Click on Create report on design view or Use wizard to create report Actual Results: Assertion Expected Results: No assertion Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Created attachment 136711 [details] bt with debug symbols
Noel: thought you might be interested in this one after https://cgit.freedesktop.org/libreoffice/core/commit/?id=bc9a2ba677ce3fcd46c2bbef6e8faeacb14292c1
Noel: noticing there was a StartListening in SdrMarkView constructor, I tried to add one in destructor too: diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 73a79d4bb983..ee1bf26c2a5b 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -158,6 +158,7 @@ SdrMarkView::SdrMarkView(SdrModel* pModel1, OutputDevice* pOut) SdrMarkView::~SdrMarkView() { + EndListening(*mpModel); // Migrate selections BrkMarkObj(); BrkMarkPoints(); No better. Then, I just commented the line in ReportSection.cxx: diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 81eab1451313..91a624b6b9bf 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -229,7 +229,7 @@ void OReportSection::fill() m_pView->SetDesignMode(); - m_pView->StartListening( *m_pModel ); + //m_pView->StartListening( *m_pModel ); m_pPage->SetSize( Size( getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) ); const Size aPageSize = m_pPage->GetSize(); m_pView->SetWorkArea( tools::Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) ); and finally got report wizard/design opened. Since I don't know how these things work (even after having read the comments of your quoted commit), I haven't submitted them in gerrit.
Taking a look to OReportSection::fill(), I noticed this: m_pModel = m_pParent->getViewsWindow()->getView()->getReportView()->getController().getSdrModel(); (see https://opengrok.libreoffice.org/xref/core/reportdesign/source/ui/report/ReportSection.cxx#185) but controller already uses StartListening: 1737 bool OReportController::Construct(vcl::Window* pParent) 1738 { 1739 VclPtrInstance<ODesignView> pMyOwnView( pParent, m_xContext, *this ); 1740 StartListening( *pMyOwnView ); 1741 setView( pMyOwnView ); 1742 1743 // now that we have a view we can create the clipboard listener 1744 m_aSystemClipboard = TransferableDataHelper::CreateFromSystemClipboard( getView() ); 1745 m_aSystemClipboard.StartClipboardListening( ); 1746 m_pClipboardNotifier = new TransferableClipboardListener( LINK( this, OReportController, OnClipboardChanged ) ); 1747 m_pClipboardNotifier->AddListener( getView() ); 1748 1749 OReportController_BASE::Construct(pParent); 1750 return true; 1751 } (see https://opengrok.libreoffice.org/xref/core/reportdesign/source/ui/report/ReportController.cxx#1737)
grepping call to StartListening in reportdesign and compare with EndListening, I noticed this too: 117 OXUndoEnvironment::OXUndoEnvironment(OReportModel& _rModel) 118 :m_pImpl(new OXUndoEnvironmentImpl(_rModel) ) 119 { 120 StartListening(m_pImpl->m_rModel); 121 } 122 123 124 OXUndoEnvironment::~OXUndoEnvironment() 125 { 126 } (see https://opengrok.libreoffice.org/xref/core/reportdesign/source/core/sdr/UndoEnv.cxx#117) shouldn't we add EndListening in destructor (to have a symetric behavior)?
Forget my comment about removing too StartListening in ReportController my test was wrong, I can still select a table for the report
Noel Grandin committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8481019c8c57459494b931aeec0915317204a05b tdf#112848 Assert when clicking on report wizard or design view It will be available in 6.0.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Noel: since it's an assert only, I suppose we won't backport it to 5.4 branch. So let's put this one to FIXED.
Verified since the patch corresponds to what I had suggested and so tested locally.