Bug 128711 - Infinite Loop if I use replaceAll for Hyperlinked words in Impress
Summary: Infinite Loop if I use replaceAll for Hyperlinked words in Impress
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.0.7.3 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2019-11-11 13:18 UTC by rebahozkoc
Modified: 2021-06-11 03:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example odp file (43.24 KB, application/vnd.oasis.opendocument.presentation)
2019-11-11 13:27 UTC, rebahozkoc
Details
replaceAll code written in Python (231 bytes, text/x-python)
2019-11-11 13:28 UTC, rebahozkoc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rebahozkoc 2019-11-11 13:18:53 UTC
Description:
replaceAll replaces word with given word but if the searched word is in a text with a hyperlink then program enters an infinite loop. It also happens when I use Find & Replace button in the Impress. 

Steps to Reproduce:
1. In a impress file write a text with an hyperlink to somewhere.
2. Open Find & Replace from the MENU or use this code:


pages = oDoc.getDrawPages()
for selected_page in pages:
    replace = selected_page.createReplaceDescriptor()
    replace.setSearchString("text")
    replace.setReplaceString("replace_with")
    selected_page.replaceAll(replace)


3. Search the text and try to replace with something.

Actual Results:
It adds same word to specified position again and again if I use replaceAll.
It deletes all hyperlinked text except changed word if I use Find & Replace button. 

Expected Results:
It should add the word once.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.10
CPU threads: 12; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 rebahozkoc 2019-11-11 13:27:24 UTC
Created attachment 155702 [details]
Example odp file
Comment 2 rebahozkoc 2019-11-11 13:28:08 UTC
Created attachment 155703 [details]
replaceAll code written in Python
Comment 3 Xisco Faulí 2019-11-26 10:24:40 UTC
Thank you for reporting the bug.
it seems you're using an old version of LibreOffice.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 4 rebahozkoc 2019-12-04 12:08:29 UTC
I tested it with LİbreOffice 6.4 beta 1. Problem still exists.
Comment 5 Stanislaus J. Pinasthika 2019-12-09 02:36:49 UTC
I tried to reproduce the issue using 
Version: 6.5.0.0.alpha0+
Build ID: 5030be4e85179147476b1e441eb618fb6ed58235
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: kf5; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-11-28_20:14:48
Locale: id-ID (id_ID.UTF-8); UI-Language: en-US
Calc: CL

the find and replace dialog box didn't close, and the hyperlink for the words has gone. is that the problem?
Comment 6 rebahozkoc 2019-12-09 10:47:10 UTC
Yes, if I use replace dialog box to replace words I get the same result as you get and I think this is a problem.

pages = oDoc.getDrawPages()
for selected_page in pages:
    replace = selected_page.createReplaceDescriptor()
    replace.setSearchString("text")
    replace.setReplaceString("replace_with")
    selected_page.replaceAll(replace)

If I use this code problem gets worse, the program enters to an infinite loop.
Comment 7 Buovjaga 2020-04-27 16:33:06 UTC
No comment on the Python code, but trying in the UI, I don't enter into an infinite loop.

Arch Linux 64-bit
Version: 7.0.0.0.alpha0+
Build ID: 6a9c7409ee617b79c327dd7ea4de432f448b6006
CPU threads: 8; OS: Linux 5.6; UI render: default; VCL: kf5; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 24 April 2020
Comment 8 Xisco Faulí 2020-11-11 15:45:07 UTC
I can't reproduce this issue in

Version: 7.1.0.0.alpha1+
Build ID: 03cafc2ab6b1678f82e9a30b6f81e505660ee702
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Steps i followed:
1. Open impress
2. Insert a hyperlink with text 'Hello'
3. Open Find a replace dialog, replace 'Hello' with 'replacement'.

Please, provide the steps to reproduce this issue
Comment 9 QA Administrators 2021-05-11 03:51:37 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2021-06-11 03:50:08 UTC
Dear rebahozkoc,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp