Bug 78054 - Writer crashes on pasting a commented cell from Calc
Summary: Writer crashes on pasting a commented cell from Calc
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.3.3 release
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: BSA target:4.3.0 target:4.2.5
Keywords: haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2014-04-29 03:25 UTC by Bob Furber
Modified: 2014-05-06 13:51 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
console logs + bt with symbols (12.60 KB, text/plain)
2014-04-29 20:54 UTC, Julien Nabet
Details
proposed patch (847 bytes, patch)
2014-04-29 21:09 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Furber 2014-04-29 03:25:14 UTC
Problem description: When one copies a block from Calc into Writer and there is a cell with a comment, LibreOffice crashes.

Steps to reproduce:
1. Make a spreadsheet in Calc
2. add a comment to a cell
3. copy block of cells, including commented cell
4. paste in Writer

Current behavior: LibreOffice crashes

Expected behavior: Block of cells would paste into Writer [preferably] with or without the comment, without crashing LibreOffice.

              
Operating System: Ubuntu
Version: 4.2.3.3 release
Comment 1 tommy27 2014-04-29 09:50:13 UTC
reproducibile with 4.2.3.3 under Win7x64
not reproducibile with 4.1.5.3 hence regression
Comment 2 Julien Nabet 2014-04-29 20:54:33 UTC
Created attachment 98194 [details]
console logs + bt with symbols

On pc Debian x86-64 with master sources updated today (1e5b495a882493a81cc82ee34e3339b071bc162d), I could reproduce the crash.
Comment 3 Julien Nabet 2014-04-29 21:09:50 UTC
Created attachment 98196 [details]
proposed patch

Here's a simple patch which prevents the crash.
But comment isn't taken into account.
Comment 4 Julien Nabet 2014-04-29 21:12:14 UTC
Kohei/Michael: I attached a bt + a straightforward patch (but which doesn't take into account the comment). Any idea?
Comment 5 Kohei Yoshida 2014-05-05 16:27:05 UTC
No idea.  I'll look.
Comment 6 Kohei Yoshida 2014-05-05 18:23:16 UTC
Julien's patch may prevent a crash, but it won't address the fundamental question of why the note caption failed to get created there.  Plus notes won't get copied, which is not good.
Comment 7 Kohei Yoshida 2014-05-05 18:44:52 UTC
So, the crash is an unfortunate side effect of how the drawing layer behaves with regard to clipboard documents.  I can think of a few different ways to fix this... Let's see.
Comment 8 Julien Nabet 2014-05-05 18:54:10 UTC
Kohei: of course it was just a band-aid fix to avoid the crash (see https://bugs.freedesktop.org/show_bug.cgi?id=78054#c3) waiting for the real fix :-)
Comment 9 Kohei Yoshida 2014-05-05 19:12:43 UTC
This is not a Writer bug.
Comment 10 Commit Notification 2014-05-05 19:27:27 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#78054: Initialize drawing layer when the document contains notes.



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 11 Kohei Yoshida 2014-05-05 19:55:01 UTC
4.2 backport: https://gerrit.libreoffice.org/9254
Comment 12 Commit Notification 2014-05-06 06:27:28 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

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

fdo#78054: Initialize drawing layer when the document contains notes.


It will be available 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 13 Kohei Yoshida 2014-05-06 13:49:13 UTC
Fixed.
Comment 14 Kohei Yoshida 2014-05-06 13:51:30 UTC
I forgot to assign it to me.