Bug 57055 - raptor does not reset xmlSetStructuredErrorFunc, leading to crash on exit from liblangtag
Summary: raptor does not reset xmlSetStructuredErrorFunc, leading to crash on exit fro...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.0.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-13 08:59 UTC by Stephan Bergmann
Modified: 2012-11-14 14:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Bergmann 2012-11-13 08:59:57 UTC
At least observed a crash in automatic smoketest once with --enable-dbgutil unxlngx6 master (towards LO 4.0) at

> #0  0x00002b97dc900622 in raptor_parse_abort (rdf_parser=0xff) at raptor_parse.c:1649
> #1  0x00002b97dc259f19 in librdf_parser_raptor_error_handler (data=0x43d0bf0, locator=0x44f3ac8, message=0x48f93c0 "XML checking error: Name is not from the document dictionnary 'extension'") at rdf_parser_raptor.c:362
> #2  0x00002b97dc9081df in raptor_log_error (level=RAPTOR_LOG_LEVEL_ERROR, handler=0x2b97dc259ef0 <librdf_parser_raptor_error_handler>, handler_data=0x43d0bf0, locator=0x44f3ac8, message=0x48f93c0 "XML checking error: Name is not from the document dictionnary 'extension'") at raptor_general.c:450
> #3  0x00002b97dc9173c7 in raptor_libxml_xmlStructuredErrorFunc (user_data=0x44f3bd0, err=0x2b979c1b1920) at raptor_libxml.c:800
> #4  0x00002b979be32667 in __xmlRaiseError (schannel=0x2b97dc91701a <raptor_libxml_xmlStructuredErrorFunc>, channel=0x2b97dce81070 <XPath::generic_error_func(void*, char const*, ...)>, data=0x44f3bd0, ctx=0x0, nod=0x2881e48, domain=24, code=5035, level=XML_ERR_ERROR, file=0x0, line=10, str1=0x0, str2=0x0, str3=0x0, int1=0, col=0, msg=0x2b979bf72eb8 "Name is not from the document dictionnary '%s'") at error.c:614
> #5  0x00002b979be996a0 in xmlDebugErr3 (ctxt=0x7fffcfc03880, error=5035, msg=0x2b979bf72eb8 "Name is not from the document dictionnary '%s'", extra=0x2881d48 "extension") at debugXML.c:181
> #6  0x00002b979be998b2 in xmlCtxtCheckName (ctxt=0x7fffcfc03880, name=0x2881d48 "extension") at debugXML.c:265
> #7  0x00002b979be99cdd in xmlCtxtGenericNodeCheck (ctxt=0x7fffcfc03880, node=0x2881c18) at debugXML.c:366
> #8  0x00002b979be9b159 in xmlCtxtDumpAttr (ctxt=0x7fffcfc03880, attr=0x2881c18) at debugXML.c:849
> #9  0x00002b979be9b183 in xmlCtxtDumpAttrList (ctxt=0x7fffcfc03880, attr=0x2881c18) at debugXML.c:864
> #10 0x00002b979be9b902 in xmlCtxtDumpOneNode (ctxt=0x7fffcfc03880, node=0x2881e48) at debugXML.c:1027
> #11 0x00002b979be9ba70 in xmlCtxtDumpNode (ctxt=0x7fffcfc03880, node=0x2881e48) at debugXML.c:1070
> #12 0x00002b979be9baf8 in xmlCtxtDumpNodeList (ctxt=0x7fffcfc03880, node=0x2881e48) at debugXML.c:1091
> #13 0x00002b979be9babd in xmlCtxtDumpNode (ctxt=0x7fffcfc03880, node=0x287e4d8) at debugXML.c:1074
> #14 0x00002b979be9baf8 in xmlCtxtDumpNodeList (ctxt=0x7fffcfc03880, node=0x287e4d8) at debugXML.c:1091
> #15 0x00002b979be9babd in xmlCtxtDumpNode (ctxt=0x7fffcfc03880, node=0x27d2178) at debugXML.c:1074
> #16 0x00002b979be9baf8 in xmlCtxtDumpNodeList (ctxt=0x7fffcfc03880, node=0x27d2178) at debugXML.c:1091
> #17 0x00002b979be9c011 in xmlCtxtDumpDocument (ctxt=0x7fffcfc03880, doc=0x27bfaf8) at debugXML.c:1225
> #18 0x00002b979be9cb18 in xmlDebugCheckDocument__internal_alias (output=0x3f745b1180, doc=0x27bfaf8) at debugXML.c:1583
> #19 0x00002b979be5fe59 in xmlFreeDoc__internal_alias (cur=0x27bfaf8) at tree.c:1193
> #20 0x00002b979bbeb382 in lt_mem_unref (object=0x10a4de0) at lt-mem.c:190
> #21 0x00002b979bbeb382 in lt_mem_unref (object=0x40a1050) at lt-mem.c:190
> #22 0x00002b979bbec10a in lt_redundant_db_unref (redundantdb=<optimized out>) at lt-redundant-db.c:240
> #23 0x00002b979bbe6618 in lt_db_finalize () at lt-database.c:115
> #24 0x00002b9798156f34 in teardown (this=<optimized out>) at lo/core/i18npool/source/languagetag/languagetag.cxx:101
> #25 decRef (this=<optimized out>) at lo/core/i18npool/source/languagetag/languagetag.cxx:62
> #26 LiblantagDataRef::~LiblantagDataRef (this=0x2b979835d670, __in_chrg=<optimized out>) at lo/core/i18npool/source/languagetag/languagetag.cxx:87
> #27 0x0000003f74238f5a in __cxa_finalize (d=0x2b979835d0a0) at cxa_finalize.c:56
> #28 0x00002b9798155093 in __do_global_dtors_aux () from lo/core/solver/unxlngx6/installation/opt/program/libi18nisolang1gcc3.so
> #29 0x00007fffcfc04110 in ?? ()
> #30 0x0000003f73e0f4e7 in _dl_fini () at dl-fini.c:254

