Download it now!
Bug 76470 - out_of_range_exception when inserting/deleting rows with absolute reference
Summary: out_of_range_exception when inserting/deleting rows with absolute reference
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.3.1 rc
Hardware: Other All
: medium critical
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.4
Keywords: regression
: 76008 76148 76666 77458 77481 77978 78171 78263 78353 79128 79614 (view as bug list)
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2014-03-21 20:39 UTC by Laurent BP
Modified: 2014-06-04 07:43 UTC (History)
17 users (show)

See Also:
Crash report or crash signature:


Attachments
Insert row in row 3 does not operate (12.31 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-03-21 20:39 UTC, Laurent BP
Details
backtrace with symbols from SIGABRT (4.93 KB, text/plain)
2014-03-21 23:51 UTC, Terrence Enger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent BP 2014-03-21 20:39:37 UTC
Created attachment 96187 [details]
Insert row in row 3 does not operate

Description: Inserting/Deleting rows are inoperative with formulas. If action is repeated, then crash

Steps to reproduce:
1. Create a new spreadsheet
2. Insert values in column from A1 to A4
3. In B1 to B4, insert formula "=$A$4"
4. right click on row# 3 > Insert Rows Above

Current behavior:
Nothing happen. 
- If you repeat Insert Rows, then crash
- If you try to select a cell, nothing happen (no selection)

Expected behavior:
A row should be inserted above row 3, and formulas should be updated.

The problem is the absolute reference to a cell below ($A$4). If you replace with relative reference, then row is inserted.
The problem is with row 3: if you insert in row 2 or 4, then row is inserted.

Confirmed with
Version: 4.2.3.0.0+
Build ID: cade56eef6d23aa7dd6e374858cf30ff3fcd163b
TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-03-07_13:22:50

Version: 4.3.0.0.alpha0+
Build ID: 9278df2c21fed09b6b10465ca33b227ad7c49b41
TinderBox: Win-x86@47-TDF, Branch:MASTER, Time: 2014-03-19_08:44:54

Version: 4.2.3.1
Build ID: 3d4fc3d9dbf8f4c0aeb61498a81f91c5b7922f13

NOT confirmed with
Version: 4.2.1.1
Build ID: d7dbbd7842e6a58b0f521599204e827654e1fb8b

Version: 4.2.2.0.0+
Build ID: 50a2ddc88f7b9f48fecd562ca0f4bd76c79f0cc3
TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-02-15_00:22:48

Version: 4.2.2.1
Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f

So introduced between 4.2.2.1 and 4.2.3.0.0+
May be with correction of bug 75053
Comment 1 Laurent BP 2014-03-21 20:50:48 UTC
The bug appears if row is inserted between the 3rd and the before last row. So with 4 rows it appears only on row 3 ;)
Comment 2 m.a.riosv 2014-03-21 22:23:41 UTC
Reproducible.
Win7x64Ultimate
Version: 4.2.3.1 Build ID: 3d4fc3d9dbf8f4c0aeb61498a81f91c5b7922f13
Version: 4.2.4.0.0+ Build ID: e1823627f35e4419880769fdd05acddbd0a9c25c
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-03-18_14:25:19
Version: 4.3.0.0.alpha0+ Build ID: 12ae7672f285da1d4c730315e8db23b3396b71cc
   TinderBox: Win-x86@39, Branch:master, Time: 2014-03-14_00:18:00
Comment 3 Terrence Enger 2014-03-21 23:51:12 UTC
Created attachment 96192 [details]
backtrace with symbols from SIGABRT

The terminal output includes:
    terminate called after throwing an instance of 'std::out_of_range'
      what():  vector::_M_range_check
    Application Error
    Fatal exception: Signal 6

Bug 76008 is another instance of the same exception in Calc, but I see
only small similarities in the backtraces.
Comment 4 Terrence Enger 2014-03-21 23:55:46 UTC
Further to comment 03, I should have said:

