Jump to content
MathewV

Delphi 11.1 Crash on Search Menu Access

Recommended Posts

Hi All,

 

Anyone else having this issue? When I click on the Search Menu the whole IDE locks up for 5 seconds and then crashes to Desktop. (Win 11).

 

I have narrowed it down that it only happens when I have some text in a pas file highlighted. If i click elsewhere in the pas file to deactivate the highlight then I can access the search menu.

 

Many years of copying highlight text and searching for it will be a hard habit to break so hoping someone may have a clue about this one. I added notes to a QA issue [RSP-32942]

 

Thanks

 

Mathew

Share this post


Link to post

This works fine (both Find... and Find in files...) using highlighted text for C++ files running 11.1 under windows 10. Difficult to imagine why it should be different on Windows 11, so lets see if anyone else has the same issue....

Share this post


Link to post

Works fine for me as well, D11.1 on Win10. Does your source file use an encoding other than ANSI?

Share this post


Link to post

Just tried it again 20 times and could not make it happen!!! Earlier today it happened every single time I had highlighted text and clicked the Search menu.

 

We have three devs and 3 installs. While I was getting it occasionally at the start one other install had it all the time. Then I started getting it all the time. The third only got the issue occasionally.

 

It's a 5 million line project will all units ANSI.

 

I'll keep an eye on it and see if there is something else that we can spot.

Share this post


Link to post

No crash here but I always have some "fear" when clicking the "Search" menu because it can either open instantly, or wait a few seconds which is infuriating. The same happens with the CTRL+SHIFT+F keyboard shortcut.

I'm still using Delphi 11 but someone on Facebook mentioned that this is still happening with 11.1 😒

Share this post


Link to post

It happened to me for the first time this weekend.  I could not replicate the issue.  I believe I did have some text highlighted in the editor as I was copying to paste into the search form.

 

Share this post


Link to post

It is maddening as I have not had it happen again. We first saw the issue in D11 but never persevered because of the issues with debugging DLLs when using packages (fixed in D11.1 although break on exceptions never make it to code).

 

Darren, how long have you used D11.1? Was it in a project that you opened for the first time?

The fact that I have not been able to repeat it makes me think that perhaps there was some sort of indexing going on and that is now complete?????

 

John, I read elsewhere that some are having issues with the Refactor menu too. I've not see that myself.

Share this post


Link to post
2 hours ago, MathewV said:

Darren, how long have you used D11.1? Was it in a project that you opened for the first time?

It happened with a project that I have worked on nearly daily since the release of 11.1  (so not an one time initialization type event.)

Share this post


Link to post

I have exactly the same issue (Delphi 11.1 on Win11).

I have tried uninstalling all of my plugins, but that seems to have no effect on the problem.

Restarting Delphi or the computer also has no effect.

 

It seems almost calendar-related, because it can work absolutely fine for weeks, and then it abruptly stops working and will give a crash with 100% certainty every time if I have any text selected when pressing Ctrl+Shift+F.

Once it has stopped working, it will remain non-functional for weeks until it suddenly starts working again.

 

The search functionality always works fine, as long as no text is selected in the editor.

 

Has anyone reported this issue to Embarcadero yet, or should I report it?

Share this post


Link to post

We narrowed it down to when there is a huge unit open (over 5000 lines of code). If that is closed in the IDE then it works.

 

We have reported it https://quality.embarcadero.com/browse/RSP-32942

 

It is not the Search that is the issue but the search menu. I got around this issue by adding a search button to the tool bar

Right-Click and select customize

Then go to the search group and drag "Find in Files" into your tool bar.

image.thumb.png.7645d1fc39cc05af736673ba78725c74.png

 

Hope that helps

Share this post


Link to post

As said, the error is not the search itself, but the refactoring part of the search menu, which barfs on some source code. As the underlying parser will be replaced by an LSP based one in the future.

 

If you have no need for the refactoring at all, you can just disable the package in the Delphi registry: Known IDE Packages, $(BDS)\bin\refactoride280.bpl, edit the value and insert two underscores at the beginning.

No guarantee, that the IDE will not get somewhat unstable by this. In that case revert the change.

Share this post


Link to post
2 hours ago, MathewV said:

We narrowed it down to when there is a huge unit open (over 5000 lines of code). If that is closed in the IDE then it works.

 

We have reported it https://quality.embarcadero.com/browse/RSP-32942

 

It is not the Search that is the issue but the search menu. I got around this issue by adding a search button to the tool bar

Right-Click and select customize

Then go to the search group and drag "Find in Files" into your tool bar.

image.thumb.png.7645d1fc39cc05af736673ba78725c74.png

 

Hope that helps

Thanks Mathew,

I have voted for that defect.

After some testing, your suggested workaround also seems to work. However, I strongly prefer to work with keyboard shortcuts.

 

Therefore, I will try to see if Uwe's suggestion works since I have no need for (or rather don't trust) the built-in refactoring at all.

Share this post


Link to post
1 hour ago, Uwe Raabe said:

As said, the error is not the search itself, but the refactoring part of the search menu, which barfs on some source code. As the underlying parser will be replaced by an LSP based one in the future.

 

If you have no need for the refactoring at all, you can just disable the package in the Delphi registry: Known IDE Packages, $(BDS)\bin\refactoride280.bpl, edit the value and insert two underscores at the beginning.

No guarantee, that the IDE will not get somewhat unstable by this. In that case revert the change.

Thanks Uwe,

Your suggestion seems to work really great!

I did however do some searches around Known IDE Packages and came across the excellent tool "Known IDE Package Manager" by @dummzeuch

image.thumb.png.7e2fd77632c8e8b76043294b421695df.png

That tool is what I used to fix this issue, and it also helped me find some other packages that seem pointless to me which I also disabled.

Delphi feels a lot quicker to work in now, especially how fast the search window opens up (and no longer crashes!)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×