Bug 66049 - UI: Name of columns missing for table
Summary: UI: Name of columns missing for table
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
(earliest affected) Master
Hardware: Other Linux (All)
: high major
Assignee: Not Assigned
Whiteboard: BSA
Keywords: regression
Depends on:
Reported: 2013-06-22 15:22 UTC by Julien Nabet
Modified: 2013-06-24 20:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

symptom screenshot (11.16 KB, image/png)
2013-06-22 15:22 UTC, Julien Nabet

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2013-06-22 15:22:55 UTC
Created attachment 81220 [details]
symptom screenshot

Problem description:
On pc Debian x86-4 with master sources updated today, in Database, I tried to view (not edit) a table from hsqldb file, only the last label column appears.
Steps to reproduce:
1. Open an hsqldb file on Base or create a new one and a very simple table (at least 2 columns) and let it empty.
2. Open the table

Current behavior:
All the columns appear but only the name of the last column is shown (see attachment)

Expected behavior:
All the column names should be shown
I noticed these kind of logs:
warn:legacy.osl:28639:1:svx/source/fmcomp/gridcell.cxx:255: caught an exception!
in function:void DbGridColumn::impl_toggleScriptManager_nothrow(bool)
type: com.sun.star.lang.IllegalArgumentException

Operating System: Debian
Version: Master
Comment 1 Robert Großkopf 2013-06-22 16:58:27 UTC
You are right. Only the last fieldname is shown, when you want to put data into the table.
Have tested with openSUSE 12.3 64bit rpm,
Comment 2 Julien Nabet 2013-06-22 17:53:38 UTC
Thank you Robert for the confirmation. I can increase now the importance because it's a regression confirmed, it's highly visible for DB users.
Comment 3 Julien Nabet 2013-06-22 19:13:08 UTC
Noel/Lionel: by trying to dig a little with warn:legacy.osl:28639:1:svx/source/fmcomp/gridcell.cxx:255: caught an exception!
I noticed this commit:
When put back xNormalized with the patch below I don't have these errors but still it doesn't solve the problem so  I suppose there's no link.
diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx
index da7f05f..adc662b 100644
--- a/svx/source/form/fmtools.cxx
+++ b/svx/source/form/fmtools.cxx
@@ -180,6 +180,10 @@ sal_Int32 getElementPos(const Reference< ::com::sun::star::container::XIndexAcce
     DBG_ASSERT( xElement.is(), "getElementPos: invalid element!" );
     if ( xElement.is() )
+        Reference< XInterface > xNormalized( xElement, UNO_QUERY );
+        if (!xNormalized.is() )
+            return nIndex;
         // Feststellen an welcher Position sich das Kind befindet
         nIndex = xCont->getCount();
         while (nIndex--)
@@ -189,7 +193,7 @@ sal_Int32 getElementPos(const Reference< ::com::sun::star::container::XIndexAcce
                 Reference< XInterface > xCurrent(xCont->getByIndex( nIndex ),UNO_QUERY);
                 DBG_ASSERT( xCurrent.get() == Reference< XInterface >( xCurrent, UNO_QUERY ).get(),
                     "getElementPos: container element not normalized!" );
-                if ( xElement.get() == xCurrent.get() )
+                if ( xNormalized.get() == xCurrent.get() )

Any idea?
Comment 4 Julien Nabet 2013-06-22 20:06:06 UTC
BTW, perhaps it's completely unrelated but I noticed too that when I open a simple odb file, I've got this log 3 times:
warn:xmloff.core:30711:1:xmloff/source/core/xmlimp.cxx:852: exception caught:
Seem linked to this commit 3905bd92b038374d22e4ff9f74480decb116d727
the exception is launched with this instruction:
    841         uno::Reference<embed::XStorage> const xStor(
    842                 xSBDoc->getDocumentStorage());
gdb session gave me this line precisely:
dbaccess::DocumentGuard::DocumentGuard (this=0x7fffade9e690, _document=..., _eType=dbaccess::DocumentGuard::DefaultMethod)
    at /home/julien/compile-libreoffice/libreoffice/dbaccess/source/core/dataaccess/databasedocument.hxx:670
670	        switch ( _eType )
(gdb) n
673	            case DefaultMethod:         m_document.checkInitialized();       break;

but then it's quite a jigsaw for me...
Comment 5 Noel Grandin 2013-06-24 09:10:44 UTC
Hmm, working fine for me with today's master, running on 64-bit Fedora 18.

However, I have pushed a fix for the exception in gridcell.cxx
in commit 44b2fb6164aeffcc0c5bfbf53dac12f7b53fb0d4
Comment 6 Lionel Elie Mamane 2013-06-24 09:48:20 UTC
After Noel's message, assuming it was somehow fixed.

Reopen if you still get it in a recent build.
Comment 7 Julien Nabet 2013-06-24 20:57:48 UTC
Everything is ok now.
Thank you Noel for the fix.