Issue 119653 - [From Symphony]Crash after delete column(s) from chart's source table, and then adjusted table size
Summary: [From Symphony]Crash after delete column(s) from chart's source table, and th...
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: 3.4.0
Hardware: PC All
: P3 Critical (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2012-06-01 02:58 UTC by Yan Ji
Modified: 2012-10-09 09:38 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

patch for bug 119653 (1.24 KB, patch)
2012-06-01 06:32 UTC, Chen Peng
chenpeng2006: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Yan Ji 2012-06-01 02:58:03 UTC
Build: AOO3.4
OS: All
1. New a document.
2. Insert a table then input some data.
3. Create a chart using the table as its data source.
4. Delete a column of table.
5. Drog to adjust columns width of table
Comment 1 Chen Peng 2012-06-01 06:11:47 UTC
Root Cause:
The crash happens because of an exception was thrown out in SwChartDataSequence::SetModified(), just because the SwCharDataSequence object has been disposed.
The source code is located in main/sw/source/core/unocore/unochart.cxx.
void SAL_CALL SwChartDataSequence::setModified(::sal_Bool bModified )
    throw (beans::PropertyVetoException, uno::RuntimeException)
    vos::OGuard aGuard( Application::GetSolarMutex() );
    if (bDisposed)
        throw lang::DisposedException();

    if (bModified)
		LaunchModifiedEvent( aModifyListeners, dynamic_cast< XModifyBroadcaster * >(this) );

Actually, the former design of SwClient will disband itself from the notification list in its destruction. But the SwCharDataSeqence won't be destructed but just disposed in code (the data member SwChartDataSequence::bDisposed will be set to TRUE), the relationship between client and modification are not released. So any notification from modify object will lead this crash.

Recorrect the logic of code in SwChartDataSequence::Dispose(), release the relationship inside..
Comment 2 Chen Peng 2012-06-01 06:32:09 UTC
Created attachment 77884 [details]
patch for bug 119653
Comment 3 jsc 2012-06-08 08:56:21 UTC
reviewed, built and tested, no crash anymore, patch applied to trunk

trunk -> revision 1347951
Comment 4 binguo 2012-06-19 07:00:14 UTC
Verified it on Aoo_Trunk_20120616.1800.1350879 and it does not reproduce, so close it as fixed.
Comment 5 Shenfeng Liu 2012-10-09 09:38:15 UTC
set Target Milestone to AOO 3.5.0 for PM purpose.