Author Topic: Go To Definition error: Can not jump to symbol ": No file name!  (Read 4197 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
When I use Ctrl+. (Go to definition), I get a dialog box with a few choices of which definition to go to.

Occasionally when I double click on one of the options I see error message: "Can not jump to symbol ": No file name!". Attached is a screen shot. SE does not go to my definition when I see this error.

If I try a next time, I don't get this error, and SE does go to the definition.

It also happens occasionally when I single click select one of the options and click "OK".

I haven't figured out how to systematically reproduce this, but it happens often enough that it is annoying.

I'm using 22.0.2 on Linux x64/CentOS 7 with hotfix 3.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #1 on: April 09, 2018, 02:11:52 PM »
What language mode are you seeing this in?

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #2 on: April 09, 2018, 02:13:31 PM »
C++

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #3 on: April 09, 2018, 02:51:57 PM »
It sounds like a timer event is messing with your active match set.  Do you have any user-written macros loaded that do symbol matching?

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #4 on: April 09, 2018, 02:53:55 PM »
I don't think that I have any user-written macros that do symbol matching.

I uploaded my macros - robutils.e to support so you can take a look.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #5 on: April 09, 2018, 11:00:55 PM »
Is there a specific timer that I can set to workaround this issue? Can you explain what may possibly be happening?

jprod1038

  • Junior Community Member
  • Posts: 7
  • Hero Points: 0
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #6 on: April 10, 2018, 04:13:09 PM »
I'm interested in this too and I see this error message from time to time.  I have SE v22.0.2 but also saw this quite a bit on v20.0.3.  I'm using SE on Linux.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #7 on: April 26, 2018, 09:28:30 PM »
It appears that the problem may be related to the Preview tool window being active.  I am adding an experimental fix for this problem for next 22.0.2 hot fix.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #8 on: June 08, 2018, 07:50:06 PM »
I still get this issue (maybe less often than before) with hotfix 6

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #9 on: June 11, 2018, 02:41:48 PM »
That's disappointing.  I will take another look at this later this week.  Really, really hard to fix a bug that you can not reproduce.  I might have to make a major change to the Select Symbol dialog underpinnings to eliminate this problem for the next release.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #10 on: June 27, 2018, 07:51:27 PM »
Unfortunately I don't know how to reproduce it at will.

If there is anything I can do to help you debug it, such as things to look out for, or if you want to send me a private vs_exe with debug prints, I'd be willing to help out with that.

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #11 on: June 30, 2018, 06:29:16 AM »
You could add the two lines marked with <<<<< below, in tags.e.
Then make your own push_tag function that does an automatic retry as a workaround.
If you see the spurious error dialog again, look for the slick debug window and grab the dump data.

int tag_failed_no_filename;
_command debug_push_tag(...)
{
    tag_failed_no_filename = false;
    push_tag(...);
    if (tag_failed_no_filename)
    {
        push_tag(...);   // try again
    }
}



Code: [Select]
int tag_select_symbol_match(VS_TAG_BROWSE_INFO &cm,
                            bool addMatches=false,
                            VSCodeHelpFlags codehelpFlags=VSCODEHELPFLAG_NULL)
{
   // display dialog to select the appropriate tag match
   match_id := tag_select_match(codehelpFlags);
   if (match_id == COMMAND_CANCELLED_RC) {
      return COMMAND_CANCELLED_RC;
   }
   if (match_id == BT_RECORD_NOT_FOUND_RC) {
      return BT_RECORD_NOT_FOUND_RC;
   }
   // check for other error
   if (match_id < 0) {
      _message_box(get_message(match_id,""));
      return match_id;
   }

   // populate a tag info struct with the selected match
   tag_get_match_info(match_id, cm);
   if (cm.file_name == null || cm.file_name == "") {
      // error
      tag_browse_info_dump(cm, "no filename "  :+  match_id  :+  ' '  :+  codehelpFlags );   // <<<<<<<<<<<<<<<<<<<<<
      tag_failed_no_filename := true;               // <<<<<<<<<<<<<<<<<<<<<<<<<<
      _message_box(nls("Can not jump to symbol '%s': No file name!",cm.member_name));
      return BT_RECORD_NOT_FOUND_RC;
   }

   // record the matches the user chose from
   int i,n = tag_get_num_of_matches();
   if (addMatches) {
      push_tag_add_match(cm);
      for (i=1; i<=n; ++i) {
         if (i==match_id) continue;
         tag_get_match_info(i, auto im);
         push_tag_add_match(im);
      }
   }

   // that's all folks
   return 0;
}

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #12 on: August 09, 2018, 09:57:15 PM »
Still can't reproduce it, but I put in some safety code in to try to work around what might be happening for v23 beta2.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Go To Definition error: Can not jump to symbol ": No file name!
« Reply #13 on: August 10, 2018, 12:47:10 AM »
FWIW - I have not seen this issue yet in Beta1.