Bug Hunting Session
Bug 92963 - Pasting a whole row with data crashes all open LibO apps
Summary: Pasting a whole row with data crashes all open LibO apps
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: high critical
Assignee: Arul Michael
URL:
Whiteboard: target:5.2.0 target:5.1.3 target:5.0.6
Keywords: bibisected, bisected, haveBacktrace, regression
: 98702 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-27 17:58 UTC by Craig
Modified: 2016-10-25 19:08 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file to show crash on pasting (13.98 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-07-30 21:00 UTC, Craig
Details
gdbtrace (3.05 KB, application/gzip)
2015-08-08 05:14 UTC, raal
Details
Backtraces from Libo Dev_5.2.0.0.alpha0 (42.66 KB, text/plain)
2016-03-04 13:48 UTC, Timur
Details
Backtrace from Linux LODev 5.2 (9.12 KB, text/plain)
2016-03-31 11:39 UTC, Arul Michael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig 2015-07-27 17:58:09 UTC
In an accounts spreadsheet, in the middle of a set of populated rows, add a new row with Ctrl+. Then click on a populated row number and copy with Ctrl C. Click on the newly created row number and attempt to paste using Ctrl V. 

All currently open LibreOffice documents disappear (crash).  Trying to re-open the spreadsheet initiates the recovery action for all LibreOffice documents that had crashed.
Comment 1 m.a.riosv 2015-07-27 21:05:48 UTC
Hi @Craig, thanks for reporting.

I can't reproduce.
Win7x64
Version: 4.4.5.2 Build ID: a22f674fd25a3b6f45bdebf25400ed2adff0ff99

This is with all spreadsheets or with one in particularly?.

Have you tested resetting the user profile.
https://wiki.documentfoundation.org/UserProfile
Comment 2 Craig 2015-07-27 21:15:36 UTC
I'm using Linux Mint 17.2 Cinnamon x64.  The issue may be exacerbated by the pasting of a whole row with a forumula in it over a similar row with a similar forumula.

23/07/15	GTG	INV617	 £34.80 	 £5.80 	 £- 	 £29.00 	23/07/15		42208

The 42008 is actually "=N61-O61" which is doing a date comparison with an empty date formatted column (between 23/07/15 and 42208)

If I just copy and paste the cell range, it's fine. It only causes a crash if I paste the whole row.

This has only been happening since the start of this year. I keep LibreOffice up to date with the Linux Mint repos.

Hope this helps.
Comment 3 m.a.riosv 2015-07-27 22:29:25 UTC
Let's see if someone can verify in Linux.
Comment 4 tommy27 2015-07-30 12:32:57 UTC
@Craig
LibO 4.4.5.2 released today. please retest and give feedback.
Comment 5 raal 2015-07-30 13:42:32 UTC
Cannot reproduce with Version: 5.1.0.0.alpha1+
Build ID: 74d4168f8830f7bbec6b784c3fb774296d9adafa
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-07-22_06:14:00

Craigh, if LO still crashes with 4.4.5.2, please attach test file and provide step-by-step instruction how to reproduce the bug. Set to unconfirmed then. Thank you
Comment 6 Craig 2015-07-30 21:00:40 UTC
Created attachment 117543 [details]
Test file to show crash on pasting
Comment 7 raal 2015-07-31 05:39:34 UTC
I can confirm crash with LO 4.4.4.3, win7 with these steps: 
Copy just the cells 11A to 12O and paste over a populated row. Ok the dialogue, all OL apps crash.
Comment 8 tommy27 2015-07-31 08:22:55 UTC
crashes too in LibO 4.4.5.1 and 5.1.0.0.alpha1+ (x64)
Build ID: e92a8b92072284fd7c37d7bb3e1e8fe72a185f35
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-07-22_21:46:26
Locale: it-IT (it_IT)

tested under Win8.1 x64
Comment 9 Eike Rathke 2015-08-04 18:19:38 UTC
I can not reproduce on Linux with master(5.1), 5.0.0, 4.4.5 and 4.4.4

Could someone who can reproduce the crash attach a backtrace?
Comment 10 raal 2015-08-08 05:14:29 UTC
Created attachment 117764 [details]
gdbtrace

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff53ecd20 in SfxItemSet::Get(unsigned short, bool) const ()
   from /opt/libreofficedev5.1/program/libmergedlo.so
Comment 11 Eike Rathke 2015-08-10 16:00:00 UTC
Thanks, but unfortunately that is without debugging info, so no line numbers or values available.

/me wonders if that happens only in a non-debug build..
Comment 12 Timur 2016-03-04 13:48:45 UTC
Created attachment 123228 [details]
Backtraces from Libo Dev_5.2.0.0.alpha0
Comment 13 Timur 2016-03-04 14:01:16 UTC
Crash with copying row (like: row 6 to row 7) from Comment 0 started with LO 4.3. 
With current versions, crash is reproduced in an additional step with copying cells from Comment 7.
Comment 14 raal 2016-03-05 14:05:03 UTC

a8aced4cb120ba7232deb7773780fa8100929897 is the first bad commit
commit a8aced4cb120ba7232deb7773780fa8100929897
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Thu May 28 19:51:24 2015 +0800

    source-hash-3cea6bb57757ce085f01f0b86b000cfc0592dca7
    
    commit 3cea6bb57757ce085f01f0b86b000cfc0592dca7
    Author:     Kohei Yoshida <kohei.yoshida@collabora.com>
    AuthorDate: Sat Mar 8 17:40:32 2014 -0500
    Commit:     Kohei Yoshida <kohei.yoshida@collabora.com>
    CommitDate: Sat Mar 8 18:09:51 2014 -0500
    
        More consistent number format inheritence policy.
    
        The new policy is to always inherit number format of a formula cell
        from its reference unless the cell already has an explicit number format
        set.
    
        Also to avoid recalculating formula cells on load just because they have
        the 'General' number format.  This leads to excessive re-calculation of
        formula cells upon load even when the cells already have results cached.
    
        Change-Id: I28128d3fef296e09e62bea72e8aab75de9876239
Comment 15 walkerkorea 2016-03-28 14:01:17 UTC
If you select a very large number of cells, and then paste, then LO Calc doesn't warn you that LO is going to be down for several minutes, if not hours. It may appear to crash.

This is true whether you select a column or row, or just many random cells. Selecting a column or row, though, is easy to accidentally do, if Calc user tries to select the first cell in Col or Row.

See also bug 98702.
Comment 16 Buovjaga 2016-03-28 14:27:40 UTC
*** Bug 98702 has been marked as a duplicate of this bug. ***
Comment 17 Arul Michael 2016-03-31 11:39:26 UTC
Created attachment 123986 [details]
Backtrace from Linux LODev 5.2
Comment 18 Arul Michael 2016-03-31 12:03:28 UTC
On Linux with master 5.2 i could get a crash only when consecutive rows(eg. 6 and 7 in the attached doc) are copied together and paste it in any empty row.I have attached the backtrace(comment 17).

Submitting the below patch as a fix for this issue. Thanks

https://gerrit.libreoffice.org/#/c/23688/
Comment 19 Commit Notification 2016-03-31 15:44:09 UTC
Arul Michael committed a patch related to this issue.
It has been pushed to "master":

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

tdf#92963 Pasting a whole row with data crashes all open LibO apps

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 20 Commit Notification 2016-03-31 15:51:19 UTC
Arul Michael committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

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

tdf#92963 Pasting a whole row with data crashes all open LibO apps

It will be available in 5.1.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 21 Commit Notification 2016-03-31 15:56:15 UTC
Arul Michael committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

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

tdf#92963 Pasting a whole row with data crashes all open LibO apps

It will be available in 5.0.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.