Bug 76132 - Crash on undoing of pasted formula cell
Summary: Crash on undoing of pasted formula cell
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-13 17:50 UTC by Kohei Yoshida
Modified: 2014-03-13 20:11 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
test document (16.29 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-03-13 17:51 UTC, Kohei Yoshida
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kohei Yoshida 2014-03-13 17:50:47 UTC
1. Open attached file.
2. Copy B12 (should be already selected) to clipboard via Ctrl-C.
3. Move the cursor to B14.
4. Paste via Ctrl-V.
5. Undo via Ctrl-Z.

Calc crashes on std::vector's range check error.

I'll attach test document in a minute.
Comment 1 Kohei Yoshida 2014-03-13 17:51:26 UTC
Created attachment 95733 [details]
test document
Comment 2 Kohei Yoshida 2014-03-13 17:57:22 UTC
Actually it's much easier to reproduce this.

1. Put any formula into A1 e.g. =ROW().
2. Copy A1 and paste it to A3.
3. Undo via Ctrl-Z.
4. Crash on out-of-range error.
Comment 3 Kohei Yoshida 2014-03-13 18:38:04 UTC
You can replace undo in step 3 with deleting A3, and still crashes.
Comment 4 Kohei Yoshida 2014-03-13 19:41:06 UTC
Actually, this is for the master branch only. 4.2 doesn't have this problem.
Comment 5 Commit Notification 2014-03-13 20:11:21 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76132: Write 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 6 Commit Notification 2014-03-13 20:11:34 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76132: Don't create a formula group of length 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 7 Kohei Yoshida 2014-03-13 20:11:56 UTC
Fixed.