Viasfora crashes Visual Studio on DPI change
Closed this issue · 8 comments
When I detach or attach to a dock station and Visual Studio moves from 4K display 250% (detaches) to built-in display 200% or vise versa it crashes with such call stack
Exception Info: System.InvalidOperationException
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.Microsoft.VisualStudio.Text.Editor.IWpfTextView.get_TextViewLines()
at Winterdom.Viasfora.Text.CurrentColumnAdornment.RedrawAdornments()
at Winterdom.Viasfora.Text.CurrentColumnAdornment.OnViewportChanged(System.Object, System.EventArgs)
at System.EventHandler.Invoke(System.Object, System.EventArgs)
at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.OnSizeChanged(System.Object, System.Windows.SizeChangedEventArgs)
at System.Windows.SizeChangedEventArgs.InvokeEventHandler(System.Delegate, System.Object)
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.RaiseEvent(System.Windows.RoutedEventArgs)
at System.Windows.FrameworkElement.OnRenderSizeChanged(System.Windows.SizeChangedInfo)
at System.Windows.ContextLayoutManager.fireSizeChangedEvents()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.UIElement.UpdateLayout()
at System.Windows.Interop.HwndSource.Process_WM_SIZE(System.Windows.UIElement, IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr)
at System.Windows.Interop.HwndSource.LayoutFilterMessage(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)
I made a change that should help here, I think. it should fix the issue.
Have you published a new version somewhere to try?
Not yet, but you can find a build here: https://ci.appveyor.com/project/tomasr/viasfora/build/artifacts
08.08.2021 14:51:26 - Microsoft VSIX Installer
08.08.2021 14:51:26 - -------------------------------------------
08.08.2021 14:51:26 - vsixinstaller.exe version:
08.08.2021 14:51:26 - 17.0.2145-preview2
08.08.2021 14:51:26 - -------------------------------------------
08.08.2021 14:51:26 - Command line parameters:
08.08.2021 14:51:26 - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\Andrii\AppData\Local\Temp\MicrosoftEdgeDownloads\630684ca-74d3-4dda-a1b4-92f33cd11307\Viasfora.vsix
08.08.2021 14:51:26 - -------------------------------------------
08.08.2021 14:51:26 - Microsoft VSIX Installer
08.08.2021 14:51:26 - -------------------------------------------
08.08.2021 14:51:28 - Initializing Install...
08.08.2021 14:51:28 - Extension Details...
08.08.2021 14:51:28 - Identifier : Winterdom.Viasfora.f7a33795-2b40-4125-856c-89b0bd8cd5ab
08.08.2021 14:51:28 - Name : Viasfora
08.08.2021 14:51:28 - Author : Tomas Restrepo
08.08.2021 14:51:28 - Version : 4.3.202
08.08.2021 14:51:28 - Description : Add color to your Visual Studio Text Editor!
08.08.2021 14:51:28 - Locale : en-US
08.08.2021 14:51:28 - MoreInfoURL : http://viasfora.com/
08.08.2021 14:51:28 - InstalledByMSI : False
08.08.2021 14:51:28 - SupportedFrameworkVersionRange : [4.5,)
08.08.2021 14:51:28 -
08.08.2021 14:51:28 - SignatureState : Unsigned
08.08.2021 14:51:28 - Supported Products :
08.08.2021 14:51:28 - Microsoft.VisualStudio.Community
08.08.2021 14:51:28 - Version : [14.0,18.0)
08.08.2021 14:51:28 - ProductArchitecture : notSpecified
08.08.2021 14:51:28 - Microsoft.VisualStudio.Pro
08.08.2021 14:51:28 - Version : [11.0,18.0)
08.08.2021 14:51:28 - ProductArchitecture : notSpecified
08.08.2021 14:51:28 - Microsoft.VisualStudio.Enterprise
08.08.2021 14:51:28 - Version : [11.0,18.0)
08.08.2021 14:51:28 - ProductArchitecture : notSpecified
08.08.2021 14:51:28 - Microsoft.VisualStudio.IntegratedShell
08.08.2021 14:51:28 - Version : [11.0,18.0)
08.08.2021 14:51:28 - ProductArchitecture : notSpecified
08.08.2021 14:51:28 - Microsoft.VisualStudio.Ultimate
08.08.2021 14:51:28 - Version : [11.0,18.0)
08.08.2021 14:51:28 - ProductArchitecture : notSpecified
08.08.2021 14:51:28 - Microsoft.VisualStudio.Premium
08.08.2021 14:51:28 - Version : [11.0,18.0)
08.08.2021 14:51:28 - ProductArchitecture : notSpecified
08.08.2021 14:51:28 -
08.08.2021 14:51:28 - References :
08.08.2021 14:51:28 - Prerequisites :
08.08.2021 14:51:28 - -------------------------------------------------------
08.08.2021 14:51:28 - Identifier : Microsoft.VisualStudio.Component.CoreEditor
08.08.2021 14:51:28 - Name : Visual Studio core editor
08.08.2021 14:51:28 - Version : [15.0,17.0)
08.08.2021 14:51:28 -
08.08.2021 14:51:28 - Signature Details...
08.08.2021 14:51:28 - Extension is not signed.
08.08.2021 14:51:28 -
08.08.2021 14:51:28 - Searching for applicable products...
08.08.2021 14:51:28 - Found installed product - Global Location
08.08.2021 14:51:28 - Found installed product - Visual Studio Enterprise 2022 Preview
08.08.2021 14:51:28 - Found installed product - Visual Studio Enterprise 2019
08.08.2021 14:51:28 - Found installed product - Visual Studio Enterprise 2019 Preview
08.08.2021 14:51:28 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
at VSIXInstaller.App.Initialize()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
Looks like you forgot Microsoft.VisualStudio.Component.CoreEditor [15.0,17.0)
Hm, that is not enough
Sorry, I was trying to fix something else in the manifest and caused it not to work. Should be fixed in the latest version. let me know if you still see the crash with it.
I don't think so as it only happens when Viasfora is enabled