Bug 80968 - VIEWING: sorting csv based datasource in window Datasource, removes rows from view
Summary: VIEWING: sorting csv based datasource in window Datasource, removes rows from...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.2.5.2 release
Hardware: x86-64 (AMD64) All
: medium major
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:4.5.0 target:4.4.0.2 target:4.3.6
Keywords: bibisected, bisected, haveBacktrace, regression
: 68925 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-06 08:36 UTC by dbojan76+libreoffice
Modified: 2015-12-17 08:25 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
backtrace from raised assertion (9.98 KB, text/plain)
2014-07-07 17:56 UTC, Terrence Enger
Details
small .csv file (42 bytes, text/csv)
2014-07-07 17:57 UTC, Terrence Enger
Details
.odb using the .csv (1.77 KB, application/vnd.oasis.opendocument.database)
2014-07-07 17:58 UTC, Terrence Enger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dbojan76+libreoffice 2014-07-06 08:36:39 UTC
steps:
-new database
-connect to an existing database: 'text'
-select a folder with csv files.

In database:
-click on tables
-double click on table name
-click on 'sort ascending' or 'sort descending'

result:
-rows are removed from view.

expected:
-sort by column.


(this works as expected in open office)
Comment 1 Cor Nouws 2014-07-06 12:10:48 UTC
(just clarifying the summary ..)
Comment 2 Terrence Enger 2014-07-07 17:55:04 UTC
In addition to the shrinking of the data grid that the reporter sees,
my debug build of recent master shows an assertion raised when <sort
ascending> removes the last row from the data grid.  I am reporting
the assertion here because of a suspicion that the assertion may shed
light on the shrinkage of the data grid.


For specificity, here are my STR:

(1) Download soon-to-be-attached example1.csv and example1.odb to the
    same directory.

(2) Open example1.odb from the command line.

(3) In Database pane click <Tables>.

(4) In Tables pane, double-click <example1>.  Program displays data
    grid with four rows; column "number" shows values 1, 2, 3, 4.

(5) In toolbar, click icon <sort ascending>.  As fdo#80968 complains,
    the data grid shows three rows; column "number" shows values 2, 3,
    4.

(6) Twice more, in toolbar click icon <sort ascending>, The data grid
    shows one row, column "number" shows 4.

(7) In toolbar click icon <sort ascending>.  Program raises assertion
    in connectivity::flat::OFlatTable::seekRow, ETable.cxx:788.  The
    terminal output includes (lines wrapped for readability in the bug
    report):

        soffice.bin: /home/terry/lo_hacking/git/libo2/connectivity/
            source/drivers/flat/ETable.cxx:788:
            virtual bool connectivity::flat::OFlatTable::seekRow
            (connectivity::IResultSetHelper::Movement, sal_Int32, sal_Int32&):
            Assertion `m_nRowPos == 1 || nCurPos == lastRowPos.second' failed.
        Application Error
        Fatal exception: Signal 6


For comparison, LibreOffice 3.5.4.2, as delivered with debian-wheezy,
continues to show four rows in the data grid after <sort ascending>.


My LibreOffice is master commit dc795cb, fetched 2014-07-02 2357 UTC,
configured:

    --enable-option-checking=fatal --enable-dbgutil --enable-crashdump
    --without-system-postgresql --without-myspell-dicts
    --with-extra-buildid --without-doxygen
    --with-external-tar=/home/terry/lo_hacking/git/src

built and running on debian-wheezy 64-bit.
Comment 3 Terrence Enger 2014-07-07 17:56:32 UTC
Created attachment 102384 [details]
backtrace from raised assertion
Comment 4 Terrence Enger 2014-07-07 17:57:52 UTC
Created attachment 102385 [details]
small .csv file
Comment 5 Terrence Enger 2014-07-07 17:58:23 UTC
Created attachment 102386 [details]
.odb using the .csv
Comment 6 Terrence Enger 2014-07-09 20:22:35 UTC
Correcting comment 2:  The master version that I fetched on 2014-07-02 is 397362c.
Comment 8 Alex Thurgood 2015-01-03 17:38:06 UTC
Adding self to CC if not already on
Comment 9 Matthew Francis 2015-01-04 08:27:37 UTC
The behaviour seems to have changed as of the below commit.

Adding Cc: to lionel@mamane.lu. Could you possibly take a look at this one? Thanks


commit 48b29cd42ba10fbb3f7be697fd79a0984b4daa1b
Author: Lionel Elie Mamane <lionel@mamane.lu>
Date:   Sun May 19 13:20:51 2013 +0200

    flat db driver: reorganise OFlatTable
    
    Change-Id: I5d522abdffaf1aeb4ae0996d3a19acdcca474f95
Comment 10 Commit Notification 2015-01-05 14:14:17 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

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

fdo#80968 file resultset seek table to before beginning on opening resultset

It will be available in 4.5.0.

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 11 Commit Notification 2015-01-06 09:05:54 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b8faf41a2ba7ad787c93eaa66e0665940e1d2b85&h=libreoffice-4-4

fdo#80968 file resultset seek table to before beginning on opening resultset

It will be available in 4.4.0.2.

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 12 Commit Notification 2015-01-07 10:09:33 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2414f02ff0d087d144b472b5b4b1f93d6e3e2960&h=libreoffice-4-3

fdo#80968 file resultset seek table to before beginning on opening resultset

It will be available in 4.3.6.

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 13 Terrence Enger 2015-01-11 18:04:29 UTC
With versions
    Version: 4.5.0.0.alpha0+
    Build ID: a272f5b7b30f356418ecf28eb95d066f081d1624
    TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-01-09_09:50:59
    Locale: en_CA
and
    Version: 4.5.0.0.alpha0+
    Build ID: 89a81a6610cf316666291750e7300bcd1a97d062
    TinderBox: Win-x86@39, Branch:master, Time: 2015-01-07_00:57:18
    Locale: en_CA
I observe that the reported problem is not evident.  Thank you,
Lionel.

However, the assertion that I mentioned in comment 2 is already absent
in the daily dbgutil version of 2014-11-30: the sort icon is disabled
when there are no rows visible.  This proves false my speculation that
my assertion is related to this bug report.
Comment 14 Lionel Elie Mamane 2015-01-15 12:32:34 UTC
*** Bug 68925 has been marked as a duplicate of this bug. ***
Comment 15 Robinson Tryon (qubit) 2015-12-17 08:25:26 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]