Bug Hunting Session
Bug 88911 - EDITING: Crash when dragging text from document to navigator pane
Summary: EDITING: Crash when dragging text from document to navigator pane
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.1.0 target:5.0.0.1 target:4...
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2015-01-29 19:45 UTC by Gordo
Modified: 2016-10-25 19:24 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
20150131.backtrace (10.69 KB, text/plain)
2015-01-31 14:49 UTC, Gordo
Details
Document with Custom Styles (16.29 KB, application/vnd.oasis.opendocument.text)
2015-02-23 17:10 UTC, Gordo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gordo 2015-01-29 19:45:59 UTC
Dragging text to a heading in the navigator pane crashes the application.  This is with the Content View unselected--the all types view.  I don't know what's supposed to happen.  I thought maybe the text would be copied under the heading in the document.  Drag mode was Hyperlink.  It also crashed with drag mode Copy.

I can have two navigator panes open.  The one from previous versions and the other is the sidebar.  This happens in the independent one.  And just for good measure, I did it the sidebar navigator and it also crashed.

The selected text did not have an outline level in the paragraph style.

As my old project manager used to ask, "Is it a show stopper?" just before a go live event, to which I replied, "Only if someone notices."
Comment 1 Buovjaga 2015-01-31 12:16:13 UTC
Could not reproduce.

1. Set some text to heading style.
2. Wrote some regular text and dragged it to the heading in the navigator.
3. Nothing happened.

Maybe try to get a backtrace of the crash: https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg

Win 7 Pro 64-bit, LibO Version: 4.4.0.3
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Comment 2 Gordo 2015-01-31 14:49:23 UTC
Created attachment 112997 [details]
20150131.backtrace
Comment 3 raal 2015-02-23 09:27:57 UTC
I can not confirm with LO 4.4.0.3, win7. Can you provide test document and exact steps how to reproduce error? Thank you.
Comment 4 Buovjaga 2015-02-23 10:36:45 UTC
Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information and test document.
Comment 5 Gordo 2015-02-23 17:10:05 UTC
Created attachment 113626 [details]
Document with Custom Styles

1. Navigator is docked and not floating.
2. In Navigator, make sure Content View is unselected.
3. Under Headings, expand Chapter 1.
4. Select the following text:  "SHUV:  Short Haul Utility Vehicle." from document.
5. Drag selection to the "Characters:" heading.
6. Crash.
Comment 6 Gordo 2015-02-23 17:45:27 UTC
It's maybe to do with the location of a colon and spaces in a selection.  If I select part of the sentence that doesn't include the colon then it doesn't crash.
Comment 7 Buovjaga 2015-02-23 18:41:32 UTC
(In reply to Keymasher from comment #5)
> Created attachment 113626 [details]
> Document with Custom Styles
> 
> 1. Navigator is docked and not floating.
> 2. In Navigator, make sure Content View is unselected.
> 3. Under Headings, expand Chapter 1.
> 4. Select the following text:  "SHUV:  Short Haul Utility Vehicle." from
> document.
> 5. Drag selection to the "Characters:" heading.
> 6. Crash.

Yep, can repro crash with dragging SHUV:  Short Haul Utility Vehicle.
Doesn't crash, if I only drag Short Haul Utility Vehicle.

Win 7 64-bit
Version: 4.5.0.0.alpha0+ (x64)
Build ID: 9c6ce47eaf1a891edf7c200145de400fd1cf2871
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-02-23_01:55:33
Locale: fi_FI
Comment 8 raal 2015-02-23 18:58:25 UTC
I can reproduce crash on linux, Version: 4.5.0.0.alpha0+
Build ID: 52fa2e97dfef1a5f27aaee6af7ed80800641b86c
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-02-22_01:03:18

I can reproduce crash with 4.3.3.2, linux
Comment 9 Buovjaga 2015-02-24 06:14:18 UTC
Crash reproduced already with 3.3.0.

Ubuntu 14.10 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 10 Aron Budea 2015-03-23 01:21:18 UTC
The immediate cause of the crash is that rReq.GetReturnValue() returns null in the line below:
http://opengrok.libreoffice.org/xref/core/sfx2/source/appl/appopen.cxx#1118

However, this does not seem to be the main issue. The interesting part happens in SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt ), precisely in
SwNavigationPI::CreateDropFileName( aData ), called from here:
http://opengrok.libreoffice.org/xref/core/sw/source/uibase/utlui/navipi.cxx#1146

Using the example above, it can be seen that the code tries to create an INetURLObject from the selected string "SHUV:  Short Haul Utility Vehicle.", and actually succeeds, and creates... something.
That doesn't seem to be the intended Drag&Drop behavior. What could it be, though?
Comment 11 Caolán McNamara 2015-06-15 20:09:39 UTC
originally dispatched from SwNavigationPI::ExecuteDrop I imagine
Comment 12 Commit Notification 2015-06-16 08:31:48 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#88911 Crash when dragging unsupported url to navigator pane

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 13 Commit Notification 2015-06-16 08:46:27 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

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

Resolves: tdf#88911 Crash when dragging unsupported url to navigator pane

It will be available in 5.0.0.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 14 Commit Notification 2015-06-18 12:12:35 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

Resolves: tdf#88911 Crash when dragging unsupported url to navigator pane

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