Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Peter,

On Wed, 2013-04-03 at 21:54 -0400, Peter Foley wrote:
While working on adding more libraries to Library_merged, I ran into
some bizarre crashes in unit tests.

        Glad that the tests are catching these things.

The errors seem to be related to exporting documents.
They only occur when building with --enable-mergelibs.
I've attached a log with backtraces from the segfaults.
My configure args are: --with-system-cairo --enable-mergelibs
--enable-debug CC=clang CXX=clang++
I'm also using the gold linker.
Suggestions as to what might be breaking or how to further debug this
would be greatly appreciated.

        I guess the crash on: FlushData(); is down to it being the first
virtual method touched on that stream - which will in turn try to
de-reference the vtable pointer which is (presuambly) invalid while the
instance itself is not (allowing the earlier members to get touched).

        I'd be inclined to run it under valgrind if you can:

export VALGRIND=memcheck            # for memory checking

        That may help; why it would work under mergedlibs and not elsewhere is
something more of a mystery of course.

        You would hope that gold would warn on multiple definitions of classes
in case that is the problem; things like 'StreamData' in tools/ look a
bit open to duplication ;-) and of course many previously local internal
functions / classes will be pushed into a global scope by the mergelibs
work. The more that goes in the more risk.

        I guess it might be possible to bisect the issue out by chopping stuff
into / out of mergelibs to find the two modules that interfere with each
other somehow - but that'd be quite painful I expect.

        In this case, looking at:

#0  0x00002aaabd442384 in SvStream::Flush (this=0xffff50)
at /home/peter/libreoffice/tools/source/stream/stream.cxx:1475
#1  0x00002aaab4ffc373 in GraphicHelper::getThumbnailFormatFromGDI_Impl
(pMetaFile=0xfbe4d0, bSigned=0 '\000', xStream=uno::Reference to
(XInterface) 0x2aaac3b7de20)
at /home/peter/libreoffice/sfx2/source/doc/graphhelp.cxx:397

        which seems to go wrong pretty quickly with the stream pointer, the
situation looks rather fun :-) I'd be inclined to chase through to see
where the pStream pointer goes wonky in that method personally.

         vcl/source/gdi/cvtgrf.cxx

        is the GraphicConverter impl. that seems to defer to the results of
Application::SetFilterHdl - in a typically obscure chain of calls.

        The test::BootstrapFixture::setup() method does some work around here:

    // Make GraphicConverter work, normally done in
desktop::Desktop::Main()
    Application::SetFilterHdl( LINK( this, test::BootstrapFixture,
ImplInitFilterHdl ) );

        Might be worth digging around there ?

        HTH,

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.