Bug 108826 - Assertion failed when moving the mouse after deleting embedded content
Summary: Assertion failed when moving the mouse after deleting embedded content
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:6.0.0 target:5.4.0.2
Keywords: bibisected, regression
Depends on:
Blocks: Crash-Assert OLE-Objects
  Show dependency treegraph
 
Reported: 2017-06-28 01:34 UTC by Aron Budea
Modified: 2017-07-04 10:30 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample ODT with embedded document (15.81 KB, application/vnd.oasis.opendocument.text)
2017-06-28 01:34 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2017-06-28 01:34:44 UTC
Created attachment 134330 [details]
Sample ODT with embedded document

Open the attached document with another document embedded in it.
Select the embedded document (leave your mouse cursor over it) and delete it with the Delete key.
Move mouse slightly.

=> Assertion failed.

In sw/source/doc/docbasic.cxx / line 172:

// this shouldn't be possible now that SwCallMouseEvent
// listens for dying format?
assert(false);
http://opengrok.libreoffice.org/xref/core/sw/source/core/doc/docbasic.cxx#172

After hitting Abort there's another assertion in Visual C++'s vector implementation (probably the illegal state messing up something further).

Reproduced using master build (ce6b877ba89ae4193f7a719a7dfa4bb45ecd04e4) / Windows 7.
Comment 1 Aron Budea 2017-06-28 01:35:34 UTC
As it's an assertion failure, it requires debug build to repro.
Comment 2 Julien Nabet 2017-06-28 07:20:29 UTC
Since it's the same assert than https://bugs.documentfoundation.org/show_bug.cgi?id=108814, it might be already fixed thanks to https://cgit.freedesktop.org/libreoffice/core/commit/?id=d109948f0dd4190d7aca1e0fa7e2706ef3f40a6c

Could you give a try with a build including this commit?
If it's not fixed, it could be relevant to cc Michael Stahl.
Comment 3 Aron Budea 2017-06-28 13:48:05 UTC
Unfortunately it isn't fixed by that commit, I tried with a fresh build in Linux (48f64e974c8e7fed62e32d885ed6457d961da638).

However, with the daily dbgutil bibisect repo I found out this is a regression:
2017-05-04: source-hash-2514e38f8ebb95f51783ce321a84d6c55bba1de4
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=93f5cb55349e6de5003182462bfee434dc51f6ad..2514e38f8ebb95f51783ce321a84d6c55bba1de4

I can see the commit by Julien in https://bugs.documentfoundation.org/show_bug.cgi?id=108814#c3 is from this range... maybe that's the cultprit here? Michael, please take a look.
Comment 4 Aron Budea 2017-06-28 13:49:40 UTC
Oops, I mean, commit mentioned by Julien in that comment.
Comment 5 Xisco Faulí 2017-06-28 14:11:54 UTC
I can't reproduce it in

Version: 5.4.0.0.beta2+
Build ID: 721efbeb117962e9b0cd547b51ede4a6736042a6
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 6 Michael Stahl (allotropia) 2017-06-28 14:36:15 UTC
fixed on master
Comment 7 Commit Notification 2017-06-28 14:36:27 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#108826 sw: also handle RES_REMOVE_UNO_OBJECT in SwCallMouseEvent

It will be available in 6.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 8 Commit Notification 2017-07-04 10:30:20 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

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

tdf#108826 sw: also handle RES_REMOVE_UNO_OBJECT in SwCallMouseEvent

It will be available in 5.4.0.2.

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.