Author Topic: Delayed context tagging  (Read 5526 times)

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Delayed context tagging
« on: March 12, 2019, 05:48:54 PM »
I have a problem with context tagging which seems to have dragged on between SE versions, so perhaps it's a setting I've made (or not made) rather than an issue per se. Maybe it rings a bell with someone...

What it is is that context tagging doesn't work for the file I am editing. That is, in one file I will create a typedef struct, say, and in another file when I use that definition I don't got code completion and nothing in the preview window. I check that the background tagging is complete (from the status bar), save the edited file, etc., but generally nothing helps. Close and restart SE and it's working great.

I am not sure if this only occurs, or perhaps is worse, if I create the file during that session (file, new). Despite it being added to the project, perhaps SE doesn't recognise it as so until a restart.

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: Delayed context tagging
« Reply #1 on: March 12, 2019, 07:48:40 PM »
If you can put together a small sample to reproduce this, or a complete set of steps to reproduce it, we'll see if we can find a solution.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Delayed context tagging
« Reply #2 on: March 12, 2019, 09:36:00 PM »
Yes. Trouble is it pops up out of the blue and when I'm intentionally remembering what I'm doing it tends not to happen :)

Just wondered if it rang a bell with anyone, but I'll try and work out the definitive steps.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Delayed context tagging
« Reply #3 on: December 17, 2019, 01:58:36 AM »
This is happening again in V24.0.0.8.

Earlier on SE was failing to find uint32_t and the like. I added the compiler include directory and it then took quite a while to actually resolve things, but I put it down to one of those things.

Just now I was editing a src.h file and the additions I made didn't show up in the src.c at all (the files are next to each other in a folder). I went as far as adding the folder as a compiler include directory but it made no difference. Rebuilt the workspace tag file with no change. Closed and reopened SE and it worked fine.

Is there something I can do or look at when this is happening to pinpoint the cause?

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: Delayed context tagging
« Reply #4 on: December 19, 2019, 01:15:16 AM »
You can try the attached experimental hot fix.

Note, because of the nature of how the cumulative hot fixes are loaded, this fix might be kind of a one-off.  You can load it, but it might only be effective for your current session.

If it works, it will be part of the next cumulative hot fix for 24.0.0.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Delayed context tagging
« Reply #5 on: December 19, 2019, 11:06:45 AM »
Thanks, Dennis. When you say "if it works", what should I be looking for? I mean, since it's a flaky problem do I just not get that any more, or should I load it when the problem occurs? Sorry for being dense...

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: Delayed context tagging
« Reply #6 on: December 19, 2019, 03:05:38 PM »
Actually.  I have to apologize, I mistook your post for another problem that involved a different kind of delays.  This fix does not address what you have been seeing.  I do plan on looking into your problem, but I've chased this one before, and have not been able to isolate it.  So that reproducible case still would be invaluable.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Delayed context tagging
« Reply #7 on: December 19, 2019, 03:11:10 PM »
No worries. I understand that it is really tricky to figure out problems from just a vague report and no means to replicate them :)

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Delayed context tagging
« Reply #8 on: December 23, 2019, 12:06:22 PM »
This is very bad indeed, now. I can pretty much guarantee that adding a #define or something to a .h won't be picked up until SE is restarted.

It's not just one project but all the ones I am currently working on. Unusually (for me) the workspaces hold the primary project (embedded firmware code) and then I've added a non-editing project (manufacturer hardware API) for middleware function/type lookup. I am thinking that perhaps it's this combination of projects in a workspace which may be causing the issue.

Additionally, the SE workspace and project configs are in one directory but the code is in another. That applies to both the project I am editing and the associated project I have for reference. Don't know if this mix of paths is contributing, too...

I'll try and narrow down the similarities between projects where this occurs, but I thought I'd mention it now in case it rings a bell.

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: Delayed context tagging
« Reply #9 on: December 24, 2019, 12:27:46 AM »
This is very bad indeed, now. I can pretty much guarantee that adding a #define or something to a .h won't be picked up until SE is restarted.

Do you mean it goes wrong soon after you restart slick  - or does it take a while.

One thing you could try is make a copy of the tag file at the time it's going wrong, then restart slick and if it is then working correctly for that symbol, compare the saved tag file with the current tag file. 

If it goes wrong quickly after you restart slick then it suggests that it's something specific to your system rather a random overwrite problem or something.

You could also try rebuilding your configuration folder.  Save all your settings using options export then import to a new config and see if it takes longer before the problem starts.

Another thing you could try is
1. check whether it's only a specific type of symbol that goes wrong
2. check whether other nearby symbols can still be found

Once it goes wrong does it go wrong for all new symbols in all files?
Are namespaces involved?
Is it C or C++?
If it's readily reproducible, maybe you can use the slick C debugger to locate the code that fails.
Does find symbol or push-tag work?

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Delayed context tagging
« Reply #10 on: December 24, 2019, 12:35:40 AM »
Thanks for the ideas, Graeme - I'll check them off as it happens.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Delayed context tagging
« Reply #11 on: April 23, 2020, 12:10:54 AM »
An oldie, but I think I've solved this one now.

Sometimes I get a stack fault which seems to be triggered by a combination of holding shift, mouse drage and scrollwheel turning. I think - when it pops up I have to figure what I've just been doing, and since I'm not expecting it...

Anyway, so once this happens I close the dialog and everything seems fine, so I carry on working. A bit earlier I had this happen, and just now I had a new function prototype in a header not be recognised in another file that called it. Putting 2 and 2 together, I reckon SE was borked even though it seemed to be OK.

I'll try and figure what I do to cause the fault dialog, and save the contents next time - I haven't been doing because a) it's pretty rare (now) and b) you'd want to know what I did to cause it :)

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: Delayed context tagging
« Reply #12 on: April 23, 2020, 02:06:18 PM »
You can find a log of all your slick-c stack faults under your configuration directory/logs/stack.log.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Delayed context tagging
« Reply #13 on: April 23, 2020, 04:25:25 PM »
Ah, excellent. Just in case it might be of use to anyone it says:

Code: [Select]
stack[2020-04-22T21:18:15Z] Slick-C STACK TRACE ******************************
stack[2020-04-22T21:18:15Z] Created on 4/22/2020 at 21:18:15 (509 ms)
stack[2020-04-22T21:18:15Z] SlickEdit Pro Version 24.0.1.0 Copyright 1988-2019 SlickEdit Inc.
stack[2020-04-22T21:18:15Z] Edit module and type "st -f <offset>" to get the
stack[2020-04-22T21:18:15Z] run-time error position
stack[2020-04-22T21:18:15Z]
stack[2020-04-22T21:18:15Z] error code=-2088
stack[2020-04-22T21:18:15Z] Invalid object handle
stack[2020-04-22T21:18:15Z]
stack[2020-04-22T21:18:15Z]autocomplete.ex 2092 autocomplete:AutoCompletePositionForm(0,0,0)   p_window_id: 19   p_object: OI_EDITOR   p_name:
stack[2020-04-22T21:18:15Z]autocomplete.ex 26490 AutoCompleteDoKey()   p_window_id: 19   p_object: OI_EDITOR   p_name:


Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: Delayed context tagging
« Reply #14 on: April 23, 2020, 07:11:43 PM »
Reproduced.  Thanks, I will put in a fix for the next hot fix asap.