Re: Trying to solve a crasher in editeng unit test

2012-04-13 Thread Caolán McNamara
On Thu, 2012-04-12 at 10:14 -0400, Kohei Yoshida wrote:
 On Thu, Apr 12, 2012 at 10:06 AM, Caolán McNamara caol...@redhat.com wrote:
  *mumable* unotest::testDown has its dispose commented out ages ago,
  putting that back in shows some other problems with various mixes of
  global singletons that exist for the duration of a test-suite and the
  per-test globals which get setup and reset for each test.
 
 Yes.  Some of my changes were an attempt to address that

ok, plan b, reorganize matters so that we bootstrap the initial uno
component context once before all tests, and dispose it once after all
tests are complete. Rather than setup/teardown before/after each test
which just doesn't fly so well.

reenabled editeng test again, and await inevitable fallout on some
platform or other.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Trying to solve a crasher in editeng unit test

2012-04-13 Thread Kohei Yoshida
On Fri, Apr 13, 2012 at 8:15 AM, Caolán McNamara caol...@redhat.com wrote:

 Yes.  Some of my changes were an attempt to address that

 ok, plan b, reorganize matters so that we bootstrap the initial uno
 component context once before all tests, and dispose it once after all
 tests are complete. Rather than setup/teardown before/after each test
 which just doesn't fly so well.

Thanks Caolan, for solving this.  I just didn't realize how tangled up
the life cycle of these singleton objects was...

 reenabled editeng test again, and await inevitable fallout on some
 platform or other.

Keeping my fingers crossed. :-)

Kohei
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Trying to solve a crasher in editeng unit test

2012-04-13 Thread Caolán McNamara
On Fri, 2012-04-13 at 12:14 -0400, Kohei Yoshida wrote:
 On Fri, Apr 13, 2012 at 8:15 AM, Caolán McNamara caol...@redhat.com wrote:
  reenabled editeng test again, and await inevitable fallout on some
  platform or other.
 
 Keeping my fingers crossed. :-)

Inevitable platform fallout on windows happened, now fixed I think. At
least the windows tinderboxs stopped bleating at me.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Trying to solve a crasher in editeng unit test

2012-04-12 Thread Stephan Bergmann

On 04/11/2012 10:44 PM, Kohei Yoshida wrote:

On Wed, 2012-04-11 at 21:29 +0100, Caolán McNamara wrote:

On Wed, 2012-04-11 at 15:56 -0400, Kohei Yoshida wrote:

Hey there,

I'm trying to set up a new unit test for the edit engine core, but
struggling with one crasher.


http://cgit.freedesktop.org/libreoffice/core/commit/?id=6089be1a7a17ae849d8793520e9d8d36296ed5cf
 should get you closer anyway, and into a more mundane crash with SfxItemPools


Thanks a lot.  This helps.


Hopefully any fix of yours will also fix the following problem:  My 
local --enable-dbgutil make check build keeps failing with a crash in 
sw_subsequent_rtftok.  Valgrind gives



