Bug Hunting Session
Bug 101873 - Cursor jumps to the begin of the document after searching for text not found
Summary: Cursor jumps to the begin of the document after searching for text not found
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.3.0 target:6.2.2
Keywords: bibisected, bisected, regression
: 104690 114454 (view as bug list)
Depends on:
Blocks: Find-Search Writer-View-Jumps
  Show dependency treegraph
 
Reported: 2016-09-03 09:53 UTC by el
Modified: 2019-03-13 17:37 UTC (History)
8 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 el 2016-09-03 09:53:16 UTC
1. Open a Writer Document.

2. Write something, so that you have more than one page of text.

3. Search for a text that IS NOT in the document => of course nothing is found.

4. Search again by pressing the "find next" or the down arrow symbol => again nothing is found, but the document is scrolled to the beginning of the document.

5. Search for a text that IS in the document => nothing is found. Only when you search again then the text is found.

 1:5.1.5~rc2-0ubuntu1~trusty1
 de-DE (de_DE.UTF-8)
Comment 1 m.a.riosv 2016-09-03 11:23:39 UTC
Not reproducible on:
Win10x64
Version: 5.1.5.2 (x64)
Build ID: 7a864d8825610a8c07cfc3bc01dd4fce6a9447e5
CPU Threads: 1; OS Version: Windows 6.19; UI Render: default; 
Locale: es-ES (es_ES); Calc: CL
Comment 2 el 2016-09-03 13:07:16 UTC
Tested with Ubuntu Live CD (64 bit):

5.1.4.2 also has this bug, so I'm changing the Version number.

4.2.8.2 works ok. It gives the message "Do you want to continue at the beginning? LibreOffice Writer has searched to the end of the document." which is not present in 5.1.4.2 , so there was a redesign/change in the Find dialog.
Comment 3 Aron Budea 2016-09-04 07:21:58 UTC
Reproduced in Windows 7 and Ubuntu 16.04 with a couple of different versions between 5.0.0.5 and 5.2.1.1. Not reproduced with 4.4.0.3. => regression.

Migual, can you try with these (maybe slightly more) precise steps:
1. Start a new document.
2. Type "something".
3. Press Ctrl-F, and search for not existing word "fig" by pressing Enter (do this 2x). You'll get result "Search key not found" as expected.
4. Search for "something" by pressing Enter.

Bug: you will get result "Search key not found"
(second Enter will jump to the word)
Comment 4 m.a.riosv 2016-09-04 11:07:35 UTC
Seems it happens sometimes but not always.
Versión: 5.0.6.2 (x64)
Build ID: b3fbfa99158a1030fb79f0ba72b6851afc3c7895-GL
Not reproducible:
Version: 4.4.7.2
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Comment 5 raal 2016-10-01 15:43:49 UTC
No repro: Version: 5.3.0.0.alpha0+
Build ID: 73c7e0921d752df53004ed55735f3e8888cc592f
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default;
Comment 6 Aron Budea 2016-10-01 22:09:41 UTC
Still occurs for me with steps described in comment 3.

Version: 5.3.0.0.alpha0+
Build ID: cf4ff92144726a91508fcaf4be21170eac5cb99a
CPU Threads: 4; OS Version: Windows 6.1; UI Render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-10-01_00:13:03
Locale: hu-HU (hu_HU); Calc: group
Comment 7 raal 2016-10-02 09:02:07 UTC Comment hidden (obsolete, wrong)
Comment 8 raal 2016-10-02 09:04:35 UTC
(In reply to raal from comment #7)
> This seems to have begun at the below commit.
> Adding Cc: to Aybuke Ozdemir; Could you possibly take a look at this one?
> Thanks
> 

Sorry , wrong bug
Comment 9 Kumāra 2016-12-15 08:30:13 UTC
(In reply to el from comment #0)
> 4. Search again by pressing the "find next" or the down arrow symbol =>
> again nothing is found, but the document is scrolled to the beginning of the
> document.

This part itself is already annoying: It troubles the user to manually go back to the original place in the document (which may be far away in a long document).

[Note: I've been depending on a workaround by using Undo and Redo, if possible.]
Comment 10 Kumāra 2016-12-15 08:38:18 UTC
The Summary "Searching for text doesn't find it the first time after searching for text that is not in the document" is a bit confusing to me, but I understand the difficulty of wording the bug.

OP, are you ok with this?
Problem occurs after searching for text NOT found in document

We then let others find out the details of the problem in your Description.
Comment 11 Kumāra 2016-12-15 08:41:04 UTC
*** Bug 104690 has been marked as a duplicate of this bug. ***
Comment 12 el 2016-12-16 16:06:56 UTC
(In reply to Kumāra from comment #10)
> The Summary "Searching for text doesn't find it the first time after
> searching for text that is not in the document" is a bit confusing to me,
> but I understand the difficulty of wording the bug.
> 
> OP, are you ok with this?
> Problem occurs after searching for text NOT found in document
> 
> We then let others find out the details of the problem in your Description.


Sure, you can change the description if that makes it better understandable.
Comment 13 Aron Budea 2017-01-05 21:28:07 UTC
Not in range of Linux bibisect-50max repo.
Comment 14 Aron Budea 2017-01-05 23:35:16 UTC Comment hidden (bibisection)
Comment 15 Aron Budea 2017-01-05 23:36:21 UTC
Bug started with the commit listed below. Adding Cc: to Miklos Vajna, please take a look.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=8d2fe8d7e5f374f3a106a4fc58ef597a52815ad0
author	Miklos Vajna <vmiklos@collabora.co.uk>	2015-06-03 07:03:48 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2015-06-03 07:20:14 (GMT)

"SwView::SearchAndWrap: fix WrapAround search in fly frames"
Comment 16 Thomas Lendo 2017-12-14 23:08:33 UTC
*** Bug 114454 has been marked as a duplicate of this bug. ***
Comment 17 QA Administrators 2018-12-15 03:56:05 UTC Comment hidden (obsolete)
Comment 18 Thomas Lendo 2019-01-05 18:42:39 UTC
Still repro.
Version: 6.3.0.0.alpha0+
Build-ID: be8897d9c63a77b223a9c0aed1d2eb689e0e0082
CPU-Threads: 4; BS: Linux 4.15; UI-Render: Standard; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-01-02_04:49:04
Comment 19 Miklos Vajna 2019-02-14 15:38:34 UTC
(In reply to Aron Budea from comment #3)
> 1. Start a new document.
> 2. Type "something".
> 3. Press Ctrl-F, and search for not existing word "fig" by pressing Enter
> (do this 2x). You'll get result "Search key not found" as expected.
> 4. Search for "something" by pressing Enter.

I'll look at this.
Comment 20 Commit Notification 2019-02-19 08:10:38 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/9c1383e4da135db28c422752153e9a77558e8c2f%5E%21

tdf#101873 sw: fix search for second term after double not found

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2019-02-19 13:52:35 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/62c1acdda27966c810cab25a1d0667c6a18c436d%5E%21

tdf#101873 sw: fix search for second term after double not found

It will be available in 6.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2019-02-19 17:52:32 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/92849660e21d5a13fb671339e52cbc30335ab842%5E%21

uitest for bug tdf#101873

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2019-02-20 11:20:02 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/971788dd2caa218321714f5e79a29349f934a01c%5E%21

Revert "uitest for bug tdf#101873"

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 24 Xisco Faulí 2019-03-13 17:37:37 UTC
Issue verified in

Version: 6.3.0.0.alpha0+
Build ID: 8aa579830b20072af8d6e149d6b279362fe98b91
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Miklos, thanks for fixing this!