Bug 79392 - EDITING: Calc crashes when deleting rows in .CSV file
Summary: EDITING: Calc crashes when deleting rows in .CSV file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.4.2 release
Hardware: All All
: highest critical
Assignee: Caolán McNamara
URL:
Whiteboard: target:4.4.0 target:4.3.0.0.beta2 tar...
Keywords: bibisectRequest, regression
Depends on:
Blocks: CSV mab4.3
  Show dependency treegraph
 
Reported: 2014-05-29 06:52 UTC by W.Muellner
Modified: 2017-07-20 19:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
.CSV example data file (375 bytes, application/x-zip-compressed)
2014-05-29 06:54 UTC, W.Muellner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description W.Muellner 2014-05-29 06:52:57 UTC
Windows7-Ultimate, 64bit, LibO 4.2.4.2 release

Workflow to reproduce:
1. Open .csv file (from attachment)
2. position cursor on any NON_EMPTY row (e.g. row 4) and select whole row
3. select whole of spreadsheet including and below selected row by pressing CTRL-SHIFT plus "cursor-down"
4. delete selected part of sheet by pressing CTRL plus "-"
--> crash with error message: "Fatal Error", "block position not found"

br, WM

PS: minmum version to reproduce:
1. create new spreadsheet,
2. enter at least 2 cells of data (into cells A1 and A2)
3. position on row header of row 2 (selecting whole row)
4. press CTRL-Shift + "cursor down" (selects whole sheet starting from row 2)
5. press ctrl+"-" to delete
--> crash
Comment 1 W.Muellner 2014-05-29 06:54:51 UTC
Created attachment 100079 [details]
.CSV example data file

mini file to reproduce
Comment 2 W.Muellner 2014-05-29 06:56:30 UTC
Selecting row 1 does NOT crash Calc, selection must start at row > 1 WITH data in it
br, WM
Comment 3 Yousuf Philips (jay) (retired) 2014-05-29 08:06:40 UTC
Confirmed the crash in Windows XP and Linux Mint with 4.2.4 and 4.3 beta.

On a side note, only 4.2.4 has ctrl+shift+down selecting the whole down part, with others versions you have to keep pressing it until it hits a row that has no data in it before it will select the whole rest of it. Must have to do with the selection hitting the last row in Calc.
Comment 4 Caolán McNamara 2014-05-29 09:38:07 UTC
#0  0x00000030ac45f0e1 in __cxa_throw () from /lib64/libstdc++.so.6
#1  0x00007f70df510410 in mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::Sh
aredString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<
54, ScFormulaCell> > >::get_block_position (this=0x2f23800, pos_hint=..., pos=1048576, start_row=@0x7fff9d346c48: 1048576, 
    block_index=@0x7fff9d346c40: 1)
    at /home/caolan/LibreOffice/libreoffice-4-2/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector_def.inl:660
#2  0x00007f70df4fb8cf in mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::Sh
aredString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<
54, ScFormulaCell> > >::position (this=0x2f23800, pos_hint=...,	pos=1048576)
    at /home/caolan/LibreOffice/libreoffice-4-2/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector_def.inl:1311
#3  0x00007f70df5fcb24 in ScColumn::DeleteRow (this=0x2f23740, nStartRow=3, nSize=1048573)
    at /home/caolan/LibreOffice/libreoffice-4-2/sc/source/core/data/column3.cxx:239
#4  0x00007f70df8a46a4 in ScTable::DeleteRow (this=0x2f23740, rRegroupCols=...,	nStartCol=0, nEndCol=1023, nStartRow=3,	
    nSize=1048573, pUndoOutline=0x7fff9d347cad)
    at /home/caolan/LibreOffice/libreoffice-4-2/sc/source/core/data/table2.cxx:246
#5  0x00007f70df6e3101 in ScDocument::DeleteRow (this=0x28a1858, nStartCol=0, nStartTab=0, nEndCol=1023, nEndTab=0, 
    nStartRow=3, nSize=1048573,	pRefUndoDoc=0x384b010, pUndoOutline=0x7fff9d347cad, pTabMark=0x7fff9d347b90)
    at /home/caolan/LibreOffice/libreoffice-4-2/sc/source/core/data/document.cxx:1369
#6  0x00007f70dfd65061 in ScDocFunc::DeleteCells (this=0x28a4b40, rRange=..., pTabMark=0x341d360, eCmd=DEL_DELROWS, 
    bRecord=true, bApi=false) at /home/caolan/LibreOffice/libreoffice-4-2/sc/source/ui/docshell/docfunc.cxx:2331
#7  0x00007f70e01bdcb7 in ScViewFunc::DeleteCells (this=0x3314bb0, eCmd=DEL_DELROWS, bRecord=true)
    at /home/caolan/LibreOffice/libreoffice-4-2/sc/source/ui/view/viewfunc.cxx:1537
#8  0x00007f70e006252a in ScCellShell::ExecuteEdit (this=0x331e040, rReq=...)
    at /home/caolan/LibreOffice/libreoffice-4-2/sc/source/ui/view/cellsh1.cxx:288
Comment 5 Caolán McNamara 2014-05-29 09:47:27 UTC
how hard can this spreadsheet hacking be anyway
Comment 6 Commit Notification 2014-05-29 10:03:22 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: fdo#79392 std::out_or_range -> terminate



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 7 Commit Notification 2014-05-29 10:03:36 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: fdo#79392 don't access after last row, when last row is max last row



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-05-29 10:05:11 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

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

Resolves: fdo#79392 don't access after last row, when last row is max last row


It will be available in LibreOffice 4.3.

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 Caolán McNamara 2014-05-29 10:26:17 UTC
fixed in master and 4-3, review on gerrit for 4-2
Comment 10 Kohei Yoshida 2014-05-29 14:09:01 UTC
we'll need unit test for this.
Comment 11 Commit Notification 2014-05-29 14:17:43 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-2-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=928ae08bc5fef353d2e597bcfee184bf91d06353&h=libreoffice-4-2-5

Resolves: fdo#79392 don't access after last row, when last row is max last row


It will be available already in LibreOffice 4.2.5.

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 2014-05-30 00:01:43 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

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

Resolves: fdo#79392 don't access after last row, when last row is max last row


It will be available in LibreOffice 4.2.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 Robinson Tryon (qubit) 2015-12-17 08:22:12 UTC Comment hidden (obsolete)