Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codist 5.12 Beta #164

Closed
12 tasks done
wmjordan opened this issue May 29, 2021 · 20 comments
Closed
12 tasks done

Codist 5.12 Beta #164

wmjordan opened this issue May 29, 2021 · 20 comments
Assignees
Labels
💾 have download

Comments

@wmjordan
Copy link
Owner

wmjordan commented May 29, 2021

Download:
Codist 6594

Codist 6592
Codist 6589
Codist 6562
Codist 6548
Codist 6539
Codist 6536
Codist 6522
Codist 6505
Codist 6501
Codist 6489
Codist 6485
Codist 6477
Codist 6470
Codist 6451
Codist 6436
Codist 6426

General

Syntax Highlight

Navigation Bar

  • Fixed incorrect selection when selecting code from partial types in NaviBar members list (b6426)
  • Fixed a crash (b6592, b6594)

Super Quick Info

@wmjordan wmjordan added the 💾 have download label May 29, 2021
@wmjordan wmjordan self-assigned this May 29, 2021
@wmjordan wmjordan pinned this issue May 29, 2021
@fitdev
Copy link

fitdev commented Jun 29, 2021

BTW I have tried VS 2022 Preview 1.1. It seems to perform better than VS 2019. I managed to get Codist half-working in there (Syntax Highlight and Navi Bar work), but Super QuickInfo does not work. Hopefully you can make an official VS 2022 release soon. I will very likely be using VS 2022 only due to performance improvements.

@fitdev
Copy link

fitdev commented Jun 29, 2021

Also, I am 95% certain that Codist 6501 or earlier version introduced a serious memory leak into VS. At first I was not sure when I was using VS 2019 (because in there I had many documents open), but I did see there memory raise to ~3GB, GC going crazy and everything grinding to a halt after using it for about an hour (with just a few documents editing). But then I saw the same behavior on VS 2022 with memory going to 9GB after editing a few docuemnts and having just a few documents open. When I disable Codist, I do not experience this issue in either 2019 or 2022.

@wmjordan
Copy link
Owner Author

@fitdev thank you for reporting this.
I will look into the memory leak issue.

@fitdev
Copy link

fitdev commented Jun 30, 2021

I think memory leak started to happen with late May / early June builds 6391-6426, and definitely by build 6489.

@wmjordan
Copy link
Owner Author

The leakage has not yet been fixed--I guess. But the performance should be better.

@wmjordan
Copy link
Owner Author

wmjordan commented Jul 1, 2021

Super QuickInfo does not work

There is no supprise to see that.
The Super Quick Info hacks the WPF user interface. It won't work if the WPF structure of the Quick Info in VS 2022 is changed.
That kind of thing happened before when a certain sub versions of VS 2017 or VS 2019 were released.

@wmjordan
Copy link
Owner Author

wmjordan commented Jul 1, 2021

The beta 6522 has addressed both memory leak and performance issues.

@fitdev
Copy link

fitdev commented Jul 1, 2021

Awesome! Will check it out! Thanks for the quick fix. So what was causing the leak (I never got around to inspecting devenv.exe process's heap)?

@wmjordan
Copy link
Owner Author

wmjordan commented Jul 1, 2021

Redundant event hooks caused CPU crazy and memory leak.

@fitdev
Copy link

fitdev commented Jul 1, 2021

Oh I see. I am giving it a try. Will let you know in a few days once I got a chance to test it thoroughly. Thanks a lot for your work!

@wmjordan
Copy link
Owner Author

wmjordan commented Jul 1, 2021

Thank you for your test. You help a lot.

@fitdev
Copy link

fitdev commented Jul 5, 2021

In b6539 I got a VS crash when I clicked on one of the dropdown items on the NaviBar (the very 1st button - to the left of the Home button):

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
   at Codist.CodeAnalysisHelper.GoToSource(Microsoft.CodeAnalysis.Location)
   at Codist.Controls.SymbolItem.GoToSource()
   at Codist.NaviBar.CSharpBar.MenuItemSelect(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
   at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

Perhaps you can guard against all such FileNotFound exceptions by guarding against them with a try...catch, and if a file or folder are indeed not found, then display a MessageBox to the user with a path information. That's a lot better than just crashing VS alltogether.

@wmjordan
Copy link
Owner Author

wmjordan commented Jul 5, 2021

That's really weird. It seems to be the same as #163.
Could you reproduce this issue and see what file is supposed to be opened?

@fitdev
Copy link

fitdev commented Jul 6, 2021

No new file was supposed to be opened. The type in its entirety was already defined in the currently active document tab. All that should have happened is the current document should have scrolled to the start of the definition of the type I clicked on, in the same document. But instead it crashed VS with that exception.

@wmjordan
Copy link
Owner Author

wmjordan commented Jul 6, 2021

Could you take the trouble of making a sample project which reproduces this problem?

@fitdev
Copy link

fitdev commented Jul 6, 2021

Sorry to cause confusion, upon further testing I discovered that this happens only in VS 2022, VS 2019 there are no crashes, but VS 2022 always crashes regardless of the files involved. Sorry for the confusion, as I know that you do not yet officially support VS 2022.

@wmjordan
Copy link
Owner Author

wmjordan commented Jul 7, 2021

Alright then, thanks for the feedback.

@wmjordan
Copy link
Owner Author

wmjordan commented Jul 22, 2021

In b6539 I got a VS crash when I clicked on one of the dropdown items on the NaviBar

@fitdev, There's a new beta which might fix your problem on VS 2022. Please give it a try.

@fitdev
Copy link

fitdev commented Jul 22, 2021

Thank you for the new version. I will let you know how it goes later today. As an aside, the biggest missing feature for me in VS 2022 is that Super QuickInfo does not really work at all (miss those detailed tooltips and evaluated constant values).

UPDATE: Just tried it. Unfortunately it still crashes VS 2022 when I click on any dropdown item in the NaviBar:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.MissingMethodException
   at Codist.TextEditorHelper.OpenFile(System.String, System.Action`1<Microsoft.VisualStudio.TextManager.Interop.IVsTextView>)
   at Codist.CodeAnalysisHelper.GoToSource(Microsoft.CodeAnalysis.Location)
   at Codist.Controls.SymbolItem.GoToSource()
   at Codist.NaviBar.CSharpBar.MenuItemSelect(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
   at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

But at the least I get to see all the types and members and namespace hierarchy, which is a big bonus in itself!

@wmjordan
Copy link
Owner Author

wmjordan commented Jul 22, 2021

Some methods must have been removed from VS 2022 thus it no longer worked.

@wmjordan wmjordan unpinned this issue Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💾 have download
Projects
None yet
Development

No branches or pull requests

2 participants