==32152== Invalid read of size 8
==32152==at 0x12DC7689: SfxItemPool::GetDefaultItem(unsigned short) const 
(/svl/source/items/itempool.cxx:874)
==32152==by 0x12DC6058: SfxItemPool::Put(SfxPoolItem const, unsigned 
short) (/svl/source/items/itempool.cxx:681)
==32152==by 0x12DC5E44: SfxItemPool::Put(SfxPoolItem const, unsigned 
short) (/svl/source/items/itempool.cxx:663)
==32152==by 0x12DDD519: SfxItemSet::Put(SfxPoolItem const, unsigned short) 
(/svl/source/items/itemset.cxx:609)
==32152==by 0x213CB7E5: SfxItemSet::Put(SfxPoolItem const) 
(/solver/unxlngx6/inc/svl/itemset.hxx:150)
==32152==by 0x214DDDA4: 
sdr::properties::TextProperties::ForceDefaultAttributes() 
(/svx/source/sdr/properties/textproperties.cxx:384)
==32152==by 0x214DBC82: 
sdr::properties::DefaultProperties::GetObjectItemSet() const 
(/svx/source/sdr/properties/defaultproperties.cxx:94)
==32152==by 0x215A02D1: SdrObject::GetObjectItemSet() const 
(/svx/source/svdraw/svdobj.cxx:1981)
==32152==by 0x215FB757: SdrTextObj::GetTextLeftDistance() const 
(/svx/source/svdraw/svdotext.cxx:1792)
==32152==by 0x2161D645: SdrTextObj::NbcResize(Point const, Fraction const, 
Fraction const) (/svx/source/svdraw/svdotxtr.cxx:125)
==32152==by 0x215ED66E: SdrPathObj::NbcResize(Point const, Fraction const, 
Fraction const) (/svx/source/svdraw/svdopath.cxx:2370)
==32152==by 0x215EDF95: SdrPathObj::NbcSetSnapRect(Rectangle const) 
(/svx/source/svdraw/svdopath.cxx:2466)
==32152==by 0x2159F3A1: SdrObject::SetSnapRect(Rectangle const) 
(/svx/source/svdraw/svdobj.cxx:1687)
==32152==by 0x217086D4: 
SvxDrawPage::_CreateSdrObject(com::sun::star::uno::Referencecom::sun::star::drawing::XShape
 const) (/svx/source/unodraw/unopage.cxx:518)
==32152==by 0x2185BF74: 
SvxFmDrawPage::_CreateSdrObject(com::sun::star::uno::Referencecom::sun::star::drawing::XShape
 const) (/svx/source/form/fmdpage.cxx:102)
==32152==by 0x1F39D352: 
SwFmDrawPage::_CreateSdrObject(com::sun::star::uno::Referencecom::sun::star::drawing::XShape
 const) (/sw/source/core/unocore/unodraw.cxx:333)
==32152==by 0x21709CEF: 
SvxDrawPage::CreateSdrObject(com::sun::star::uno::Referencecom::sun::star::drawing::XShape
 const) (/svx/source/unodraw/unopage.cxx:850)
==32152==by 0x217071B0: 
SvxDrawPage::add(com::sun::star::uno::Referencecom::sun::star::drawing::XShape 
const) (/svx/source/unodraw/unopage.cxx:246)
==32152==by 0x1F39ED4F: 
SwXDrawPage::add(com::sun::star::uno::Referencecom::sun::star::drawing::XShape 
const) (/sw/source/core/unocore/unodraw.cxx:630)
==32152==by 0x255DA9D7: writerfilter::rtftok::RTFDocumentImpl::popState() 
(/writerfilter/source/rtftok/rtfdocumentimpl.cxx:3299)
==32152==by 0x25614308: writerfilter::rtftok::RTFTokenizer::resolveParse() 
(/writerfilter/source/rtftok/rtftokenizer.cxx:110)
==32152==by 0x255C4960: 
writerfilter::rtftok::RTFDocumentImpl::resolve(writerfilter::Stream) 
(/writerfilter/source/rtftok/rtfdocumentimpl.cxx:548)
==32152==by 0x231E0722: 
RtfFilter::filter(com::sun::star::uno::Sequencecom::sun::star::beans::PropertyValue
 const) (/writerfilter/source/filter/RtfFilter.cxx:99)
==32152==by 0x1C359018: SfxObjectShell::ImportFrom(SfxMedium, bool) 
(/sfx2/source/doc/objstor.cxx:2238)
==32152==by 0x1C351224: SfxObjectShell::DoLoad(SfxMedium*) 
(/sfx2/source/doc/objstor.cxx:730)
==32152==by 0x1C39E867: 
SfxBaseModel::load(com::sun::star::uno::Sequencecom::sun::star::beans::PropertyValue
 const) (/sfx2/source/doc/sfxbasemodel.cxx:1900)
