Bug 61193 - EDITING: Writer crashes when pasting RTF footnote
Summary: EDITING: Writer crashes when pasting RTF footnote
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium major
Assignee: Miklos Vajna
URL:
Whiteboard: target:4.1.0 target:4.0.3
Keywords: regression
: 63186 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-20 21:54 UTC by Bradley Grainger
Modified: 2013-04-16 09:28 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bradley Grainger 2013-02-20 21:54:05 UTC
Pasting RTF text from the clipboard that contains a footnote crashes Writer.

A minimal repro can be constructed by writing a program that puts the following string on to the Windows clipboard (in RTF format); for example, the following C# fragment will cause the bug:

System.Windows.Forms.Clipboard.SetData(System.Windows.Forms.DataFormats.Rtf, @"{\rtf1\ansi text.{\footnote footnote}}");

Once that data is on the clipboard, execute the Paste command in Writer; it will crash. Microsoft Word 2010 does not crash with this input.

Other methods of reproducing the crash are:
1) copying a footnote from Microsoft Word, then using Edit > Paste Special to paste RTF in Writer
2) copying text with a citation from Logos Bible Software 5, then pasting it into Writer (see bug discussion here: http://community.logos.com/forums/t/66629.aspx)

Windows 7 Professional x64 SP1
LibreOffice Writer 4.0.0.3 (Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89)
Comment 1 Bradley Grainger 2013-02-20 21:56:10 UTC
I pasted the incorrect link in point 2; the correct Logos Bible Software 5 discussion thread is: http://community.logos.com/forums/t/66152.aspx
Comment 2 Bradley Grainger 2013-03-31 22:00:38 UTC
Can reproduce crash in version 4.0.1.2 (Build ID: 84102822e3d61eb989ddd325abf1ac077904985).
Comment 3 Bradley Grainger 2013-04-05 22:12:59 UTC
Can reproduce crash in version 4.0.2.2 (Build ID: 4c82dcdd6efcd48b1d8bba66bfe1989deee49c3).
Comment 4 Jorendc 2013-04-07 22:27:31 UTC
*** Bug 63186 has been marked as a duplicate of this bug. ***
Comment 5 Jorendc 2013-04-07 22:31:34 UTC
Hi,

Thanks for the great bug report and additional research. As mentioned in the linked forums (http://community.logos.com/forums/t/66629.aspx and http://community.logos.com/forums/t/66152.aspx) and bug 63186 I mark this bug report as NEW.

@Miklos: any chance to have a look?

Kind regards,
Joren
Comment 6 Miklos Vajna 2013-04-15 18:37:00 UTC
Ah yes, this is because in DomainMapper_Impl::PushFootOrEndnote() we call createTextCursorByRange() on the wrong object. I'll fix this tomorrow.
Comment 7 Commit Notification 2013-04-16 08:42:18 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#61193 fix crash on RTF paste of footnote



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 8 Miklos Vajna 2013-04-16 08:45:28 UTC
-4-0 review: https://gerrit.libreoffice.org/3404
Comment 9 Commit Notification 2013-04-16 09:28:22 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

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

fdo#61193 fix crash on RTF paste of footnote


It will be available in LibreOffice 4.0.3.

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.