Bug 100764 - Fatal error and crash when attempt to delete a row
Summary: Fatal error and crash when attempt to delete a row
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.4.1 rc
Hardware: All All
: high critical
Assignee: Eike Rathke
URL:
Whiteboard: target:5.3.0 target:5.2.0 target:5.1.5
Keywords: regression
: 100794 101023 101036 101103 101403 101608 101934 103659 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-07-04 21:54 UTC by peter.hewett@gmail.com
Modified: 2020-03-22 01:22 UTC (History)
18 users (show)

See Also:
Crash report or crash signature:


Attachments
Test spreadsheet (49.99 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-07-14 09:27 UTC, John Talbut
Details
fatal error (35.32 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-08-03 08:09 UTC, Bob
Details
Problem spreadsheet (1.64 MB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-03-17 16:56 UTC, Lsebham
Details
backtrace log for error (15.37 KB, text/x-log)
2020-03-17 16:57 UTC, Lsebham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peter.hewett@gmail.com 2016-07-04 21:54:33 UTC
When attempting to delete a row, LibreOffice calc gives error message;
LibreOffice 5.1 - Fatal Error
multi_type_vector::position#1321:block position not found! (logical pos=18446744073709551595, block size=8, logical size=1048576)

LibreOffice crashes when I click the OK button in this error message.
Same symptoms occur when attempting to delete about 8 cells in a row.

System here is Kubuntu 16.04, LibreOffice 5.1.4.2 
build ID: 1:5.1.4-0ubuntu1

The sheet giving this error has about 60 rows and 10 columns. This workbook has about 70 tabs (all about the same size in terms of rows and columns used).
Comment 1 ghutfilz 2016-07-05 02:52:24 UTC
I have encountered the same bug on 5.1.4.2 on Windows 10. The sheet is rather large, 650 rows by 60 columns.  To continue to work with this document, I had to completely uninstall 5.1.4.2 and regress to 5.1.3.2.  This release works perfectly.
Comment 2 Julien Nabet 2016-07-05 19:20:12 UTC
Try to rename your LO directory profile (see 
https://wiki.documentfoundation.org/UserProfile#Windows) and give a new try.

If you still reproduce this, could you retrieve a backtrace by following this link? (see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#Windows:_How_to_get_a_backtrace)
Comment 3 jim 2016-07-07 09:39:50 UTC
Just happened to me as well 1:5.1.4-rc2-2-bpo8+1 on Debian Jessie
Very large spreadsheet approx 9500 rows on sheet 1 and approx 50 smaller linked sheets.
Opens OK, Delete row 9367 (actually empty row and happens on other rows too) gives Fatal Error
multi_type_vector::position#1491: block position not found! (logical pos=18446744073709551601. Block size=4, logical size=1048576
Comment 4 jim 2016-07-07 09:45:01 UTC
(In reply to jim from comment #3)
profile renamed - problem still occurs
Comment 5 jim 2016-07-07 09:51:55 UTC
(In reply to jim from comment #3)
Backtrace - had to cntrl-c to return to command prompt.
warning: Currently logging to gdbtrace.log.  Turn the logging off and on to make the new setting effective.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe15e2700 (LWP 3595)]
[New Thread 0x7fffdd8b6700 (LWP 3596)]
[New Thread 0x7fffdd0b5700 (LWP 3597)]
[New Thread 0x7fffd7189700 (LWP 3598)]
[New Thread 0x7fffd5aaa700 (LWP 3599)]
[New Thread 0x7fffd52a9700 (LWP 3602)]
[Thread 0x7fffd52a9700 (LWP 3602) exited]
[Thread 0x7fffdd8b6700 (LWP 3596) exited]
[New Thread 0x7fffdd8b6700 (LWP 3606)]
[New Thread 0x7fffd52a9700 (LWP 3607)]
[Thread 0x7fffdd8b6700 (LWP 3606) exited]
[New Thread 0x7fffdd8b6700 (LWP 3609)]
[New Thread 0x7fffbfc52700 (LWP 3610)]
[Thread 0x7fffbfc52700 (LWP 3610) exited]
[New Thread 0x7fffbfc52700 (LWP 3611)]
[Thread 0x7fffbfc52700 (LWP 3611) exited]
[New Thread 0x7fffbfc52700 (LWP 3612)]
[Thread 0x7fffbfc52700 (LWP 3612) exited]
[Thread 0x7fffdd8b6700 (LWP 3609) exited]
[New Thread 0x7fffdd8b6700 (LWP 3613)]
[New Thread 0x7fffbfc52700 (LWP 3614)]
[New Thread 0x7fffb7fff700 (LWP 3615)]
[Thread 0x7fffb7fff700 (LWP 3615) exited]
[Thread 0x7fffbfc52700 (LWP 3614) exited]
[Thread 0x7fffdd8b6700 (LWP 3613) exited]
[Thread 0x7fffd5aaa700 (LWP 3599) exited]
[Thread 0x7fffd7189700 (LWP 3598) exited]
[Thread 0x7fffdd0b5700 (LWP 3597) exited]
[Thread 0x7fffe15e2700 (LWP 3595) exited]
[Thread 0x7ffff7f98a40 (LWP 3590) exited]
[Inferior 1 (process 3590) exited with code 0115]
/usr/lib/libreoffice/program/gdbtrace:9: Error in sourced command file:
No stack.
No stack.
No stack.
Quit
Comment 6 Julien Nabet 2016-07-07 10:29:41 UTC
*** Bug 100794 has been marked as a duplicate of this bug. ***
Comment 7 Julien Nabet 2016-07-07 11:22:22 UTC
Badfully, there's no bt

Could you try again after having disabled OpenCL (menu Tools/Options/OpenCL, uncheck boxes related to it) + restarted LO ?
Comment 8 Aron Budea 2016-07-07 13:50:54 UTC
Additionally, if anyone could upload a sample spreadsheet that exhibits the error, that would be very helpful. I tried creating a large sheet, but could not reproduce the crash myself.
Comment 9 V Stuart Foote 2016-07-07 14:49:32 UTC
(In reply to Aron Budea from comment #8)
> Additionally, if anyone could upload a sample spreadsheet that exhibits the
> error, that would be very helpful. I tried creating a large sheet, but could
> not reproduce the crash myself.

Attachment 126097 [details] to duplicate bug 100794 ?
Comment 10 Aron Budea 2016-07-07 15:07:45 UTC
(In reply to V Stuart Foote from comment #9)
> Attachment 126097 [details] to duplicate bug 100794 ?

That's a document with a screenshot. :)
Comment 11 V Stuart Foote 2016-07-07 15:26:08 UTC
(In reply to Aron Budea from comment #10)
> (In reply to V Stuart Foote from comment #9)
> > Attachment 126097 [details] to duplicate bug 100794 ?
> 
> That's a document with a screenshot. :)

Oops indeed! Sorry.
Comment 12 peter.hewett@gmail.com 2016-07-13 19:23:34 UTC
In my case, this might have been a corrupt ods file. I deleted the tab that was causing the problem, and recreated that tab. The symptoms no longer happen.
Comment 13 Richard J (Dick) Kuehl 2016-07-14 02:41:09 UTC
Thanks to all respondents. Followed suggestion to remove 5.1.4.2 and install 5.1.3.2. Problem was solved. This is the first time an update has caused me a problem. Thanks to all.
Comment 14 Aron Budea 2016-07-14 08:03:08 UTC
If someone could upload a document with specific reproduction steps, it would be helpful for the investigation, and highly appreciated.
Comment 15 John Talbut 2016-07-14 09:27:24 UTC
Created attachment 126201 [details]
Test spreadsheet

Insert a line on one of the month pages of this spreadsheet.  Delete the line and it crashes.
Comment 16 Aron Budea 2016-07-14 18:33:45 UTC
Thanks for the sample, John!

Reproduced with the attached spreadsheet in 5.1.4.1/5.1.4.2, both in Windows 7 and Linux. Also reproduced in 5.2.0.2 and master builds (id: 9fee132c18b658c9ea9fb1114c1fefa56b57532a).
Not reproduced in 5.1.3.2 => regression.
Turning OpenCL on/off doesn't affect the bug.

To reproduce, select any row that isn't a summary (so, one of 2-32 in August/December sheet), and delete the row. You will get the fatal error, and Calc exits abruptly.

Since the bug is a crash/data loss, and affects a component that affects many users, raising importance to high/critical.
Comment 17 Eike Rathke 2016-07-15 22:05:46 UTC
In master:
Exception thrown under sc/source/core/tool/sharedformula.cxx sc::SharedFormulaUtil::splitFormulaCellGroups() line 113 in rCells.position(nRow) where nRow is -31 obtained from std::vector<SCROW>& rBounds with one element.
Called from sc/source/core/data/column.cxx ScColumn::UpdateReference() line 2420 where nTab==2 && nCol==6.
Comment 18 Eike Rathke 2016-07-15 22:08:29 UTC
When deleting row 2 on sheet December that is..
Comment 19 Commit Notification 2016-07-15 23:53:26 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#100764 check row when determining bounds for deleted range

It will be available in 5.3.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 21 Commit Notification 2016-07-18 10:01:20 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

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

Resolves: tdf#100764 check row when determining bounds for deleted range

It will be available in 5.2.1.

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 22 Commit Notification 2016-07-18 10:05:33 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9bcc12e3b8f29067443b96cfc20cca5d183ed5cd&h=libreoffice-5-1

Resolves: tdf#100764 check row when determining bounds for deleted range

It will be available in 5.1.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 23 Commit Notification 2016-07-18 15:17:40 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-2-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=da54d7b0c2b2c39f0f4d316085f1fcb4b02eb440&h=libreoffice-5-2-0

Resolves: tdf#100764 check row when determining bounds for deleted range

It will be available in 5.2.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 24 Aron Budea 2016-07-20 07:17:44 UTC
*** Bug 101023 has been marked as a duplicate of this bug. ***
Comment 25 Eike Rathke 2016-07-20 14:42:27 UTC
*** Bug 101036 has been marked as a duplicate of this bug. ***
Comment 26 Commit Notification 2016-07-21 01:22:31 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-1-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=10b1fb083b3f66fb4099f84e94a1b4cd52ed1b06&h=libreoffice-5-1-5

Resolves: tdf#100764 check row when determining bounds for deleted range

It will be available in 5.1.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 27 Aron Budea 2016-07-25 00:10:33 UTC
*** Bug 101103 has been marked as a duplicate of this bug. ***
Comment 28 Bob 2016-08-03 07:49:58 UTC
I confirm this is still happening, system details:
Version: 5.1.4.2
Build ID: 1:5.1.4-0ubuntu1
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; 
Locale: en-US (en_US.UTF-8)
Comment 29 Aron Budea 2016-08-03 07:55:33 UTC
(In reply to Bob from comment #28)

Bob, it should be fixed in pre-release version 5.1.5.2 (can be selected at the bottom of the download page), please try with that.
Comment 30 Bob 2016-08-03 08:09:19 UTC
Created attachment 126538 [details]
fatal error

Multi type vector error block position not found with attached example. When deleting data coming from link from other file (H1:V3) then problem is solved. In the file that is attached, there is problem deleting many lines, e.g. row 21
Comment 31 Aron Budea 2016-08-03 08:21:45 UTC
(In reply to Bob from comment #30)
Crash in 5.1.4.2, no crash in 5.1.5.2. As I wrote, the issue is fixed in 5.1.5.2.
Comment 32 John 2016-08-03 08:26:59 UTC
pre-release version 5.1.5.2 works OK for me; I have a spreadsheet which crashed every time I deleted a row previously.

John
Comment 33 ghutfilz 2016-08-07 03:45:07 UTC
I too have installed 5.1.5.2 and successfully deleted rows from a spreadsheet that consistently failed on 5.1.4.2.  In order to use the spreadsheet I had regressed to 5.1.3.2, which worked while awaiting this fix.  Thanks.
Comment 34 Ron Johnson 2016-08-09 01:10:41 UTC
Version: 5.1.5.2 Build ID: 7a864d8825610a8c07cfc3bc01dd4fce6a9447e5 also works for me, whereas 5.1.4 exhibited this bug.
Comment 35 Julien Nabet 2016-08-09 05:24:26 UTC
Following last comments, let's put this one to VERIFIED.
Comment 36 Eike Rathke 2016-08-09 10:15:08 UTC
*** Bug 101403 has been marked as a duplicate of this bug. ***
Comment 37 Aron Budea 2016-08-19 13:30:37 UTC
*** Bug 101608 has been marked as a duplicate of this bug. ***
Comment 38 Eike Rathke 2016-09-06 14:21:45 UTC
*** Bug 101934 has been marked as a duplicate of this bug. ***
Comment 39 Xisco Faulí 2016-11-02 19:05:47 UTC
*** Bug 103659 has been marked as a duplicate of this bug. ***
Comment 40 Lsebham 2020-03-17 16:56:57 UTC
Created attachment 158756 [details]
Problem spreadsheet

Hi, I am experiencing a bug that sounds like this one. 

I am trying to clean the data in the attached spreadsheet by filtering one column at a time to show negative or "N/A" values. I am then trying to delete all rows that have these values. I place the cursor in the first row and then Ctrl + Shift + Down arrow to select all rows. I then right click and select delete rows. I do not see  a processing icon cursor and nothing appears to happen, but then when trying to close the window, I get the "... is not responding error" and i'm forced to kill all open librecalc windows.

Note: I also tried to delete the cell contents which worked fine but then again when trying to delete the actual rows, I experience the problem again.

Libre office version: LibreOffice 6.3.5.2 30(Build:2)

System info:

System:
  Host: --- Kernel: 5.5.8-1-MANJARO x86_64 bits: 64 compiler: gcc 
  v: 9.2.1 Desktop: KDE Plasma 5.18.3 Distro: Manjaro Linux 
Machine:
  Type: Laptop System: Acer product: Aspire ES1-332 v: V1.08 serial: <filter> 
  Mobo: Acer model: Ankylo_AP v: V1.08 serial: <filter> UEFI: Insyde v: 1.08 
  date: 10/21/2016 
CPU:
  Topology: Dual Core model: Intel Celeron N3350 bits: 64 type: MCP 
  arch: Goldmont rev: 9 L2 cache: 1024 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 4378 
  Speed: 796 MHz min/max: 800/2400 MHz Core speeds (MHz): 1: 796 2: 796 
Graphics:
  Device-1: Intel HD Graphics 500 vendor: Acer Incorporated ALI driver: i915 
  v: kernel bus ID: 00:02.0 
  Display: x11 server: X.Org 1.20.7 driver: intel unloaded: modesetting 
  resolution: 1366x768~60Hz 
  OpenGL: renderer: Mesa DRI Intel HD Graphics 500 (Broxton 2x6) 
  v: 4.6 Mesa 19.3.5 direct render: Yes 
Memory: 3.68 GiB

Steps to reproduce:
Filter the any column except 2005 to show negative/"N/A" values
Select all remaining rows/cells
Attempt to delete rows

Expected behaviour:
After some processing time, all selected rows are deleted

Actual behaviour:
librecalc freezes and becomes unresponsive

Steps tried:
Starting in safemode
Resetting user profile
Clean installing libreoffice
confirming OpenCL is disabled

I have attached the problem spreadsheet and the backtrace log

Hope this is helpful!
Comment 41 Lsebham 2020-03-17 16:57:41 UTC
Created attachment 158757 [details]
backtrace log for error
Comment 42 Aron Budea 2020-03-22 01:22:04 UTC
(In reply to Lsebham from comment #40)
> Hi, I am experiencing a bug that sounds like this one. 
This seems like a completely different issue, please open a new bug report on it.