The reason appears to be that raptor calls libxml2's xmlSetStructuredErrorFunc to set its raptor_libxml_xmlStructuredErrorFunc (redland/*/misc/build/raptor-1.4.18/src/raptor_{grddl,sax2}.c), but does not necessarily call xmlSetStructruredErrorFunc again to reset it to null.  Indeed, running soffice.bin under gdb, opening some .odt file and then closing soffice.bin, breaking gdb on xmlSetStructedErrorFunc hits in two places during file open to set raptor_libxml_xmlStructuredErrorFunc (see below), but never afterwards to reset it again (i.e., no call to raptor_finish -> raptor_sax2_finish -> xmlSetStructuredErrorHandler(NULL, NULL)).

> #0  xmlSetStructuredErrorFunc__internal_alias (ctx=0x48280d8, handler=0x7fffb74f701a <raptor_libxml_xmlStructuredErrorFunc>) at error.c:135
> #1  0x00007fffb74fcff8 in raptor_new_sax2 (user_data=0x48f5ad0, error_handlers=0x48f5be0) at raptor_sax2.c:107
> #2  0x00007fffb74f82fa in raptor_rdfxml_parse_init (rdf_parser=0x48f5ad0, name=0x44a09c0 "rdfxml") at raptor_rdfxml.c:1028
> #3  0x00007fffb74df03b in raptor_new_parser (name=0x44a09c0 "rdfxml") at raptor_parse.c:511
> #4  0x00007fffb79a73d5 in librdf_parser_raptor_init (parser=<optimized out>, context=0x48162b0) at rdf_parser_raptor.c:129
> #5  0x00007fffb79a5c09 in librdf_new_parser_from_factory (world=0x4827a40, factory=0x44a08f0) at rdf_parser.c:352
> #6  0x00007fffb7bd50e8 in (anonymous namespace)::librdf_Repository::importGraph (this=0x7fffe23487b0, i_Format=<optimized out>, i_xInStream=uno::Reference to {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8dd3f0}, <No data fields>}, i_xGraphName=uno::Reference to {<com::sun::star::rdf::XResource> = {<com::sun::star::rdf::XNode> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffb7df60b0}, <No data fields>}, <No data fields>}, <No data fields>}, i_xBaseURI=...) at lo/core/unoxml/source/rdf/librdf_repository.cxx:956
> #7  0x00007ffff65f6e98 in sfx2::readStream (i_rImpl=..., i_xStorage=uno::Reference to {<com::sun::star::container::XNameAccess> = {<com::sun::star::container::XElementAccess> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8dfdf0}, <No data fields>}, <No data fields>}, <com::sun::star::lang::XComponent> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8e0060}, <No data fields>}, <No data fields>}, i_rPath="manifest.rdf", i_rBaseURI="file://Documents/fofo.odt/") at lo/core/sfx2/source/doc/DocumentMetadataAccess.cxx:539
> #8  0x00007ffff65f7b60 in sfx2::initLoading (i_rImpl=..., i_xStorage=uno::Reference to {<com::sun::star::container::XNameAccess> = {<com::sun::star::container::XElementAccess> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8dfdf0}, <No data fields>}, <No data fields>}, <com::sun::star::lang::XComponent> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8e0060}, <No data fields>}, <No data fields>}, i_xBaseURI=uno::Reference to {<com::sun::star::rdf::XResource> = {<com::sun::star::rdf::XNode> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffb7df60b0}, <No data fields>}, <No data fields>}, <No data fields>}, i_xHandler=uno::Reference to {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffc1d66a30}, <No data fields>}) at lo/core/sfx2/source/doc/DocumentMetadataAccess.cxx:711
> #9  0x00007ffff65fb882 in sfx2::DocumentMetadataAccess::loadMetadataFromStorage (this=0x7fffe008d9e8, i_xStorage=uno::Reference to {<com::sun::star::container::XNameAccess> = {<com::sun::star::container::XElementAccess> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8dfdf0}, <No data fields>}, <No data fields>}, <com::sun::star::lang::XComponent> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8e0060}, <No data fields>}, <No data fields>}, i_xBaseURI=uno::Reference to {<com::sun::star::rdf::XResource> = {<com::sun::star::rdf::XNode> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffb7df60b0}, <No data fields>}, <No data fields>}, <No data fields>}, i_xHandler=uno::Reference to {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffc1d66a30}, <No data fields>}) at lo/core/sfx2/source/doc/DocumentMetadataAccess.cxx:1110
> #10 0x00007ffff6702eee in SfxBaseModel::loadMetadataFromStorage (this=0x7fffd0c00940, i_xStorage=uno::Reference to {<com::sun::star::container::XNameAccess> = {<com::sun::star::container::XElementAccess> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8dfdf0}, <No data fields>}, <No data fields>}, <com::sun::star::lang::XComponent> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8e0060}, <No data fields>}, <No data fields>}, i_xBaseURI=uno::Reference to {<com::sun::star::rdf::XResource> = {<com::sun::star::rdf::XNode> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffb7df60b0}, <No data fields>}, <No data fields>}, <No data fields>}, i_xHandler=uno::Reference to {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffc1d66a30}, <No data fields>}) at lo/core/sfx2/source/doc/sfxbasemodel.cxx:4605
> #11 0x00007fffc0f90838 in XMLReader::Read (this=0x470efb0, rDoc=..., rBaseURL=..., rPaM=SwPaM = {...}, rName="") at lo/core/sw/source/filter/xml/swxml.cxx:887
> #12 0x00007fffc0ea5c2d in SwReader::Read (this=0x7fffffffc700, rOptions=...) at lo/core/sw/source/filter/basflt/shellio.cxx:186
> #13 0x00007fffc0ff7ffb in SwDocShell::Load (this=0x493be40, rMedium=...) at lo/core/sw/source/ui/app/docshini.cxx:593
> #14 0x00007ffff66b1b82 in SfxObjectShell::LoadOwnFormat (this=0x493be40, rMedium=...) at lo/core/sfx2/source/doc/objstor.cxx:3003
> #15 0x00007ffff66c059a in SfxObjectShell::DoLoad (this=0x493be40, pMed=0x4431bf0) at lo/core/sfx2/source/doc/objstor.cxx:673
> #16 0x00007ffff670f970 in SfxBaseModel::load (this=0x7fffd0c00940, seqArguments=uno::Sequence of length 11 = {...}) at lo/core/sfx2/source/doc/sfxbasemodel.cxx:1936
> #17 0x00007ffff6767dd0 in SfxFrameLoader_Impl::load (this=0x7fffbd97cd90, rArgs=..., _rTargetFrame=uno::Reference to {<com::sun::star::lang::XComponent> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffe1bae630}, <No data fields>}, <No data fields>}) at lo/core/sfx2/source/view/frmload.cxx:598
> #18 0x00007fffe179b5d3 in framework::LoadEnv::impl_loadContent (this=this@entry=0x7fffe40403a0) at lo/core/framework/source/loadenv/loadenv.cxx:1146
> #19 0x00007fffe179be58 in framework::LoadEnv::startLoading (this=0x7fffe40403a0) at lo/core/framework/source/loadenv/loadenv.cxx:408
> #20 0x00007fffe17022ae in framework::LoadDispatcher::impl_dispatch (this=0x7fffe4040308, rURL=..., lArguments=uno::Sequence of length 3 = {...}, xListener=empty uno::Reference) at lo/core/framework/source/dispatch/loaddispatcher.cxx:130
> #21 0x00007fffe1702814 in framework::LoadDispatcher::dispatch (this=<optimized out>, aURL=..., lArguments=...) at lo/core/framework/source/dispatch/loaddispatcher.cxx:69
> #22 0x00007fffe17c47dd in implDispatchDelayed (pArg=0x4454410) at lo/core/framework/source/services/backingwindow.cxx:1001
> #23 0x00007ffff44066cc in Call (pCaller=<optimized out>, this=<optimized out>) at lo/core/solver/unxlngx6/inc/tools/link.hxx:123
> #24 ImplHandleUserEvent (pSVEvent=0x4453ba0) at lo/core/vcl/source/window/winproc.cxx:1987
> #25 ImplWindowFrameProc (pWindow=<optimized out>, nEvent=22, pEvent=0x4453ba0) at lo/core/vcl/source/window/winproc.cxx:2559
> #26 0x00007ffff4413b01 in CallCallback (pEvent=<optimized out>, nEvent=22, this=0x41447a0) at lo/core/vcl/inc/salframe.hxx:269
> #27 SalGenericDisplay::DispatchInternalEvent (this=<optimized out>) at lo/core/vcl/generic/app/gendisp.cxx:92
> #28 0x00007fffe6f69386 in GtkData::userEventFn (data=data@entry=0x6123b0) at lo/core/vcl/unx/gtk/app/gtkdata.cxx:945
> #29 0x00007fffe6f693f9 in call_userEventFn (data=0x6123b0) at lo/core/vcl/unx/gtk/app/gtkdata.cxx:955
> #30 0x0000003f75e47825 in g_main_dispatch (context=0x65a2f0) at gmain.c:2539
> #31 g_main_context_dispatch (context=context@entry=0x65a2f0) at gmain.c:3075
> #32 0x0000003f75e47b58 in g_main_context_iterate (context=context@entry=0x65a2f0, block=block@entry=0, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3146
> #33 0x0000003f75e47c14 in g_main_context_iteration (context=0x65a2f0, may_block=0) at gmain.c:3207
> #34 0x00007fffe6f690e1 in GtkData::Yield (this=0x6123b0, bWait=true, bHandleAllCurrentEvents=<optimized out>) at lo/core/vcl/unx/gtk/app/gtkdata.cxx:582
> #35 0x00007ffff405bcd4 in ImplYield (i_bAllEvents=false, i_bWait=true) at lo/core/vcl/source/app/svapp.cxx:425
> #36 Application::Yield (i_bAllEvents=false) at lo/core/vcl/source/app/svapp.cxx:459
> #37 0x00007ffff405bd77 in Application::Execute () at lo/core/vcl/source/app/svapp.cxx:404
> #38 0x00007ffff7b01c95 in desktop::Desktop::Main (this=0x7fffffffe4c0) at lo/core/desktop/source/app/app.cxx:1713
> #39 0x00007ffff4063d31 in ImplSVMain () at lo/core/vcl/source/app/svmain.cxx:162
> #40 0x00007ffff4063dc5 in SVMain () at lo/core/vcl/source/app/svmain.cxx:199
> #41 0x00007ffff7b39c65 in soffice_main () at lo/core/desktop/source/app/sofficemain.cxx:83
> #42 0x00000000004007cb in sal_main () at lo/core/desktop/source/app/main.c:48
> #43 main (argc=<optimized out>, argv=<optimized out>) at lo/core/desktop/source/app/main.c:47

