Bug 86215 - Crash when adding a link to external file
Summary: Crash when adding a link to external file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.3.2 release
Hardware: Other All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:4.4.0.0.beta3 target:4.3.5
Keywords: haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2014-11-12 17:13 UTC by Luuk
Modified: 2016-08-02 01:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
adding the link (81.38 KB, image/png)
2014-11-12 17:13 UTC, Luuk
Details
reproduction2 (86.92 KB, image/png)
2014-11-12 20:29 UTC, Luuk
Details
link.ods (10.67 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-11-12 20:29 UTC, Luuk
Details
backtrace (3.50 KB, application/gzip)
2014-11-15 19:13 UTC, raal
Details
valgrind.log (38.75 KB, text/plain)
2014-11-21 17:28 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luuk 2014-11-12 17:13:54 UTC
Created attachment 109361 [details]
adding the link

When adding a link to external file, this seems to go OK,
but saving, re-opeing, or editing ends up in a crash.... (Libreoffice Document REcovery)
Comment 1 Luuk 2014-11-12 17:15:35 UTC
Version 4.3.3.2 is missing from the list of versions?
Comment 2 raal 2014-11-12 18:37:18 UTC
I can not confirm with Version: 4.4.0.0.alpha2+
Build ID: 98f9baa5253f7bb8034f148519f31f548b1452fa
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-11-12_00:13:54

I can not confirm on win7, LO 4.3.3.2
Comment 3 Luuk 2014-11-12 20:23:50 UTC
If you try to reproduce this bug, please give the link the name 'B2_', because that seems to cause (or influence) the bug.
Comment 4 Luuk 2014-11-12 20:29:07 UTC
Created attachment 109369 [details]
reproduction2

After adding link (see picture), LO will crash when saving this file.
Comment 5 Luuk 2014-11-12 20:29:40 UTC
Created attachment 109370 [details]
link.ods
Comment 6 raal 2014-11-15 19:08:34 UTC
I can reproduce crash when click on OK in external file dialog using link.ods
Version: 4.4.0.0.alpha2+
Build ID: 98f9baa5253f7bb8034f148519f31f548b1452fa
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-11-12_00:13:54
Comment 7 raal 2014-11-15 19:13:10 UTC
Created attachment 109533 [details]
backtrace
Comment 8 raal 2014-11-15 19:15:28 UTC
no crash in LibreOffice 3.5.0 Build ID: d6cde02  -> regression
Comment 9 Caolán McNamara 2014-11-21 17:28:45 UTC
Created attachment 109808 [details]
valgrind.log
Comment 10 Caolán McNamara 2014-11-21 17:33:53 UTC
As a guess I imagine the problem is that during save there's a yield and that lets the "update cell" timer run or something like that and the right fix is to disable such updates during save
Comment 11 Caolán McNamara 2014-11-25 17:18:05 UTC
Apparently a regression between 4f3012fc05fa0eeae412d9e2bfca3d7e60914a8c..f1b1e73227471192682d303a58618ca8bd65a74d
Comment 12 Caolán McNamara 2014-11-25 17:45:48 UTC
I strongly suspect this commit http://cgit.freedesktop.org/libreoffice/core/commit/?id=80ea2822c368e6655d216c32904268fc335ef6a4 is the trigger because the ScStyleSheet in the temp document from the dialog/insert mechanism are destroyed but on export of the final document one of those deleted ScStyleSheets is still referenced by a ScPatternAttr in the real document and thats the commit in this range that "does something interesting" with a ScPatternAttr

Does ScColumn::CopyOneCellFromClip at 

160 const ScPatternAttr* pAttr = rCxt.getSingleCellPattern(nColOffset);
161 pAttrArray->SetPatternArea(nRow1, nRow2, pAttr, true);

need to somehow clone pAttr before SetPatternArea on some
source doc != dest doc condition ?
Comment 13 Commit Notification 2014-12-10 23:48:38 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

fdo#86215 pool new ScPatternAttr if source and destination are different docs

It will be available in 4.5.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 14 Commit Notification 2014-12-11 00:01:56 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

fdo#86215 pool new ScPatternAttr if source and destination are different docs

It will be available in 4.4.0.0.beta3.

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 15 Eike Rathke 2014-12-11 00:41:34 UTC
Pending reviews
https://gerrit.libreoffice.org/13428 for 4-3
https://gerrit.libreoffice.org/13433 for 4-3-5
Comment 16 Commit Notification 2014-12-11 16:26:52 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-3-5":

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

fdo#86215 pool new ScPatternAttr if source and destination are different docs

It will be available in 4.3.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 17 Commit Notification 2014-12-12 15:12:18 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

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

fdo#86215 pool new ScPatternAttr if source and destination are different docs

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