Bug 76148 - vector::_M_range_check crash after pasting broken formulas
Summary: vector::_M_range_check crash after pasting broken formulas
Status: VERIFIED DUPLICATE of bug 76470
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-14 02:26 UTC by Jim Avera
Modified: 2014-04-18 15:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Mrangecheck.ods - delete row 3 to see the crash (29.94 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-03-14 02:27 UTC, Jim Avera
Details
MrangecheckNoMacros.ods - delete row 3 to see crash (28.60 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-03-14 02:35 UTC, Jim Avera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Avera 2014-03-14 02:26:28 UTC
Copy-and-paste of cells with formulas can corrupt the receiving spreadsheet, causing later crashes, if the formulas refer to Named Ranges and/or macros
which do not exist in the receiving spreadsheet.

Please load the attached demo and attempt to delete row 3

LO crashes with vector::_M_range_check.

The problem seems to be triggered by the cells with broken formulas, but I can't determine exactly what part of the formulas causes LO to go addled.  The formulas referenced Named Ranges which don't exist in the receiving spreadsheet; they also had Conditional Formats applied in the source spreadsheet.   Sorry to not be specific, but the demo is very small and simple and hopefully it will be easy to track down what is wrong.

This might be a REGRESSION, as the demo doesn't crash in 4.2.0.3 (although it might be just luck).
Comment 1 Jim Avera 2014-03-14 02:27:20 UTC
Created attachment 95765 [details]
Mrangecheck.ods - delete row 3 to see the crash
Comment 2 Jim Avera 2014-03-14 02:35:22 UTC
Created attachment 95766 [details]
MrangecheckNoMacros.ods - delete row 3 to see crash
Comment 3 Terrence Enger 2014-03-15 00:09:23 UTC
I am marking this a duplicate of bug 76008 "out_of_range exception
from: copy formula, paste, undo".

The resemblances between the two bugs are:
(a) Same error messages
(b) The user was deleting a formula.

The differences between them are:
(c) Explicit row deletion vs. undoing a paste into one cell.
(d) The formula involved in bug 76008 does not, so far as I know, have
    an error.

*** This bug has been marked as a duplicate of bug 76008 ***
Comment 4 Laurent Balland 2014-03-22 09:39:16 UTC
Change bug duplicate to bug 76470, because it is more relevant and already assigned.

*** This bug has been marked as a duplicate of bug 76470 ***
Comment 5 Terrence Enger 2014-03-24 12:59:50 UTC
We have evidence for this bug being a duplicate of 76470.  The crash
has gone away between commit 924635e (fetched 2014-03-22 01:18 UTC)
and commit 8931ab3 (fetched 2014-03-23 02:37 UTC).  That range
includes commit c78d1bb "fdo#76470: Avoid joining new formula cells
individually.".

@Jim,

When you see the problem fixed, it would be good to advance the bug
status to VERIFIED.
Comment 6 Jim Avera 2014-03-25 20:40:58 UTC
Verified that the demo no longer crashes on 4.3alpha (built 2014-03-25_10:00:54).
Thanks very much!
Comment 7 Jim Avera 2014-03-25 20:47:15 UTC
Also now verified using 4.2.4.0.0+ built 2014-03-25_11:34:44