> #0  xmlSetStructuredErrorFunc__internal_alias (ctx=0x48f5be0, handler=0x7fffb74f701a <raptor_libxml_xmlStructuredErrorFunc>) at error.c:135
> #1  0x00007fffb74fd597 in raptor_sax2_parse_start (sax2=0x4827f60, base_uri=0x4816190) at raptor_sax2.c:463
> #2  0x00007fffb74f87e8 in raptor_rdfxml_parse_start (rdf_parser=0x48f5ad0) at raptor_rdfxml.c:1131
> #3  0x00007fffb74df190 in raptor_start_parse (rdf_parser=0x48f5ad0, uri=0x4816190) at raptor_parse.c:580
> #4  0x00007fffb79a7be4 in librdf_parser_raptor_parse_as_stream_common (context=0x48162b0, uri=0x0, string=0x7fffbd9b2410 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n  <rdf:Description rdf:about=\"styles.xml\">\n    <rdf:type rdf:resource=\"http://docs.oasis-open.o"..., length=899, base_uri=0x4816190) at rdf_parser_raptor.c:711
> #5  0x00007fffb7bd523c in (anonymous namespace)::librdf_Repository::importGraph (this=0x7fffe23487b0, i_Format=<optimized out>, i_xInStream=uno::Reference to {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8dd3f0}, <No data fields>}, i_xGraphName=uno::Reference to {<com::sun::star::rdf::XResource> = {<com::sun::star::rdf::XNode> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffb7df60b0}, <No data fields>}, <No data fields>}, <No data fields>}, i_xBaseURI=...) at lo/core/unoxml/source/rdf/librdf_repository.cxx:976
> #6  0x00007ffff65f6e98 in sfx2::readStream (i_rImpl=..., i_xStorage=uno::Reference to {<com::sun::star::container::XNameAccess> = {<com::sun::star::container::XElementAccess> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8dfdf0}, <No data fields>}, <No data fields>}, <com::sun::star::lang::XComponent> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8e0060}, <No data fields>}, <No data fields>}, i_rPath="manifest.rdf", i_rBaseURI="file://Documents/fofo.odt/") at lo/core/sfx2/source/doc/DocumentMetadataAccess.cxx:539
> #7  0x00007ffff65f7b60 in sfx2::initLoading (i_rImpl=..., i_xStorage=uno::Reference to {<com::sun::star::container::XNameAccess> = {<com::sun::star::container::XElementAccess> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8dfdf0}, <No data fields>}, <No data fields>}, <com::sun::star::lang::XComponent> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8e0060}, <No data fields>}, <No data fields>}, i_xBaseURI=uno::Reference to {<com::sun::star::rdf::XResource> = {<com::sun::star::rdf::XNode> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffb7df60b0}, <No data fields>}, <No data fields>}, <No data fields>}, i_xHandler=uno::Reference to {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffc1d66a30}, <No data fields>}) at lo/core/sfx2/source/doc/DocumentMetadataAccess.cxx:711
> #8  0x00007ffff65fb882 in sfx2::DocumentMetadataAccess::loadMetadataFromStorage (this=0x7fffe008d9e8, i_xStorage=uno::Reference to {<com::sun::star::container::XNameAccess> = {<com::sun::star::container::XElementAccess> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8dfdf0}, <No data fields>}, <No data fields>}, <com::sun::star::lang::XComponent> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8e0060}, <No data fields>}, <No data fields>}, i_xBaseURI=uno::Reference to {<com::sun::star::rdf::XResource> = {<com::sun::star::rdf::XNode> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffb7df60b0}, <No data fields>}, <No data fields>}, <No data fields>}, i_xHandler=uno::Reference to {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffc1d66a30}, <No data fields>}) at lo/core/sfx2/source/doc/DocumentMetadataAccess.cxx:1110
> #9  0x00007ffff6702eee in SfxBaseModel::loadMetadataFromStorage (this=0x7fffd0c00940, i_xStorage=uno::Reference to {<com::sun::star::container::XNameAccess> = {<com::sun::star::container::XElementAccess> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8dfdf0}, <No data fields>}, <No data fields>}, <com::sun::star::lang::XComponent> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffbd8e0060}, <No data fields>}, <No data fields>}, i_xBaseURI=uno::Reference to {<com::sun::star::rdf::XResource> = {<com::sun::star::rdf::XNode> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffb7df60b0}, <No data fields>}, <No data fields>}, <No data fields>}, i_xHandler=uno::Reference to {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffc1d66a30}, <No data fields>}) at lo/core/sfx2/source/doc/sfxbasemodel.cxx:4605
> #10 0x00007fffc0f90838 in XMLReader::Read (this=0x470efb0, rDoc=..., rBaseURL=..., rPaM=SwPaM = {...}, rName="") at lo/core/sw/source/filter/xml/swxml.cxx:887
> #11 0x00007fffc0ea5c2d in SwReader::Read (this=0x7fffffffc700, rOptions=...) at lo/core/sw/source/filter/basflt/shellio.cxx:186
> #12 0x00007fffc0ff7ffb in SwDocShell::Load (this=0x493be40, rMedium=...) at lo/core/sw/source/ui/app/docshini.cxx:593
> #13 0x00007ffff66b1b82 in SfxObjectShell::LoadOwnFormat (this=0x493be40, rMedium=...) at lo/core/sfx2/source/doc/objstor.cxx:3003
> #14 0x00007ffff66c059a in SfxObjectShell::DoLoad (this=0x493be40, pMed=0x4431bf0) at lo/core/sfx2/source/doc/objstor.cxx:673
> #15 0x00007ffff670f970 in SfxBaseModel::load (this=0x7fffd0c00940, seqArguments=uno::Sequence of length 11 = {...}) at lo/core/sfx2/source/doc/sfxbasemodel.cxx:1936
> #16 0x00007ffff6767dd0 in SfxFrameLoader_Impl::load (this=0x7fffbd97cd90, rArgs=..., _rTargetFrame=uno::Reference to {<com::sun::star::lang::XComponent> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7fffe1bae630}, <No data fields>}, <No data fields>}) at lo/core/sfx2/source/view/frmload.cxx:598
> #17 0x00007fffe179b5d3 in framework::LoadEnv::impl_loadContent (this=this@entry=0x7fffe40403a0) at lo/core/framework/source/loadenv/loadenv.cxx:1146
> #18 0x00007fffe179be58 in framework::LoadEnv::startLoading (this=0x7fffe40403a0) at lo/core/framework/source/loadenv/loadenv.cxx:408
> #19 0x00007fffe17022ae in framework::LoadDispatcher::impl_dispatch (this=0x7fffe4040308, rURL=..., lArguments=uno::Sequence of length 3 = {...}, xListener=empty uno::Reference) at lo/core/framework/source/dispatch/loaddispatcher.cxx:130
> #20 0x00007fffe1702814 in framework::LoadDispatcher::dispatch (this=<optimized out>, aURL=..., lArguments=...) at lo/core/framework/source/dispatch/loaddispatcher.cxx:69
> #21 0x00007fffe17c47dd in implDispatchDelayed (pArg=0x4454410) at lo/core/framework/source/services/backingwindow.cxx:1001
> #22 0x00007ffff44066cc in Call (pCaller=<optimized out>, this=<optimized out>) at lo/core/solver/unxlngx6/inc/tools/link.hxx:123
> #23 ImplHandleUserEvent (pSVEvent=0x4453ba0) at lo/core/vcl/source/window/winproc.cxx:1987
> #24 ImplWindowFrameProc (pWindow=<optimized out>, nEvent=22, pEvent=0x4453ba0) at lo/core/vcl/source/window/winproc.cxx:2559
> #25 0x00007ffff4413b01 in CallCallback (pEvent=<optimized out>, nEvent=22, this=0x41447a0) at lo/core/vcl/inc/salframe.hxx:269
> #26 SalGenericDisplay::DispatchInternalEvent (this=<optimized out>) at lo/core/vcl/generic/app/gendisp.cxx:92
> #27 0x00007fffe6f69386 in GtkData::userEventFn (data=data@entry=0x6123b0) at lo/core/vcl/unx/gtk/app/gtkdata.cxx:945
> #28 0x00007fffe6f693f9 in call_userEventFn (data=0x6123b0) at lo/core/vcl/unx/gtk/app/gtkdata.cxx:955
> #29 0x0000003f75e47825 in g_main_dispatch (context=0x65a2f0) at gmain.c:2539
> #30 g_main_context_dispatch (context=context@entry=0x65a2f0) at gmain.c:3075
> #31 0x0000003f75e47b58 in g_main_context_iterate (context=context@entry=0x65a2f0, block=block@entry=0, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3146
> #32 0x0000003f75e47c14 in g_main_context_iteration (context=0x65a2f0, may_block=0) at gmain.c:3207
> #33 0x00007fffe6f690e1 in GtkData::Yield (this=0x6123b0, bWait=true, bHandleAllCurrentEvents=<optimized out>) at lo/core/vcl/unx/gtk/app/gtkdata.cxx:582
> #34 0x00007ffff405bcd4 in ImplYield (i_bAllEvents=false, i_bWait=true) at lo/core/vcl/source/app/svapp.cxx:425
> #35 Application::Yield (i_bAllEvents=false) at lo/core/vcl/source/app/svapp.cxx:459
> #36 0x00007ffff405bd77 in Application::Execute () at lo/core/vcl/source/app/svapp.cxx:404
> #37 0x00007ffff7b01c95 in desktop::Desktop::Main (this=0x7fffffffe4c0) at lo/core/desktop/source/app/app.cxx:1713
> #38 0x00007ffff4063d31 in ImplSVMain () at lo/core/vcl/source/app/svmain.cxx:162
> #39 0x00007ffff4063dc5 in SVMain () at lo/core/vcl/source/app/svmain.cxx:199
> #40 0x00007ffff7b39c65 in soffice_main () at lo/core/desktop/source/app/sofficemain.cxx:83
> #41 0x00000000004007cb in sal_main () at lo/core/desktop/source/app/main.c:48
> #42 main (argc=<optimized out>, argv=<optimized out>) at lo/core/desktop/source/app/main.c:47
Comment 1 Michael Stahl (allotropia) 2012-11-13 11:13:30 UTC
i think reverting from d68113f3229d0ec8c84f77dcac3b64a3fd7e03e4
the change in unoxml/source/rdf/librdf_repository.cxx
should fix this.
it should not be necessary because since 16e72215c96ee734e2cf6d15a465577d289a1549 calling xmlCleanupParser
from atexit() works again.
Comment 2 Not Assigned 2012-11-14 14:01:25 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=62af61b8f076c00eb045dca1c46275882e17ce6b