My LibreOffice is master commit 806f4d8, fetched 2014-03-04, 
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 5 Kohei Yoshida 2014-03-22 00:45:52 UTC
I'll take a look.
Comment 6 Laurent BP 2014-03-22 09:39:16 UTC
*** Bug 76148 has been marked as a duplicate of this bug. ***
Comment 7 Commit Notification 2014-03-22 13:54:26 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76470: Write unit test for this first.



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 8 Commit Notification 2014-03-22 13:54:43 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76470: Avoid joining new formula cells individually.



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 9 Kohei Yoshida 2014-03-22 14:15:10 UTC
4.2 backport request: https://gerrit.libreoffice.org/8716
Comment 10 Terrence Enger 2014-03-24 12:37:26 UTC
*** Bug 76008 has been marked as a duplicate of this bug. ***
Comment 11 ape 2014-03-25 07:42:22 UTC
OK in LibreOfficeDev-4.3.0.0.alpha0+ (Build ID: 325ecb1d0511c6c02d863eb760c2d0521f0b6c19, TinderBox: Win-x86@39, Branch:master, Time: 2014-03-25_02:26:28). OS: Windows XP sp2 64-bit Edition, last update.
--
It seems to me that this patch should be made to the LibreOffice-4.2.3.2(rc2) necessarily.
Comment 12 Commit Notification 2014-03-25 10:20:04 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

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

fdo#76470: Avoid joining new formula cells individually.


It will be available in LibreOffice 4.2.4.

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 Kohei Yoshida 2014-03-25 12:50:07 UTC
Fixed in the 4.2 branch.
Comment 14 Kohei Yoshida 2014-03-25 12:51:18 UTC
BTW, this was a very interesting corner case.  Good work finding it and coming up with reproducible steps.
Comment 15 Laurent BP 2014-03-25 20:51:24 UTC
Verified with Version: 4.3.0.0.alpha0+
Build ID: e5d7a360e68b1725ee28abc5c76db5c4023dce88

Thanks Kohei :)
Comment 16 ape 2014-03-27 10:32:47 UTC
Funny and strange situation arose.
 This bug is the regression version_4.2.3 to version_4.2.2.
 Bug has already been fixed in LibO-dev 4.2.4.0.0+ (Build ID: 96ef8a7a03c7b098c71f7ce8540fb61d13eaa298, TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-03-26_22:50:49), which was published before LibreOffice 4.2.3.2 (Win_x86, Time: 27-Mar-2014 04:25). 
 I think it would be correct if you include the Kohei’s patch into version ‘4.2.3’ and then publish release LibreOffice 4.2.3.3(rc3), for example, on Saturday.
Comment 17 m.a.riosv 2014-03-27 14:41:26 UTC
*** Bug 76666 has been marked as a duplicate of this bug. ***
Comment 18 tommy27 2014-04-05 12:14:53 UTC
@ape
4.2.3 RC3 has been announced but in the changelog I do not see the current bug report included.

sorry, it seems we will have to wait a few more weeks for 4.2.4
Comment 19 ape 2014-04-05 21:45:50 UTC
(In reply to comment #18)
> @ape
> 4.2.3 RC3 has been announced but in the changelog I do not see the current
> bug report included.
> 
> sorry, it seems we will have to wait a few more weeks for 4.2.4

Yes, unfortunately, it’s this: 2 more weeks.
Comment 20 Eike Rathke 2014-04-15 17:39:14 UTC
*** Bug 77481 has been marked as a duplicate of this bug. ***
Comment 21 sophie 2014-04-23 13:50:28 UTC
*** Bug 77458 has been marked as a duplicate of this bug. ***
Comment 22 Julien Nabet 2014-04-27 11:33:43 UTC
*** Bug 77978 has been marked as a duplicate of this bug. ***
Comment 23 Julien Nabet 2014-05-02 06:21:12 UTC
*** Bug 78171 has been marked as a duplicate of this bug. ***
Comment 24 sophie 2014-05-05 16:04:27 UTC
*** Bug 78263 has been marked as a duplicate of this bug. ***
Comment 25 m.a.riosv 2014-05-06 22:40:09 UTC
*** Bug 78353 has been marked as a duplicate of this bug. ***
Comment 26 m.a.riosv 2014-05-24 22:22:08 UTC
*** Bug 79128 has been marked as a duplicate of this bug. ***
Comment 27 Dominik 2014-06-04 07:43:53 UTC
*** Bug 79614 has been marked as a duplicate of this bug. ***