Apache OpenOffice (AOO) Bugzilla – Issue 17301
sparc linux soffice crashes loading spreadsheet file
Last modified: 2003-12-31 10:04:10 UTC
soffice crashes loading spraedshets. this problem does not happen if module sc is build using debug=true. the following is from loading a spreadsheet thatw as made with the soffice build on sparc linux using debug=true. similar happens with other file types. jim@sun:~/OpenOffice.org1.1/program$ gdb ./soffice.bin gdb: Symbol `emacs_ctlx_keymap' has different size in shared objec t, consider re-linking GNU gdb 2002-04-01-cvs Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, a nd you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-linux"... (no debugging symbols found)... (gdb) run Starting program: /home/jim/OpenOffice.org1.1/program/soffice.bin [New Thread 16384 (LWP 25791)] [New Thread 32769 (LWP 26464)] [New Thread 16386 (LWP 26471)] [New Thread 32771 (LWP 26739)] [New Thread 49156 (LWP 26750)] [New Thread 65541 (LWP 27060)] [New Thread 81926 (LWP 27186)] [New Thread 98311 (LWP 27379)] [New Thread 114696 (LWP 27477)] [New Thread 131081 (LWP 27484)] [New Thread 147466 (LWP 30377)] [New Thread 163851 (LWP 30887)] [New Thread 180236 (LWP 31091)] [New Thread 196621 (LWP 31284)] [New Thread 213006 (LWP 31379)] [New Thread 229391 (LWP 31392)] [New Thread 245776 (LWP 31529)] [New Thread 262161 (LWP 31555)] [New Thread 278546 (LWP 31562)] Program received signal SIGBUS, Bus error. [Switching to Thread 16384 (LWP 25791)] 0x7965068c in ScCellObj::SetValue_Impl(double) () from ./libsc645ls.so (gdb) where #0 0x7965068c in ScCellObj::SetValue_Impl(double) () from ./libsc645ls.so #1 0x796519d0 in ScCellObj::setValue(double) () from ./libsc645ls.so #2 0x7998c1d8 in ScXMLTableRowCellContext::EndElement() () from ./libsc645ls.so #3 0x76dc878c in SvXMLImport::endElement(rtl::OUString const&) () from ./libxo645ls.so #4 0x73453d04 in sax_expatwrap::SaxExpatParser_Impl::callbackEndElement(void*, unsigned short const*) () from ./sax.uno.so #5 0x7345e4a0 in doContent () from ./sax.uno.so #6 0x7345da18 in contentProcessor () from ./sax.uno.so #7 0x7345fa8c in doProlog () from ./sax.uno.so #8 0x7345f7f4 in prologProcessor () from ./sax.uno.so ---Type <return> to continue, or q <return> to quit--- #9 0x7345f7a8 in prologInitProcessor () from ./sax.uno.so #10 0x7345d59c in XML_Parse () from ./sax.uno.so #11 0x734533fc in sax_expatwrap::SaxExpatParser_Impl::parse() () from ./sax.uno.so #12 0x73452578 in sax_expatwrap::SaxExpatParser::parseStream(com::sun::star::xml::sax::InputSource const&) () from ./sax.uno.so #13 0x7995ab14 in ScXMLImportWrapper::ImportFromComponent(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>&, com::sun::star::uno::Reference<com::sun::star::frame::XModel>&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>&, com::sun::star::xml::sax::InputSource&, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&, unsigned char) () from ./libsc645ls.so ---Type <return> to continue, or q <return> to quit--- #14 0x7995c110 in ScXMLImportWrapper::Import(unsigned char) () from ./libsc645ls.so #15 0x79464bd0 in ScDocShell::LoadXML(SfxMedium*, SvStorage*) () from ./libsc645ls.so #16 0x79464da4 in ScDocShell::Load(SvStorage*) () from ./libsc645ls.so #17 0x7946a174 in virtual thunk to ScDocShell::Load(SvStorage*) () from ./libsc645ls.so #18 0x768fd8b4 in SfxObjectShell::LoadOwnFormat(SfxMedium&) () from ./libsfx645ls.so #19 0x768f3d5c in SfxObjectShell::DoLoad(SfxMedium*) () from ./libsfx645ls.so #20 0x76879628 in LoadEnvironment_Impl::Load(SfxObjectFactory const*) () from ./libsfx645ls.so ---Type <return> to continue, or q <return> to quit--- #21 0x7687b1d8 in LoadEnvironment_Impl::LoadDataAvailable() () from ./libsfx645ls.so #22 0x7687b430 in LoadEnvironment_Impl::LoadDataAvailable() () from ./libsfx645ls.so #23 0x76878a4c in LoadEnvironment_Impl::Start() () from ./libsfx645ls.so #24 0x769531a8 in SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) () from ./libsfx645ls.so #25 0x74786598 in framework::BaseDispatcher::implts_loadIt(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun:---Type <return> to continue, or q <return> to quit--- :star::uno::Any const&) () from ./libfwk645ls.so #26 0x7478c644 in framework::BlankDispatcher::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) () from ./libfwk645ls.so #27 0x7684b4a4 in SfxApplication::OpenDocExec_Impl(SfxRequest&) () from ./libsfx645ls.so #28 0x7684e700 in SfxStubSfxApplicationOpenDocExec_Impl(SfxShell*, SfxRequest&) () from ./libsfx645ls.so #29 0x769a388c in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, unsigned char) () from ./libsfx645ls.so #30 0x769a6124 in SfxDispatcher::PostMsgHandler(SfxRequest*) () from ./libsfx645ls.so #31 0x769a606c in SfxDispatcher::LinkStubPostMsgHandler(void*, void*) () from ./libsfx645ls.so ---Type <return> to continue, or q <return> to quit--- #32 0x769c8e40 in SfxHintPoster::Event(SfxHint*) () from ./libsfx645ls.so #33 0x769c8dd8 in SfxHintPoster::LinkStubDoEvent_Impl(void*, void*) () from ./libsfx645ls.so #34 0x7022e0fc in ImplHandleUserEvent(ImplSVEvent*) () from ./libvcl645ls.so #35 0x7022e8ec in ImplWindowFrameProc(void*, SalFrame*, unsigned short, void const*) () from ./libvcl645ls.so #36 0x70288874 in SalFrameData::HandleClientMessage(XClientMessageEvent*) () from ./libvcl645ls.so #37 0x702891cc in SalFrameData::Dispatch(_XEvent*) () from ./libvcl645ls.so #38 0x702b311c in SalDisplay::Dispatch(_XEvent*) () from ./libvcl645ls.so ---Type <return> to continue, or q <return> to quit--- #39 0x702b2d7c in SalDisplay::Yield(unsigned char) () from ./libvcl645ls.so #40 0x702af0c8 in DisplayYield(int, SalDisplay*) () from ./libvcl645ls.so #41 0x702ad290 in SalXLib::Yield(unsigned char) () from ./libvcl645ls.so #42 0x702b6870 in SalInstance::Yield(unsigned char) () from ./libvcl645ls.so #43 0x700f8940 in Application::Yield() () from ./libvcl645ls.so #44 0x700f8820 in Application::Execute() () from ./libvcl645ls.so #45 0x0002bb5c in desktop::Desktop::Main() () #46 0x700fda24 in SVMain() () from ./libvcl645ls.so #47 0x702abc54 in main () from ./libvcl645ls.so #48 0x7154cb98 in __libc_start_main () from /lib/libc.so.6 (gdb) (gdb) step Single stepping until exit from function _ZN9ScCellObj13SetValue_ImplEd, which has no line number information.
This problem might very well be a problem with the GCC optimizer. Please check if it persists if compile sc with -O0 instead of 'dmake debug=true'. Also it's necessary tp specify '-fnostrict-aliasing', some code in sc is known to break aliasing assumptions.
yes, that fixed it, i did build sc with -O0 -fno-strict-aliasing so soffice now is all working OK on sparc linux 11rc3. i will leave this issue open until i check if -fno-strict-aliasing is sufficient by itself, as we had previously identified only some files that need to build with -O0 there is some tidying up to get it all to build without stopping, but when it builds it is working fine. except the crashreport does not work but maybe is not needed :)
Please note that -fno-strict-aliasing is default with optimize levels < 2.
As -fno-strict-aliasing is explicitly required for gcc versions >= 3.x, shouldn't that be part of configure? I thought it was already and didn't think about this solution and recommended NOOPTFILES in the makefile instead.
loading spreadsheets crashes when build with -O1 -fno-strict-aliasing so it has to be -O0 -fno-strict-aliasing for now. i accept no-strict-aliasing is default in the manual, perhaps it is problem in the sparc linux port?? i notice some other platforms use -fno-strict-aliasing in CFLAGSNOOPT so i will try this next in unxlngs.mk as we have some NOOPT files # Compiler flags for disabling optimazations CFLAGSNOOPT=-fno-strict-aliasing
This seems to be the correct solution. We already had identified a few files to build with NOOPTFILES to solve a calculation problem. Now if i set # Compiler flags for disabling optimazations CFLAGSNOOPT=-fno-strict-aliasing instead of just CFLAGSNOOPT= in unxlngs.mk that solves the crashing on loading. So we can avoid building the whole module with -O0, it is just for those few files we had already identified. It should be safe to use this everywhere as it is stated to be default per the gcc manual. CFLAGSNOOPT=-fno-strict-aliasing
I set CFLAGSNOOPT=-fno-strict-aliasing in unxlngs.mk Now there is no crash on loading spreadsheets. The NOOPTFILES are just the ones we had previously identfied to fix the calculation problem.
I think it should go into the CFLAGSOPT instead, since that is used for optimization switches. This should make it unnecessary to specify the various NOOPTFILES entries, and could even make it possible to enable -O2. However, there may be other optimization problems so that -O1 would be a safer bet.
I agree with Eike. Better set the -fno-strict-aliasing in CFLAGSOPT in unxlngs.mk, to be valid for all files. Most of this code is not written with strict aliasing rules in mind.
-fno-strict-aliasaing is in unxlngs.mk for linux sparc - closed