Bug 109081 - EDITING: LibreOffice hangs while selecting text ( with Formatting Marks ) ( LibreOffice not maximized )
Summary: EDITING: LibreOffice hangs while selecting text ( with Formatting Marks ) ( L...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0 target:5.4.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-07-12 12:29 UTC by Xisco Faulí
Modified: 2017-08-02 08:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
screencast (1.19 MB, video/ogg)
2017-07-12 12:41 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2017-07-12 12:29:51 UTC
Steps to reproduce:
1. Open attachment 108991 [details] from bug 108991
2. Enable Formatting Marks ( Ctrl + F10 )
3. Using the mouse select from the second line until the end of 'SELECT TILL THE END OF THIS TEXT AND CUT'
4. Use shift + down keys
5. Use shift + up keys
6. Ctrl + X
7. Using the mouse select the remaining text
8. LibreOffice Hangs

Reproduced in

Version: 5.5.0.0.alpha0+
Build ID: febbad7263ea25b76f4e53d2f136693a52207a1c
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 1 Xisco Faulí 2017-07-12 12:30:41 UTC
if Formatting Marks aren't enabled in step 2, bug 108991 is reproduced.
Comment 2 Xisco Faulí 2017-07-12 12:41:37 UTC
Created attachment 134603 [details]
screencast
Comment 3 Xisco Faulí 2017-07-12 12:43:30 UTC
Regression introduced by:

author	Michael Stahl <mstahl@redhat.com>	2013-10-08 16:37:35 (GMT)
committer	Michael Stahl <mstahl@redhat.com>	2013-10-08 19:22:34 (GMT)
commit 91159b1c31a7fd474ba0b97828f593604790ce3c (patch)
tree 5f389bd18b3b5a31b5e2adad5d16370ec694e4c5
parent 2541f60615ebbdebeab870625817a1f4d8ad1682 (diff)
fdo#70201: sw: eliminate no-extent RSID-only AUTOFMT hints
These are already filtered out in SwpHints::TryInsertHint(), but they
can be produced by a SwTxtNode::Update() following some deletion like in
SwTxtNode::ReplaceText() (or maybe CutImpl() and RstAttr() too?).

So in order to prevent SwHistorySetTxt being created for these,
filter them out in SwpHints::MergePortions(), which has the advantage
that it's one location to change; probably filtering in Update() and
RstAttr() both would work too.

(regression from 6db39dbd7378351f6476f6db25eb7110c9cfb291)

bisected with bibisect-42max

Adding Cc: to Michael Stahl
Comment 4 Xisco Faulí 2017-07-14 16:23:14 UTC
Correct attachment is attachment 134520 [details]
Comment 5 Xisco Faulí 2017-07-14 16:37:05 UTC
Same as in bug 108991, if LibreOffice's window is maximized, the issue is not reproduced.
Comment 6 Michael Stahl (allotropia) 2017-07-27 19:54:32 UTC
i've tried to reproduce this but i only got the stack from bug 108991,
and a out-of-bounds string access while counting words.

i'm not sure if the word counting would go into an infinite loop
without assertions, please test on master after i pushed that
if the problem still occurs.
Comment 7 Commit Notification 2017-07-27 20:10:58 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

sw: fix string accesses in SwScanner::NextWord() (related: tdf#109081)

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 Timur 2017-07-28 09:25:40 UTC
I cannot repro hang anymore.
Comment 9 Commit Notification 2017-08-02 08:15:54 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=e86f049b0bfede337c875e5f62d27186fcace37f&h=libreoffice-5-4

sw: fix string accesses in SwScanner::NextWord() (related: tdf#109081)

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