codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

Spade frequently gets stuck "loading" or "refreshing" at design time but never completes

Open Bilge opened this issue 9 years ago • 3 comments

Environment

  • Visual Studio version: 2015 Enterprise
  • CodeMaid version: 10.1
  • Code language: C#

Description

I always have Spade open during design time but switching between tabs I find it frequently fails to update, getting stuck with a loading or refreshing overlay that doesn't disappear until I switch to a different code tab and back again; doing so clears the notice almost instantly.

Steps to recreate

Most often produces loading:

  1. Make some changes to code (anything, doesn't matter what).
  2. Switch to another tab.
  3. Switch back.

Most often produces refreshing:

  1. Run project.
  2. Make some changes to code (sometimes this step isn't even necessary).
  3. Stop project.

Current behavior

loading refreshing

Expected behavior

Spade should always show the current state of the code without getting stuck loading or refreshing.

Bilge avatar Nov 11 '16 19:11 Bilge

Thanks for reporting the issue. I have intermittently seen it as well, but not consistently which has made it difficult to hunt down.

The quick workaround is to trigger a manual refresh which will start over the attempt to build the code model.

If anyone has any steps / sample code that helps consistently reproduce the issue, that would be appreciated.

codecadwallader avatar Nov 13 '16 22:11 codecadwallader

I have this bug very frequently in my C# project. Given that I use Spade almost exclusively for quick navigation of files, it's a hard issue to overcome.

JonathonCoughlin avatar Jul 09 '24 17:07 JonathonCoughlin

Since VS 2022 this issue is occuring quite frequently.

It seems to happen, everytime you start to modify a document, before spade has finished refreshing - which is kinda "always" because for most files, spade requires about 5-10 seconds to refresh :(

What I would recommend:

  • Don't clean the UI and overlay it during refresh. It makes the current state inaccessible.
  • Perform refreshing on a background-thread, and only update the UI, if the refresh succeeds.

This way (if there are problems refreshing) at least the outdated layout would be accessible - which is sufficent to work with in about 95% of document changes.

(Yellow warning banner could state: "May be out of sync" when background-refresh fails, so everyone knows, that the method added may not yet be visible)

realdognose avatar Jul 19 '24 07:07 realdognose