fdo#57055: Re-enable call to librdf_free_world



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 Stephan Bergmann 2012-11-14 14:07:45 UTC
So I reverted now as per comment 1, and my little experiment from comment 0 now indeed shows a call to null xmlSetStruturedErrorFunc during exit (see below).

However, what librdf et al do there still looks wrong:  For one, according to <http://www.xmlsoft.org/html/libxml-xmlerror.html#xmlSetStructuredErrorFunc>: "For multi-threaded applications, this must be set separately for each thread."  So it is by pure luck that in my scenario the first two calls to set xmlSetStructuredErrorFunc are from the same thread as the final call to null it.  For another, I would assume that the raptor library would reset this global resource as soon as it is done and not only at exit.
Comment 4 Stephan Bergmann 2012-11-14 14:10:16 UTC
> #0  xmlSetStructuredErrorFunc__internal_alias (ctx=0x0, handler=0) at error.c:135
> #1  0x00007fffbcb02f50 in raptor_sax2_finish () at raptor_sax2.c:70
> #2  0x00007fffbcaedc11 in raptor_finish () at raptor_general.c:159
> #3  0x00007fffbcd5f765 in rasqal_free_world (world=0x48725f0) at rasqal_general.c:200
> #4  0x00007fffbcfb1255 in librdf_query_rasqal_destructor (world=world@entry=0x4869050) at rdf_query_rasqal.c:1267
> #5  0x00007fffbcfae6ee in librdf_finish_query (world=world@entry=0x4869050) at rdf_query.c:81
> #6  0x00007fffbcf99891 in librdf_free_world (world=0x4869050) at rdf_init.c:190
> #7  0x00007fffbd1e8669 in release (this=0x4874630) at lo/core/solver/unxlngx6/inc/external/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:145
> #8  ~shared_count (this=<optimized out>, __in_chrg=<optimized out>) at lo/core/solver/unxlngx6/inc/external/boost/smart_ptr/detail/shared_count.hpp:217
> #9  boost::shared_ptr<librdf_world_s>::~shared_ptr (this=<optimized out>, __in_chrg=<optimized out>) at lo/core/solver/unxlngx6/inc/external/boost/smart_ptr/shared_ptr.hpp:168
> #10 0x0000003f74238b71 in __run_exit_handlers (status=0, listp=0x3f745b0688, run_list_atexit=run_list_atexit@entry=true) at exit.c:78
> #11 0x0000003f74238bf5 in __GI_exit (status=<optimized out>) at exit.c:100
> #12 0x0000003f7422173c in __libc_start_main (main=0x4007c0 <main>, argc=1, ubp_av=0x7fffffffe618, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe608) at libc-start.c:258
> #13 0x000000000040080d in _start ()
Comment 5 Michael Stahl (allotropia) 2012-11-14 14:26:00 UTC
there has been significant upstream work on raptor and we still have a version from 2009 or so, maybe that has improved (i definitely reported the xmlCleanupParser call upstream), we really should update it if i find the time...
Comment 6 Michael Stahl (allotropia) 2012-11-14 14:27:22 UTC
i hate bugzilla. or firefox's caching of it. bah.