==32152==by 0x1C3EC76C: 
SfxFrameLoader_Impl::load(com::sun::star::uno::Sequencecom::sun::star::beans::PropertyValue 
const, com::sun::star::uno::Referencecom::sun::star::frame::XFrame const) 
(/sfx2/source/view/frmload.cxx:611)
==32152==by 0x1A9C5EC5: framework::LoadEnv::impl_loadContent() 
(/framework/source/loadenv/loadenv.cxx:1160)
==32152==by 0x1A9C2696: framework::LoadEnv::startLoading() 
(/framework/source/loadenv/loadenv.cxx:418)
==32152==by 0x1A9C150C: 
framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Referencecom::sun::star::frame::XComponentLoader
 const, com::sun::star::uno::Referencecom::sun::star::lang::XMultiServiceFactory const, 
rtl::OUString const, rtl::OUString const, int, 
com::sun::star::uno::Sequencecom::sun::star::beans::PropertyValue const) 

Re: Trying to solve a crasher in editeng unit test

2012-04-12 Thread Kohei Yoshida
On Thu, 2012-04-12 at 10:50 +0200, Stephan Bergmann wrote:
 On 04/11/2012 10:44 PM, Kohei Yoshida wrote:
  On Wed, 2012-04-11 at 21:29 +0100, Caolán McNamara wrote:
  On Wed, 2012-04-11 at 15:56 -0400, Kohei Yoshida wrote:
  Hey there,
 
  I'm trying to set up a new unit test for the edit engine core, but
  struggling with one crasher.
 
  http://cgit.freedesktop.org/libreoffice/core/commit/?id=6089be1a7a17ae849d8793520e9d8d36296ed5cf
   should get you closer anyway, and into a more mundane crash with 
  SfxItemPools
 
  Thanks a lot.  This helps.
 
 Hopefully any fix of yours will also fix the following problem:  My 
 local --enable-dbgutil make check build keeps failing with a crash in 
 sw_subsequent_rtftok.  Valgrind gives

Crap.  Maybe a unit test in editeng wasn't such a good idea after all.

Kohei

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Trying to solve a crasher in editeng unit test

2012-04-12 Thread Caolán McNamara
On Thu, 2012-04-12 at 09:46 -0400, Kohei Yoshida wrote:
 Crap.  Maybe a unit test in editeng wasn't such a good idea after all.

I disabled it and backed out a few bit for the moment. I have a fairly
good idea what the various problems are so I might have a go at fixing
it up again in a bit.

*mumable* unotest::testDown has its dispose commented out ages ago,
putting that back in shows some other problems with various mixes of
global singletons that exist for the duration of a test-suite and the
per-test globals which get setup and reset for each test.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Trying to solve a crasher in editeng unit test

2012-04-12 Thread Kohei Yoshida
On Thu, Apr 12, 2012 at 10:06 AM, Caolán McNamara caol...@redhat.com wrote:
 On Thu, 2012-04-12 at 09:46 -0400, Kohei Yoshida wrote:
 Crap.  Maybe a unit test in editeng wasn't such a good idea after all.

 I disabled it and backed out a few bit for the moment. I have a fairly
 good idea what the various problems are so I might have a go at fixing
 it up again in a bit.

 *mumable* unotest::testDown has its dispose commented out ages ago,
 putting that back in shows some other problems with various mixes of
 global singletons that exist for the duration of a test-suite and the
 per-test globals which get setup and reset for each test.

Yes.  Some of my changes were an attempt to address that.  But
apparently my skill is not up for it.

I give up now.  You did the right thing by backing out my changes.

Kohei
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Trying to solve a crasher in editeng unit test

2012-04-11 Thread Caolán McNamara
On Wed, 2012-04-11 at 15:56 -0400, Kohei Yoshida wrote:
 Hey there,
 
 I'm trying to set up a new unit test for the edit engine core, but
 struggling with one crasher.

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6089be1a7a17ae849d8793520e9d8d36296ed5cf
 should get you closer anyway, and into a more mundane crash with SfxItemPools

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice