New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search and replace infinite loop #4270

Closed
Idrias opened this Issue Feb 4, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@Idrias

Idrias commented Feb 4, 2016

When using the search and replace feature of the editor, clicking "replace all", the editor does not respond anymore. This happens when the replacement term contains the term we search for itself.

For example:
Search for: bcd
Replace with: abcd

-> Replace all

Will end up crashing Processing because it always finds the term "bcd" and puts another "a" in front of it (like "aaaaaaaaaaaaaaaaaaabcd").

@Akarshit

This comment has been minimized.

Show comment
Hide comment
@Akarshit

Akarshit Feb 4, 2016

Member

@Idrias I was testing this(with the above example) but am unable to reproduce the issue. I when select Replace All bcd gets replaced with abcd only once and the editor is fully responsive. Could you please post a snippet of the code that is causing the error.

Member

Akarshit commented Feb 4, 2016

@Idrias I was testing this(with the above example) but am unable to reproduce the issue. I when select Replace All bcd gets replaced with abcd only once and the editor is fully responsive. Could you please post a snippet of the code that is causing the error.

@Idrias

This comment has been minimized.

Show comment
Hide comment
@Idrias

Idrias Feb 4, 2016

@Akarshit I think my description did not accurately meet the problem, because it only seems to happen when you check the "all tabs" box, no matter if you actually have more than one tab open or not.
It freezes for me once it finds "bcd" AND "all tabs" is checked

screenshot 10

Idrias commented Feb 4, 2016

@Akarshit I think my description did not accurately meet the problem, because it only seems to happen when you check the "all tabs" box, no matter if you actually have more than one tab open or not.
It freezes for me once it finds "bcd" AND "all tabs" is checked

screenshot 10

@Akarshit

This comment has been minimized.

Show comment
Hide comment
@Akarshit

Akarshit Feb 4, 2016

Member

Thanks @Idrias
This has been fixed in #4271

Member

Akarshit commented Feb 4, 2016

Thanks @Idrias
This has been fixed in #4271

@JobLeonard

This comment has been minimized.

Show comment
Hide comment
@JobLeonard

JobLeonard Feb 5, 2016

I could swear I remember this being an issue in Processing 2 and it having been fixed at some point. Did it somehow sneak back in?

JobLeonard commented Feb 5, 2016

I could swear I remember this being an issue in Processing 2 and it having been fixed at some point. Did it somehow sneak back in?

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Feb 14, 2016

Member

Fix incorporated for 3.0.2.

Member

benfry commented Feb 14, 2016

Fix incorporated for 3.0.2.

@benfry benfry closed this Feb 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment