Function list "jumping" to wrong location in code

Function list "jumping" to wrong location in code

3
NewbieNewbie
3

    Nov 14, 2009#1

    Hi All,

    anyone else seeing this:
    when configuring the function list to show all functions of a project, a double click on an item always opens the same file on some arbitrary (consistent) line, not the file that actually contains the function.
    Happens with the latest UE 15.20.0.1020 and regardless of whether the list is sorted or not.

    Regards
    Uwe

    6,681583
    Grand MasterGrand Master
    6,681583

      Nov 14, 2009#2

      I opened one of my projects (mixed C / ASM) with UE v15.20.0.1020, opened the function list, enabled List for all Project Files, and clicked on more than 20 functions (ASM and C) and always the correct file was opened and the cursor positioned correct. So I could not reproduce the problem you see.

      Can you tell me which type of files are your project files, what are the regular expression strings used to find the functions and which type your project is?

      My project uses groups (not folders) and the project files are relative to a defined project directory on local harddisk.
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        Nov 15, 2009#3

        Hi Mofi,

        thanks for your reply.
        Can you tell me which type of files are your project files, what are the regular expression strings used to find the functions and which type your project is?
        Project files are C and asm (a51) files and I'm using the standard reg exs to find functions (c_cplusplus.uew), neither Groups nor Folders, all in the same directory on a local disk.
        My function declarations look like this

        Code: Select all

        void
        function_name(
        	void
        	)
        
        I'd have to admit.

        All functions clicked on in the functions list will open the first project ('c') file in the list, on the correct line, though, i.e. on the line the function definition would start in the correct file.
        A lot of empty strings in the list as well, by the way.

        Thanks for your help, it's much appreciated.

        Regards
        Uwe

        6,681583
        Grand MasterGrand Master
        6,681583

          Nov 15, 2009#4

          Okay, I could reproduce the problem now creating a sample project with some of my C files and using UltraEdit with standard settings and wordfiles instead of my customized wordfile.

          The problem is definitely caused by the Perl regular expressions in c_cplusplus.uew. Before UE v15.20 the expressions were for the UltraEdit regexp engine. With the UltraEdit regular expression strings there is no problem with cursor positioning on click of functions in any file of a project.

          But with the Perl regular expressions in c_cplusplus.uew UE v15.20.0.1020 does not open/activate the correct file before positioning the cursor on the correct line. Instead it always opens/activates the last project file and sets there the cursor when option List for all Project Files is enabled.

          This is definitely a bug. Please report it by email to IDM support.

          As workaround you can use the regular expressions of UE v15.10 for C/C++. They are at top of the wordfile in wordfile.zip which I have not yet updated with the content of UE v15.20 and therefore contains still the standard wordfiles of UE v15.10 in one single file.
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            Nov 15, 2009#5

            Hi Mofi,

            thank you very much for spending the time necessary to analyze this problem.

            I will send an email with a bug report to IDM, you sure spent enough of your time on this.

            Thanks for providing the workaround as well.
            Will definitely try that.

            Regards
            Uwe

            1

              Jan 24, 2010#6

              Rather than start a new category for a related topic I thought I'd add to this one.

              I had an interesting problem with the function list display - a case of invisible function names...
              This happened with both UE 15.00 and 15.20 - I am running XP-Pro sp3

              The problem I had with my C# files was that some would display the function names in the function list and some wouldn't. The ones that did show the function names also showed a similar problem of jumping to the wrong line when I clicked on the function name in the function list, but that isn't the point.

              The interesting thing was the files with an empty function list (and I mean empty, it didn't even say "no functions") behaved exactly as if the function names were there. Clicking on the function in the code placed the highlight in the function list on or near where the right function name should have been, and clicking half way down the "empty" function list made the highlight in the code jump to roughly the right place...

              I have had an email exchange with IDM, who say it is my wordfile Regex patterns, but that didn't explain why some files display okay and some don't, all in the same project and all using the same wordfile.txt.

              I finally tracked it down to the file format. I hadn't noticed that some files were in DOS format and some in UTF-8. The DOS ones displayed in the function list, the UTF-8 did not, but the function list still knew where the functions were.

              I have reported this to IDM but they seem stuck on my non-standard regex patterns, which work fine for me now the files are in DOS format.

              Anyone else had a problem with invisible function names?

              6,681583
              Grand MasterGrand Master
              6,681583

                Jan 24, 2010#7

                I reported by email to IDM support on 10 Dec 2009 also that the displayed function names in the function list are not correct for Unicode files and the cursor positioning also does not work correct when the file is a Unicode file with UE v15.20.0.1022. I detected and reported this while testing the new function strings for Cascading Style Sheets. In my test scenario some items in the function list contained a character which should not be displayed, but can be seen in the function list when the source file is a Unicode file. Converting the files to ASCII/ANSI immediately resulted in 100% correct working function list.

                Please post your function strings and also some "problematic" functions found by your function strings. Maybe I can help you to find regular expressions which results in displaying the same in the function list for your files with the exception working better for Unicode encoded files.

                Do you know the Perl regexp function list for C#?
                Best regards from an UC/UE/UES for Windows user from Austria