Download it now!
Bug 90808 - Crashes on copy in writer 4.4
Summary: Crashes on copy in writer 4.4
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.1 rc
Hardware: Other All
: highest major
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: target:5.0.0 target:4.4.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-04-23 09:42 UTC by nickbest
Modified: 2015-12-17 08:58 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Copy crashes writer in 4.4 (424.91 KB, application/vnd.oasis.opendocument.text)
2015-04-23 09:42 UTC, nickbest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nickbest 2015-04-23 09:42:36 UTC
Created attachment 115028 [details]
Copy crashes writer in 4.4

In writer 4.4 the document attached crashes if you highlight the whole of the text and copy.

In 4.3.6 it does not.
Comment 1 Matthew Francis 2015-04-23 10:10:45 UTC
This began (on master) at the below commit.
Adding Cc: to mstahl@redhat.com; Could you possibly take a look at this one? Thanks

    commit 7a12360e1f2c0a5bc0927131a750740d35cfd1ab
    Author:     Michael Stahl <mstahl@redhat.com>
    AuthorDate: Wed Dec 10 14:56:27 2014 +0100
    Commit:     Michael Stahl <mstahl@redhat.com>
    CommitDate: Wed Dec 10 16:22:17 2014 +0100
    
        sw: don't assert when SwXBookmark creates duplicate CrossRef*Bookmark
    
        The bugdoc of fdo#87110 has a couple such duplicates.  Check for it and
        let SwXBookmark throw an IllegalArgumentException.
    
        Change-Id: I460dc3a8d9c554c194a32a73526e13422ddd1c52
Comment 2 Michael Stahl (CIB) 2015-05-15 22:21:59 UTC
The document contains 2 cross-reference bookmarks on the same paragraph:

      <text:h text:style-name="P178" text:outline-level="3">
        <text:bookmark-start text:name="__RefHeading__10798_1597553411"/>
        <text:bookmark-start text:name="__RefHeading___Toc394995642"/>
        <text:soft-page-break/>
        <text:span text:style-name="T29">3</text:span>
        <text:span text:style-name="T26">. <text:s text:c="2"/></text:span>
        <text:span text:style-name="T21">Objectives</text:span>
        <text:bookmark-end text:name="__RefHeading__10798_1597553411"/>
        <text:bookmark-end text:name="__RefHeading___Toc394995642"/>
      </text:h>

the check in 7a12360e1f2c0a5bc0927131a750740d35cfd1ab
should refuse to insert the second duplicate bookmark,
but it does not detect the problem because it uses
the Point, not the Start of the cursor to check,
while the CrossRefBookmark class then discards the Point
and uses the Start.

subsequently this crashes when copying the duplicate bookmarks to
the clipboard, because by then there is no extent anymore.

fixed on master
Comment 3 Commit Notification 2015-05-15 22:22:12 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#90808: sw: fix detection of duplicate CrossRefBookmarks

It will be available in 5.0.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 4 Timur 2015-05-18 09:37:18 UTC
Please backport.
Comment 5 Commit Notification 2015-05-18 10:34:06 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

tdf#90808: sw: fix detection of duplicate CrossRefBookmarks

It will be available in 4.4.4.

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 2015-07-02 16:55:25 UTC
Varun committed a patch related to this issue.
It has been pushed to "master":

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

Add test for tdf#90808 duplicate CrossRefBookmarks

It will be available in 5.1.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 7 Cor Nouws 2015-10-07 16:08:25 UTC
please see comment https://bugs.documentfoundation.org/show_bug.cgi?id=94804#comment8
Comment 8 Robinson Tryon (qubit) 2015-12-17 08:58:54 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]