[PyKDE] eric: Infinite loop in search and replace

Parzival Herzog parzp at shaw.ca
Thu Oct 28 05:15:57 BST 2004


I replaced text "file" with "filename", a range of lines was selected,
and the "wrap around" option was selected. I pressed "replace all", and Eric 
proceeded to infinitely replace text, windows flashing scrollbars bouncing, 
but otherwise totally unresponsive. I had to kill the process and lost some 
work.

I have had other times that I lost control of Eric due to some unfortunate
search and replace action. I would like to suggest that this is a bug,
not just deserts for my own stupidity.

Infinite search-replace loops can be avoided by

1) not permitting a repetitive search-replace that can match the empty string 
at any position;
2) advancing the repeated search point to after any replacement text; and
3) not permitting the wrap-around to wrap past the place the operation was 
started at.

If this problem is due to some faulty external component e.g. QScintilla, 
perhaps eric could perhaps offer a way to asynchronously abort the operation.

-- 
Parzival Herzog




More information about the PyQt mailing list