[Libreoffice-bugs] [Bug 53154] Closing Report Wizard crashes LibreOffice

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Aug 7 17:33:16 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=53154

--- Comment #15 from Stephan Bergmann <sbergman at redhat.com> 2012-08-07 15:33:16 UTC ---
Created attachment 65241
  --> https://bugs.freedesktop.org/attachment.cgi?id=65241
debug code to demonstrate aggregation violation

The attached aggregation-violation.patch demonstrates that
reportdesign::OSection delegating to an SvxFmDrawPage (held as mxUnoPage by an
SdrPage derivate) violates the XAggregation requirement that:  "All calls to
XInterface::acquire() which are made before the delegator was set (using the
method XAggregation::setDelegator()) must not be taken back (using the method
XInterface::release()) before the delegation is removed by calling
xAggregation->setDelegator(NULL)." [udkapi/com/sun/star/uno/XAggregation.idl]

debug: SdrPage::getUnoPage mxUnoPage acquire, 0x7f5d78d985d0
debug: OSection::init m_xProxy set delegator, 0x7f5d78d985f0
debug: OSection::~OSection m_xProxy reset delegator, 0x7f5d78d985f0
debug: SdrPage::~SdrPage mxUnoPage release, 0x7f5d78d985d0
debug: SdrPage::getUnoPage mxUnoPage acquire, 0x7f5d78d94ac0
debug: OSection::init m_xProxy set delegator, 0x7f5d78d94ae0
debug: SdrPage::getUnoPage mxUnoPage acquire, 0x7f5d78d945c0
debug: OSection::init m_xProxy set delegator, 0x7f5d78d945e0
debug: SdrPage::getUnoPage mxUnoPage acquire, 0x7f5d78d940c0
debug: OSection::init m_xProxy set delegator, 0x7f5d78d940e0
debug: SdrPage::getUnoPage mxUnoPage acquire, 0x7f5d78d99998
debug: OSection::init m_xProxy set delegator, 0x7f5d78d999b8
debug: SdrPage::getUnoPage mxUnoPage acquire, 0x7f5d7806a338
debug: OSection::init m_xProxy set delegator, 0x7f5d7806a358
debug: SdrPage::getUnoPage mxUnoPage acquire, 0x7f5d7806a5b8
debug: OSection::init m_xProxy set delegator, 0x7f5d7806a5d8
debug: SdrPage::~SdrPage mxUnoPage release, 0x7f5d7806a5b8
debug: SdrPage::~SdrPage mxUnoPage release, 0x7f5d7806a338
debug: SdrPage::~SdrPage mxUnoPage release, 0x7f5d78d99998
debug: SdrPage::~SdrPage mxUnoPage release, 0x7f5d78d940c0
debug: SdrPage::~SdrPage mxUnoPage release, 0x7f5d78d945c0
debug: SdrPage::~SdrPage mxUnoPage release, 0x7f5d78d94ac0
debug: OSection::~OSection m_xProxy reset delegator, 0x7f5d78d94ae0
pure virtual method called
terminate called without an active exception

The first usage of SvxFmDrawPage 0x7f5d78d985d0 (resp. 0x7f5d78d985f0) is OK,
SdrPage acquires/releases its mxUnoPage strictly outside the timespan where
OSection is set as delegator at its m_xProxy.

However, the next usage of SvxFmDrawPage 0xf5d78d94ac0 (resp. 0xf5d7894ae0) is
broken, as SdrPage releases its mxUnoPage within the timespan where OSection is
set as delegator at its m_xProxy.

(An SdrPage's mxUnoPage and the corresponding OSection's m_xProxy point at
common SvxFmDrawPage instance, the slight 0x20 offset in reported this pointers
is due to the this pointers being reported at different points in the
derivation hierarchy of SvxFmDrawPage.)

Not knowing the relevant svx and reportdesign code, I do not see an obvious fix
for this problem.  The best fix would be to abandon aggregation, as it is known
to be broken in general (as one has to observe these picky rules) and
deprecated.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Libreoffice-bugs mailing list