Menu

#120 Grep Bug when searching DFM files

Cannot_Reproduce
closed-out-of-date
5
2019-07-21
2019-04-19
No

This is about Delphi 6. I received this via email:

I've picked up the grep search funcitonality doesn't work as expected in the last couple of versions.

For example, I had 1.38 and tried a few prior ones. If I search for a specific number that I know exists in one of my dfm files, it's not picked up. If I open that form, and then repeat the search, then it picks it up. If I close the form again, and repeat the same search, its ommitted.

I noticed the specific search works on a colleagues machine and I noted he had 1.11 on, very very old. I tried 1.12 and now the search works.

We are still working in Delphi 6.

Bug Details:

The bug is reproducible 100% of the time
The bug is project specific

Steps:

  1. Start Delphi from the start menu
  2. The default (empty) project is open
  3. On the main menu, select ...
    [The steps 1 to 3 seem to be left from the default text, the reporter has been rather lazy]
  4. I search for the text f449 which is part of a form description. The search doesn't pick it up, unless the form is opened up.
  5. This issue doesn't appear on this verison of gexperts, but on 1.38 and 1.37 definately.

Configuration:

OS: Windows 6.2 (Build 9200)
GExperts: GExpert6.dll 1.1.2.0 from 14/09/2036 18:24:52

reported via email by Frank Pedro

Discussion

  • Thomas Mueller

    Thomas Mueller - 2019-04-27
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -25,3 +25,5 @@
    
     OS: Windows 6.2 (Build 9200)
     GExperts: GExpert6.dll 1.1.2.0 from 14/09/2036 18:24:52
    +
    +reported via email by Frank Pedro
    
    • assigned_to: Thomas Mueller
     
  • Thomas Mueller

    Thomas Mueller - 2019-04-27
    • Group: New --> Cannot_Reproduce
     
  • Thomas Mueller

    Thomas Mueller - 2019-04-27

    I just tried to reproduce this in the current source code, but could not.

    • Ceate a new project in Delphi6
    • add another form to it
    • add a TEdit with the name ed_blablub125
    • Save the whole project (File -> Save All)
    • Close all forms and the editor window
    • Grep for "ed_blablub125", whole word, search DFM files, all files in project

    It found both instances of the string, one in the pas file, the other one in the dfm file.

    I need steps to reliably reproduce the problem, otherwise I can't do anything.

     

    Last edit: Thomas Mueller 2019-07-21
  • Achim Kalwa

    Achim Kalwa - 2019-05-22

    Grep searching in DFM files is broken since Rev. 2580: If a match is found, the wrong source line is used to display the match position; it is always the first line. This is because in GX_GrepRegExSearch.pas, procedure HandleFormLine(), line 183, the wrong line index is used.

    Changing doSearchLine(_Line, _LineIdx); to doSearchLine(_Line, _CurrLineIdx); solves the problem. Maybe the code for handling multi-line DFMs has the same issue since _LineIdx is used there, too.

    (I'm not sure if this is the same what the original bug reporter has found.)

     
  • Thomas Mueller

    Thomas Mueller - 2019-05-25
     
  • Thomas Mueller

    Thomas Mueller - 2019-05-25

    Thanks Achim, this fixed a problem when multiline search was not enabled. Maybe this also fixes the problem originally reported. I don't know since I could never reproduce it.

    svn revision #2649

    @Frank Pedro: Please check whether the problem has been fixed.

     
  • Thomas Mueller

    Thomas Mueller - 2019-07-21
    • status: open --> closed-out-of-date
     
  • Thomas Mueller

    Thomas Mueller - 2019-07-21

    Since I haven't heard back from the original poster, I am assuming that the bug was fixed. If not, please file a new bug report.

     

Log in to post a comment.

MongoDB Logo MongoDB