Designer crash when hovering over usercontrol. dotnet core 3.0.
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
_From @ShemJM on Friday, November 15, 2019 11:45:57 AM_
I have created a user control with the following XAML:
```
```
I can add it to my pages but when I hover over it, the designer crashes and I get this error:
```
System.InvalidOperationException
Calculated node path is invalid -- null->Page:Canvas
at Microsoft.VisualStudio.DesignTools.XamlSurfaceDesigner.InstanceBuilders.IsolatedSurfaceInstanceManager.GetCorrespondingNodePath(IViewNode viewNode)
at Microsoft.VisualStudio.DesignTools.XamlSurfaceDesigner.Views.XamlHitTestHelper.HitTestContext.GetCorrespondingSceneElement(IViewObject viewObject)
at Microsoft.VisualStudio.DesignTools.XamlSurfaceDesigner.Views.XamlHitTestHelper.HitTestContext.FilterPotentialHit(IViewObject viewObject)
at Microsoft.VisualStudio.DesignTools.XamlSurfaceDesigner.Views.XamlHitTestHelper.HitTestContext.GetFilterBehavior(IViewObject potentialHitTestTarget)
at Microsoft.VisualStudio.DesignTools.XamlSurfaceDesigner.Views.XamlHitTestHelper.HitTestContext.GetFilterBehavior(IViewObject potentialHitTestTarget)
at Microsoft.VisualStudio.DesignTools.XamlSurfaceDesigner.Views.XamlHitTestHelper.HitTestContext.d__15.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at Microsoft.VisualStudio.DesignTools.XamlSurfaceDesigner.Views.XamlSceneView.GetElementAtPoint(Point point, HitTestModifier hitTestModifier, InvisibleObjectHitTestModifier invisibleObjectHitTestModifier, ICollection`1 ignoredElements)
at Microsoft.VisualStudio.DesignTools.XamlSurfaceDesigner.Views.XamlSceneView.HitElementHelper.GetSelectableElementAtPoint(Point point)
at Microsoft.VisualStudio.DesignTools.XamlSurfaceDesigner.Views.XamlSceneView.GetSelectableElementAtPoint(Point point, SelectionFor3D selectionFor3D, Boolean selectedOnly, Boolean smartInvisiblePanelSelect, Boolean isDrillingEnabled)
at Microsoft.VisualStudio.DesignTools.SurfaceDesigner.Views.SceneView.GetCachedSelectableElementAtPoint(Point point, SelectionFor3D selectionFor3D, Boolean isDrillingEnabled)
at Microsoft.VisualStudio.DesignTools.SurfaceDesigner.Tools.ToolBehavior.CachedHitTest(Point pointerPosition, Boolean allowDrilling)
at Microsoft.VisualStudio.DesignTools.SurfaceDesigner.Tools.Selection.ElementEditorBehavior.OnHoverOverNonAdorner(Point pointerPosition)
at Microsoft.VisualStudio.DesignTools.SurfaceDesigner.Tools.ElementToolBehavior.OnHover(Point pointerPosition)
at Microsoft.VisualStudio.DesignTools.SurfaceDesigner.Tools.EventRouter.ScopeElement_MouseMove_Internal(MouseEventArgs args)
at Microsoft.VisualStudio.DesignTools.SurfaceDesigner.Tools.EventRouter.<>c__DisplayClass59_0.b__1()
at Microsoft.VisualStudio.DesignTools.Utility.ProtectionZone.TrueProtectionZone.Execute(Action action)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
```
If I don't hover over it I can build my project and use the button as expected.
It also works fine in .net framework.
I have also tried with a Stackpanel. I get the same error but instead of canvas it says StackPanel
_Copied from original issue: dotnet/core#3815_
Contributor guide
Assessment
This issue has not been assessed yet.