codemaid
codemaid copied to clipboard
Visual studio 2022 freezes and crashes
Environment
- Visual Studio version: [Visual studio 2022 Enterprise]
- CodeMaid version: [12.0.300]
- Code language: [C++]
Description
When I quickly press ctrl+s to save the file twice with CodeMaid spade window open, Visual studio freezes and crashes!
Steps to recreate
Quickly press ctrl+s to save the file twice with spade window open.
Current behavior
Visual studio freezes and crashes, need to force close Visual studio and restart.
Expected behavior
Should not freeze and crash.
I couldn't reproduce my own instance of this consistently, but I was able to crash VS by saving, and while the Spade window was reloading, changing tabs. In other words:
- Save (CTRL+S)
- Immediately navigate to another tab by clicking on it.
VS 2022 17.0.0 CodeMaid 12.0.300 Lang: C#, Blazor/ASPNET
On same tab with code spade digging window open,I press ctrl + s twice quickly,vs will crash.
发自我的iPhone
在 2021年12月7日,18:12,cdanek @.***> 写道:
I couldn't reproduce my own instance of this consistently, but I was able to crash VS by saving, and while the Spade window was reloading, changing tabs. In other words:
- Save (CTRL+S)
- Immediately navigate to another tab by clicking on it.
VS 2022 17.0.0 CodeMaid 12.0.300 Lang: C#, Blazor/ASPNET
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcodecadwallader%2Fcodemaid%2Fissues%2F888%23issuecomment-987770611&data=04%7C01%7C%7C692ac813d7914cadb48a08d9b96a14eb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637744687546394112%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=jGO0CMgYTgEf%2FpbpODbS7nU0j%2Bib%2FxCFcx%2FKzxIplcw%3D&reserved=0, or unsubscribehttps://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAQAQH4UY6JIE4S7S6DD72G3UPXMY7ANCNFSM5JLWLW5A&data=04%7C01%7C%7C692ac813d7914cadb48a08d9b96a14eb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637744687546404055%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=JYcIEL6wKFxnRL7RqxL6cHELIYg0i0ou0tw%2F3eZH9lE%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C692ac813d7914cadb48a08d9b96a14eb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637744687546404055%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=8araO3vtAmeA4WRHEgDzm%2BGGoezeLG%2BhdUedtgKdePI%3D&reserved=0 or Androidhttps://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C692ac813d7914cadb48a08d9b96a14eb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637744687546414002%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=CZncxTrjiwLtOAW33uHzMaEKEcwqoX8SJ8ACwQiLoqs%3D&reserved=0.
Thanks for reporting the issue. I wasn't able to reproduce it at first, but if I rage clicked enough between save events and tabs it did eventually hang up VS.
This behavior happens to me in VS 2022 community version.
I have the spade window at the right always visible on c# code, after a few saves or changes, when the spade window wants to refresh, the VS freeze.
(sorry for the black panels, is sensitive data)
Hi everyone..
This is still is a issue present on VS 2022, will be have a fix soon?
This is also happening to me, particularly when saving Interfaces. Any idea when a fix will come?
I have this problem when registering the interface. Sometimes it takes more than 6 seconds to save
I disabled the code complexity within spade and haven't encountered any freezing since.
[Update] Nevermind, it freezed again
I've just merged a potential fix in #951 . I'm not very confident in it though and would appreciate some others testing it out to see if it helps/harms. If you're interested, it is available in our CI channel here: https://www.vsixgallery.com/extension/9079e73d-3fbb-4e07-8dab-f44fa5d8e8b5
It's better. Clean up under 4sec
Any fix ? 10sec to clean up 817lines of an Interface cs file.
This is the diagnostic log :
[CodeMaid Diagnostic 09:55:45 ] RunningDocumentTableEventListener.BeforeSave raised for 'C:\Users\****\Source\Repos\****\Interface\Reservations\IReservations.cs' [CodeMaid Diagnostic 09:55:45 ] CodeCleanupManager.Cleanup started for 'C:\Users\****\Source\Repos\****\Interface\Reservations\IReservations.cs' [CodeMaid Diagnostic 09:55:46 ] CodeModelManager.RetrieveAllCodeItems for 'C:\Users\****\Source\Repos\****\Interface\Reservations\IReservations.cs' [CodeMaid Diagnostic 09:55:46 ] CodeModelCache.GetCodeModel for 'C:\Users\****\Source\Repos\****\Interface\Reservations\IReservations.cs' [CodeMaid Diagnostic 09:55:46 ] --retrieved from cache (not stale). [CodeMaid Diagnostic 09:55:52 ] CodeCleanupManager.Cleanup completed for 'C:\Users\****\Source\Repos\****\Interface\Reservations\IReservations.cs' [CodeMaid Diagnostic 09:55:52 ] RunningDocumentTableEventListener.AfterSave raised for 'C:\Users\****\Source\Repos\****\Interface\Reservations\IReservations.cs'
Is an update planned?
Did the potential fix in the CI branch help? It sounds like it did at first but the second message indicates the opposite.
Unfortunately that didn't fix the problem.
InterfaceTestCodeMaid.zip This is a very small repository. When I clean the code of IReservations, visual is blocked for 6 sec.
@codecadwallader were you able to reproduce the problem?
Thanks for providing a code sample. I was able to reproduce the issue. I do not have a solution in mind at this time and welcome any help. There have been a lot of changes to the threading model over Visual Studio versions which I suspect is the root cause (patterns that used to be fine are no longer working the same way).
Hey.
I'm in VS Version 17.6.4
and I'm having crashes and slow down much more frequently now. I've been relatively fine up until this most recent version or possibly a few before.