spring-attic / spring-ide

Spring Development Environment for Eclipse
299 stars 126 forks source link

Search/Replace hangs forever when the search expression is a regex #321

Closed leobut closed 5 years ago

leobut commented 5 years ago

As the title says.

How to reproduce:

  1. Open your multi-module maven project and the file search in STS 3.9.5 (for macOsx)
  2. Enter the following string into the "containing text" field: \/\*\*\s*\* TODO (.*|\s)* \*\/ This is a valid regex (even checked with https://regex101.com/ )
  3. Check the "Regular expression" checkbox on the right
  4. file name patterns don't matter, I tried with "" and ".java". Result is the same
  5. Hit the "Replace..." or "Search" button
  6. The search/replace never finshes. Only way to terminate process is to close STS.
kdvolder commented 5 years ago

I tried this in STS 4 and it doesn't seem to be a problem. This is most likely not an STS bug, but an Eclipse bug (the search dialog comes from Eclipse platform and is not specific to STS). So it is possible this presumed Eclipse bug was fixed in Eclipse 4.9 (STS 3.9.5 was based on Eclipse 4.8 whereas STS 4.0 will be based on Eclipse 4.9).

Trying it on STS 3.9.5 next.

kdvolder commented 5 years ago

Also working fine for me in STS 3.9.5. I 'mostly' followed the steps. Allthough didn't use a multi-module maven project. I just used a project created with 'new spring starter wizard'. That at least doesn't result in a hang.

If the problem is triggered by something specific in the project or its file's contents (likely in combination with the regexp) then I think we don't know what it is, nor can we easily figure it out without a sample project.

That being said, ultimtaly this isn't really an STS bug but an Eclipse bug and it should be raised as an Eclipse bugzilla ticket. If you decide to follow up and do that, I would suggest first putting a bit more work into trying to create a sample project that could be used to reproduce the problem.

I'm closing this ticket now because:

Nevertheless feel free to continue posting in this ticket. For example, if you don't feel like doing the whole Eclipse bugzilla yourself... You can still create a sample project and attach it here, I am willing to try the instructions to reproduce and confirm this is really an Eclipse bug, and follow up with raising a bug ticket with Eclipse if that is the case.