Apache OpenOffice (AOO) Bugzilla – Issue 74133
new chart: Writer should make use of createInternalDataProvider where possible
Last modified: 2013-08-07 14:42:39 UTC
When a table is to be deleted completely createInternalDataProvider should be called whereever it is possible. In cases where this can not easily be achieved all data-sequence of that table should dipose.
There are several case to check this functionality: - select some paragraphs before and after the table and press delete - select all cell of a table and press delete - select a column and call delete-rows (this is similar to: select a row and call delete-cols) - convert table to text - delete the table via use of the navigator - merge two tables where both have a chart on their own
TL->BM: I also made the changes to detectArguments and introduced DisposedExceptions. If you take care of the DisposedExceptions everything should be fine.
TL->BM: Please take over. Thanks!
The chart now listens to disposing and forgets the sequences if they were disposed of. This way the exception are not thrown. Catching DisposedExceptions at every place where data is retrieved would be far too much places to adapt. ->TL: Please have a look at the method SwChartDataProvider::DisposeAllDataSequences() in unochart.cxx:1553. I got a crash in this line, I don't know exactly from what part of the calls in this line, but the method was entered via the DTOR SwDoc::~SwDoc. At least it looks strange to me that while the document is in the DTOR, you call GetDoc() here without checking. I also saw some timer, for the unlocking of controllers, maybe the unlock is triggered after everything else has been destroyed. For checking do an update in chart2 before (and unochart.cxx, in sw where I removed the debug-only code that caused a crash due to an exception)
.
The 'shut-down' of the chart related data-structures is now done in the ~SwDocShell which should be in time to avoid problems. Also I provided the objects that locks the chart controllers with an explicit function to stop the timer, unlock the controllers and forget the document pointer used to update the charts. Fixed in CWS chart2mst3. Files changed: - sw/inc/unochart.hxx - sw/source/core/doc/docnew.cxx - sw/source/core/unocore/unochart.cxx - sw/source/ui/app/docshini.cxx
Tl->BM: please verify since this is nothing QA can easily hope to reproduce.
I got the crash quite well reproducable: 1. Create a Writer Table 2. Create a chart from the table 3. Convert the Table to Text 4. Close the Document without saving => GPF
Still crashes in the course of ~SwDocShell -> SwDataprovider::dispose -> DisposeAllDataSequences
->TL: Please try again. I think you should be able to reproduce the crash as described before.
TL->BM: Please check.
TL->MRU: Please take over. Thanks!
changed summary to start with 'new chart:', set keyword and changed issue type to reflect that this issue did only occur in the new chart and did not affect the master branch
Verified fix in CWS chart2mst3.
Checked in 680m222.