Bug 72802

Summary: CRASH - attempting to copy embedded Firebird db table causes LO to hang requiring forced kill
Product: LibreOffice Reporter: Alex Thurgood <iplaw67>
Component: BaseAssignee: Lionel Elie Mamane <lionel>
Status: RESOLVED FIXED    
Severity: major CC: andrzej, caolan.mcnamara, lionel, ribotb, robert
Priority: high    
Version: 4.3.0.0.alpha0+ Master   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: embedded firebird testdb with one table
backtrace

Description Alex Thurgood 2013-12-17 18:42:34 UTC
Created attachment 90892 [details]
embedded firebird testdb with one table

Open the attached embedded Firebird db, it contains one table.

In the Tables view, right mouse button click on the table and choose Copy

LO hangs and then aborts.


Alex
Comment 1 Alex Thurgood 2013-12-17 18:47:27 UTC
Terminal output :
alex@Aspire-X1430 /home/Development/libo/core $ instdir/program/sbase
warn:xmloff.core:9509:1:xmloff/source/core/xmlimp.cxx:828: exception caught
warn:legacy.osl:9509:1:xmloff/source/core/xmlimp.cxx:829: caught an exception!
in function:virtual void SvXMLImport::setTargetDocument(const com::sun::star::uno::Reference<com::sun::star::lang::XComponent>&)
type: com.sun.star.lang.NotInitializedException
context: N8dbaccess17ODatabaseDocumentE

warn:xmloff.core:9509:1:xmloff/source/core/xmlimp.cxx:828: exception caught
warn:legacy.osl:9509:1:xmloff/source/core/xmlimp.cxx:829: caught an exception!
in function:virtual void SvXMLImport::setTargetDocument(const com::sun::star::uno::Reference<com::sun::star::lang::XComponent>&)
type: com.sun.star.lang.NotInitializedException
context: N8dbaccess17ODatabaseDocumentE

warn:xmloff.core:9509:1:xmloff/source/core/xmlimp.cxx:828: exception caught
warn:legacy.osl:9509:1:xmloff/source/core/xmlimp.cxx:829: caught an exception!
in function:virtual void SvXMLImport::setTargetDocument(const com::sun::star::uno::Reference<com::sun::star::lang::XComponent>&)
type: com.sun.star.lang.NotInitializedException
context: N8dbaccess17ODatabaseDocumentE

warn:legacy.osl:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:845: Not implemented yet!
warn:connectivity.firebird:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1473: Not yet implemented
warn:legacy.osl:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1477: Not implemented yet!
warn:connectivity.firebird:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1443: Not yet implemented
warn:legacy.osl:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1447: Not implemented yet!
warn:connectivity.firebird:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1443: Not yet implemented
warn:legacy.osl:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1447: Not implemented yet!
warn:connectivity.firebird:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1443: Not yet implemented
warn:legacy.osl:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1447: Not implemented yet!
warn:connectivity.firebird:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1443: Not yet implemented
warn:legacy.osl:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1447: Not implemented yet!
warn:connectivity.firebird:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1443: Not yet implemented
warn:legacy.osl:9509:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1447: Not implemented yet!
soffice.bin: /home/Development/libo/core/include/rtl/ustring.hxx:421: sal_Unicode rtl::OUString::operator[](sal_Int32) const: Assertion `index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength())' failed.
sh: 1: /home/Development/libo/core/instdir/program/../program/crashrep: not found

At this point the application is hung, trying to close the application via the main app window requires force kill.

Alex
Comment 2 Alex Thurgood 2013-12-17 18:58:40 UTC
soffice.bin: /home/Development/libo/core/include/rtl/ustring.hxx:421: sal_Unicode rtl::OUString::operator[](sal_Int32) const: Assertion `index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength())' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff74bdf77 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56	../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.
Comment 3 Alex Thurgood 2013-12-17 19:11:52 UTC
Created attachment 90893 [details]
backtrace
Comment 4 Robert Großkopf 2013-12-17 19:24:24 UTC
Hi Alex,

tested your attached file. Copied with right mouseclick the table "people", then created it with the wizard.
No crash here with LO 4.2.0.0beta2 or with LO 4.3.0.0alpha, Version from 2013-12-15_08:27:48.
My system: OpenSUSE 12.3 64bit rpm Linux.
Comment 5 Lionel Elie Mamane 2013-12-17 19:31:21 UTC
Should have been fixed by

commit 6d42e7a35b1b887e86a5f9b9eacd5e5b951df8bf
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Mon Dec 16 12:34:56 2013 +0000

    fix out of range access
    
    this is broken since 6e4a21ff22345a24e4d530725814c436a1bdd49a
    the original commit in 2001.
    
    I imagine the idea was to strip a trailing sal_Unicode(11) from the
    end of the string and then recalculate if the string is empty, but
    seeing as it has chugged away for the last 12+ years like this I'm
    relunctant to change it to what it might have originally been
    intended to do and instead just remove the stuff which was never
    executed.
    
    Change-Id: I73d5108ece8e716d78a4898117e0ee2d51822015