Bug 104967 - EDITING Crash in: ScPostIt::CreateCaption(ScAddress const &,SdrCaptionObj const *)
Summary: EDITING Crash in: ScPostIt::CreateCaption(ScAddress const &,SdrCaptionObj con...
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 major
Assignee: Eike Rathke
URL:
Whiteboard: target:5.4.0 target:5.2.6 target:5.3....
Keywords: bibisected, haveBacktrace, regression
: 105055 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-12-28 22:18 UTC by Stefan_Lange_KA@T-Online.de
Modified: 2020-04-15 19:04 UTC (History)
2 users (show)

See Also:
Crash report or crash signature: ["ScPostIt::CreateCaption(ScAddress const &,SdrCaptionObj const *)"]


Attachments
Test sheet document to reproduce the crash (51.77 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-12-28 22:18 UTC, Stefan_Lange_KA@T-Online.de
Details
Screenshot of the test spreadsheet (45.58 KB, image/jpeg)
2017-01-19 04:00 UTC, Stefan_Lange_KA@T-Online.de
Details
Screenshot of test with LO 5.3.1 (Comment_19) (57.90 KB, image/jpeg)
2017-01-23 07:25 UTC, Stefan_Lange_KA@T-Online.de
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan_Lange_KA@T-Online.de 2016-12-28 22:18:28 UTC
Created attachment 129991 [details]
Test sheet document to reproduce the crash

This bug was filed from the crash reporting server and is br-e7280e7b-f592-4fdf-87b2-8a10c0319e1d.
=========================================

Crash occured in LO 5.3.0 RC1: 
Version: 5.3.0.1 (x64)
Build-ID: 3b800451b1d0c48045de03b5b3c7bbbac87f20d9
CPU-Threads: 4; BS-Version: Windows 6.19; UI-Render: Standard; Layout-Engine: neu; 
Gebietsschema: de-DE (de_DE); Calc: group

Reproducing the crash:
- open the attached file "Testtabelle_Abbruch_Copy_Paste.ods"
- in sheet "Kameras" select cell O12 (cell with comment) and copy it to clipboard 
- close file "Testtabelle_Abbruch_Copy_Paste.ods"
- File -> new -> Sheet document
- select any cell (A1) -> Paste -> LO crashes

When cells without comments are selected and copied to clipboard, paste in the new sheet document works properly (no crash).
Paste cell with comment works properly, when the source document remains opened.
Comment 1 Stefan_Lange_KA@T-Online.de 2016-12-28 22:44:41 UTC
The crash also occurs in LO 5.2.4.2, see crash report

crashreport.libreoffice.org/stats/crash_details/b24ba296-56e4-4c4c-8c16-194f73edcbde
Comment 2 JoNi 2016-12-29 18:25:38 UTC
very nice reproduce-able steps

confirming on 5.2.4.2 and recent linux master

signature summary indicates it's an old bug at least 5.2.0.4 e.g. http://crashreport.libreoffice.org/stats/crash_details/80a512d2-aeec-4279-83a4-6c6d075c42fc
Comment 3 Stefan_Lange_KA@T-Online.de 2017-01-04 20:23:56 UTC
Easier way to reproduce the crash:
- File -> New -> Spreadsheet
- enter something in any cell (e.g. A1)
- insert comment in the same cell (!!!)
- copy the complete cell into clipboard
- close the spreadsheet with or without to save it
- reopen this spreadsheet, when it was saved, or open any other
- paste clipboard content to any cell -> LO crashes

As already written in the bug description, the crash only appears when cells with comment are pasted.
Comment 4 Telesto 2017-01-08 18:56:28 UTC

*** This bug has been marked as a duplicate of bug 105055 ***
Comment 5 Telesto 2017-01-08 20:05:58 UTC
Moving back to NEW. I incorrectly closed this as a duplicate of bug 105055 because of the given summary, without paying attention to the description...
Comment 6 Telesto 2017-01-08 20:48:03 UTC
Found in:
Versie: 5.2.2.1 
Build ID: 3c2231d4aa4c68281f28ad35a100c092cff84f5d
CPU Threads: 4; Versie besturingssysteem:Windows 6.2; UI Render: standaard; 
Locale: nl-NL (nl_NL); Calc: CL

and in
Versie: 4.4.6.3 
Build ID: e8938fd3328e95dcf59dd64e7facd2c7d67c704d
Locale: nl_NL

and in
Version: 4.3.0.4
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0

but not in
Versie: 4.2.0.4 
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71

and not in
Versie: 4.1.0.4 
Build ID: 89ea49ddacd9aa532507cbf852f2bb22b1ace28

and not in
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 8 Eike Rathke 2017-01-10 14:17:54 UTC
Investigating.
Comment 9 Commit Notification 2017-01-18 15:21:06 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

tdf#104967 prevent crash when pasting notes originating from a closed document

It will be available in 5.4.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 10 Eike Rathke 2017-01-18 15:35:48 UTC
Pending review
https://gerrit.libreoffice.org/33275 for 5-3-0
https://gerrit.libreoffice.org/33273 for 5-3
https://gerrit.libreoffice.org/33274 for 5-2
Comment 11 Commit Notification 2017-01-18 21:00:31 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=4d3b4a8ad12767c846b48c3a424e6bb0fa7af924&h=libreoffice-5-2

tdf#104967 prevent crash when pasting notes originating from a closed document

It will be available in 5.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 12 Commit Notification 2017-01-18 21:51:07 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

tdf#104967 preserve isolated notes data in clipboard when closing document

It will be available in 5.4.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 13 Stefan_Lange_KA@T-Online.de 2017-01-19 04:00:50 UTC
Created attachment 130542 [details]
Screenshot of the test spreadsheet

Test with
Version: 5.4.0.0.alpha0+
Build ID: bbf40e3b5d06bd1437b097ed2703179026d1e871
CPU Threads: 1; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-01-19_01:45:05
Locale: de-DE (de_DE); Calc: group

I have tested as described in Comment 3, this means, LO was not closed between close the document and reopen. 

Result: 
- LO crashes no longer 
- the complete cell incl. comment is pasted 

I have also tested copy + paste formatted cell and comment, this is OK too. See attached jpg-file - except cell A21!

After this I have tested as follows:
- File -> New -> Spreadsheet
- enter something in any cell (e.g. A1)
- insert comment in the same cell (!!!)
- copy the complete cell into clipboard
- close the spreadsheet with or without to save it
- close and open LO <-- new 
- reopen this spreadsheet, when it was saved, or open any other
- paste clipboard content to any cell

Result:
No crash, but only the cell text was pasted, no comment and no format (cell A21 in the attached jpg-file). I don't know if this OK (works as designed) or not.
Comment 14 Eike Rathke 2017-01-20 15:31:51 UTC
Pastes fine here, including cell background color and comment. Make sure you didn't use Paste Special accidentally or any other means that would paste only the cell text (e.g. some clipboard "enhancer"). Anyway, that wouldn't be related to this fix.
Comment 15 Eike Rathke 2017-01-20 19:43:36 UTC
*** Bug 105055 has been marked as a duplicate of this bug. ***
Comment 16 Stefan_Lange_KA@T-Online.de 2017-01-21 11:03:52 UTC
Because the patches also solve the duplicate Bug 105055 (tested with LO 5.4.0.0.alpha0+ 2017-01-20_02:26:12) and because the duplicate bug has importance "highest critical", it would be nice if the patches could be pushed to LO 5.3.0 RC3 or 5.3.1 too, but it seems that review für LO 5.3 is still pending.
Comment 17 Aron Budea 2017-01-21 18:45:04 UTC
Eike, are you sure the behavior in comment 13 isn't related to the fix?

I just tried it with master pulled and built today, and if I exit LO and restart Calc (this is the additional step) only the cell content is pasted, without the comment (and without text and background color if it was set).
It was a regular paste, and I've got no tools to interfere with clipboard. OS is Windows 7.

Version: 5.4.0.0.alpha0+
Build ID: efd58dee26a534ba89d41efff44821b2d8967928
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
Locale: hu-HU (hu_HU); Calc: group
Comment 18 Commit Notification 2017-01-22 21:00:43 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9961508ef33d8cbb158ccb94fe23e99bcec7d3e2&h=libreoffice-5-3

tdf#104967 prevent crash when pasting notes originating from a closed document

It will be available in 5.3.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 19 Stefan_Lange_KA@T-Online.de 2017-01-23 07:25:16 UTC
Created attachment 130625 [details]
Screenshot of test with LO 5.3.1 (Comment_19)

Test with

Version: 5.3.1.0.0+
Build-ID: c9ab894ae846185a0341656922b0aa1632bfe886
CPU-Threads: 4; BS-Version: Windows 6.2; UI-Render: Standard; Layout-Engine: neu; 
TinderBox: Win-x86@62-merge-TDF, Branch:libreoffice-5-3, Time: 2017-01-22_22:43:21
Gebietsschema: de-DE (de_DE); Calc: Group

was not completley succesful.

I have tested nearly as described in Comment 3 (+ cell and comment formatted).
After the spreadsheet was saved, closed and reopened, the copied before to the clipboard cell C1 was pasted to cell C9.

Results (see attached screenshot "Screenshot_zu_Unbenannt 1.JPG"):
- LO didn't crash at paste. Good!
- The text of the cell was pasted - also correctly formatted. Good too!
- In cell C9 appears the red corner indicating a comment, but the comment is empty. Not correct! 

Also tested: 
- Behavior described in Bug 105055: LO is closed correctly now. Good! 
- Test as described in the lower section of Comment 13 (and confirmed in Comment 17): Only the text is pasted to cell C13 - not formatted and without comment. Not correct, but minor important!
Comment 20 Stefan_Lange_KA@T-Online.de 2017-01-24 09:40:09 UTC
I have seen only now, that not the patch to preserve note data was pushed to LO 5.3.1, but the workaround patch to prevent a crash. Therefore it's clear that only an empty note appears by paste.
But is there a special reason, that not the patch to preserve note data was pushed?
It works fine in LO 5.4.0 - except after LO was closed.
Comment 21 Commit Notification 2017-01-25 12:49:52 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6c6528828c5ca1da6a1ccc98d1aa5b42d84152a4&h=libreoffice-5-3

tdf#104967 preserve isolated notes data in clipboard when closing document

It will be available in 5.3.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 Stefan_Lange_KA@T-Online.de 2017-01-26 17:23:28 UTC
Test with

Version: 5.3.1.0.0+
Build-ID: cba6653d460cc3800d1bd84ca9d39279b928e473
CPU-Threads: 2; BS-Version: Windows 6.2; UI-Render: Standard; Layout-Engine: neu; 
TinderBox: Win-x86@62-merge-TDF, Branch:libreoffice-5-3, Time: 2017-01-26_08:58:36
Gebietsschema: de-DE (de_DE); Calc: Group

was OK!

I have tested nearly as described in Comment 3 (+ cell and comment formatted).
After the spreadsheet was saved, closed and reopened, the copied before to the clipboard cell C1 was pasted to cell C9.

Results:
- LO didn't crash at paste. OK!
- The complete cell incl. comment and Formats was pasted - also correctly formatted. OK! 

Also tested: 
- Behavior described in Bug 105055: LO is closed correctly now. OK!

- Test as described in the lower section of Comment 13 (and confirmed in Comment 17) - with Standard Paste (Ctrl+V) and without any "Clipbard enhancres": Only the text is pasted to cell C13 - not formatted and without comment. Not correct, but not very important!
Comment 23 Commit Notification 2017-01-26 22:18:01 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3097bdd13ab3b1a0e16da862cb46614025bce504&h=libreoffice-5-3-0

tdf#104967 prevent crash when pasting notes originating from a closed document

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 24 Commit Notification 2017-01-26 22:20:06 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3-0":

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

tdf#104967 preserve isolated notes data in clipboard when closing document

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 25 Stefan_Lange_KA@T-Online.de 2017-01-28 12:35:11 UTC
Same tests as described in Comment 22 (Test with LO 5.3.1.0.0+) now with
Version: 5.3.0.3 (x64)
Build-ID: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
CPU-Threads: 4; BS-Version: Windows 6.19; UI-Render: Standard; Layout-Engine: neu; 
Gebietsschema: de-DE (de_DE); Calc: group

Same results - OK!
Comment 26 Commit Notification 2017-02-21 18:09:14 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

unit test for copying note from clipboard after closing orig doc, tdf#104967

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