[NET6] Deleting a RibbonTab causes Visual Studio to crash

Posted by: wknauf on 16 November 2023, 8:05 am EST

    • Post Options:
    • Link

    Posted 16 November 2023, 8:05 am EST

    See attached sample: open “Form1” in designer, click “Tab 2” and press the DEL key (to delete the tab).

    Visual Studio (or the designer process) crashes. Deleting it with the quick actions work.

    RibbonDesignerDEL.zip

    Attaching another Visual Studio debugger to the “DesignToolsServer.exe” process, I see this exception:

    System.NullReferenceException
      HResult=0x80004003
      Message=Object reference not set to an instance of an object.
      Source=C1.Win.Ribbon.6.Design.Server
      StackTrace:
       at C1.Win.Ribbon.Design.Server.Glyphs.SelectionGlyph.GetHitTest(Point p) in C1.Win.Ribbon.Design.Server.Glyphs\SelectionGlyph.cs:line 319
    

    StackTrace:

    C1.Win.Ribbon.6.Design.Server.dll!C1.Win.Ribbon.Design.Server.Glyphs.SelectionGlyph.GetHitTest(System.Drawing.Point p) Line 319	C#
     	Microsoft.DotNet.DesignTools.Server.dll!Microsoft.DotNet.DesignTools.Designers.Behaviors.BehaviorService.SetActiveGlyph(System.Drawing.Point point)	Unknown
     	Microsoft.DotNet.DesignTools.Server.dll!Microsoft.DotNet.DesignTools.Designers.Behaviors.BehaviorService.Microsoft.DotNet.DesignTools.Designers.IInputDispatcher.OnMouseMove(Microsoft.DotNet.DesignTools.Designers.MouseDispatchEventArgs e)	Unknown
     	Microsoft.DotNet.DesignTools.Server.dll!Microsoft.DotNet.DesignTools.Designers.ScrollableControlDispatcher.OnMouseMove(Microsoft.DotNet.DesignTools.Designers.MouseDispatchEventArgs e)	Unknown
     	Microsoft.DotNet.DesignTools.Server.dll!Microsoft.DotNet.DesignTools.Designers.DesignerFrame.Dispatcher.OnMouseMove(Microsoft.DotNet.DesignTools.Designers.MouseDispatchEventArgs e)	Unknown
     	Microsoft.DotNet.DesignTools.Server.dll!Microsoft.DotNet.DesignTools.Protocol.Endpoints.Input.InputMessageHandler.HandleRequest(Microsoft.DotNet.DesignTools.Protocol.Endpoints.Input.InputMessageRequest request)	Unknown
     	Microsoft.DotNet.DesignTools.Server.dll!Microsoft.DotNet.DesignTools.Protocol.Endpoints.RequestHandler<Microsoft.DotNet.DesignTools.Protocol.Endpoints.Input.InputMessageRequest, Microsoft.DotNet.DesignTools.Protocol.Endpoints.Input.InputMessageResponse>.Microsoft.DotNet.DesignTools.Protocol.Endpoints.IRequestHandler.HandleRequest(Microsoft.DotNet.DesignTools.Protocol.Endpoints.Request request)	Unknown
     	Microsoft.DotNet.DesignTools.Server.dll!Microsoft.DotNet.DesignTools.Protocol.Endpoints.RequestManager.HandleRequestAsync(string name, Microsoft.DotNet.DesignTools.Protocol.Endpoints.Request request)	Unknown
     	[Resuming Async Method]	
     	System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 183	C#
     	System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Microsoft.DotNet.DesignTools.Protocol.Endpoints.Response>.AsyncStateMachineBox<Microsoft.DotNet.DesignTools.Protocol.Endpoints.RequestManager.<HandleRequestAsync>d__10>.MoveNext(System.Threading.Thread threadPoolThread) Line 324	C#
     	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(object obj)	Unknown
     	System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 183	C#
     	System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbacks()	Unknown
     	System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m)	Unknown
     	System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.WndProc(ref System.Windows.Forms.Message m)	Unknown
     	System.Windows.Forms.dll!System.Windows.Forms.Form.WndProc(ref System.Windows.Forms.Message m)	Unknown
     	Microsoft.DotNet.DesignTools.Server.dll!Microsoft.DotNet.DesignTools.Server.Window.ServerWindow.WndProc(ref System.Windows.Forms.Message m)	Unknown
     	System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m)	Unknown
     	System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, Interop.User32.WM msg, System.IntPtr wparam, System.IntPtr lparam)	Unknown
     	[Native to Managed Transition]	
     	[Managed to Native Transition]	
     	System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.Interop.Mso.IMsoComponentManager.FPushMessageLoop(System.UIntPtr dwComponentID, Interop.Mso.msoloop uReason, void* pvLoopData)	Unknown
     	System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Interop.Mso.msoloop reason, System.Windows.Forms.ApplicationContext context)	Unknown
     	System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Interop.Mso.msoloop reason, System.Windows.Forms.ApplicationContext context)	Unknown
     	System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext context)	Unknown
     	Microsoft.DotNet.DesignTools.Server.dll!Microsoft.DotNet.DesignTools.Server.DesignToolsServer.StartUIThreadAsync.AnonymousMethod__1()	Unknown
     	System.Private.CoreLib.dll!System.Threading.Thread.StartHelper.Callback(object state) Line 42	C#
     	System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 183	C#
     	System.Private.CoreLib.dll!System.Threading.Thread.StartCallback() Line 105	C#
     	[Async Call Stack]	
     	[Async] StreamJsonRpc.dll!StreamJsonRpc.JsonRpc.DispatchIncomingRequestAsync(StreamJsonRpc.Protocol.JsonRpcRequest request)	Unknown
     	[Async] StreamJsonRpc.dll!StreamJsonRpc.JsonRpc.HandleRpcAsync(StreamJsonRpc.Protocol.JsonRpcMessage rpc)	Unknown
    

    Best regards

    Wolfgang

  • Posted 16 November 2023, 3:20 pm EST

    Hi Wolfgang,

    Thanks a lot for sharing all the details. We could reproduce the issue on our end. We have reported it to the development team for further investigation and will let you know the updates soon.

    [Internal Tracking ID: C1WIN-31395]

    Best Regards,

    Kartik

  • Posted 28 January 2024, 3:09 am EST

    I can confirm that it works with .636.

    Changelog snippet:

    [NET6][NET8] Deleting RibbonTab through the designer was causing Visual Studio to crash. (Jira:C1WIN-31400)

    What is the reason that currently all resolved issues are mentioned with numbers different to those that you initially wrote in my forum threads ;-)?

    Best regards

    Wolfgang

  • Posted 28 January 2024, 8:43 pm EST

    Hi Wolfgang,

    Thank you for the confirmation.

    Also, there has been a change in our internal workflow, and as a result, the JIRA ID provided to you differs from the one listed in the ChangeLog. From now on, we will update our response with the new JIRA ID after we get the update from the development team.

    Thanks, and Best Regards,

    Kartik

  • Posted 28 January 2024, 9:15 pm EST

    Thanks for the clarification. It would be very helpful if I could match the issue ids in the changelog with the ids provided here in the forum. So, please either post all related ids in the changelog or post them here ;-).

    Best regards

    Wolfgang

  • Posted 28 January 2024, 10:37 pm EST

    Hi Wolfgang,

    Sure. We will provide all the related IDs here only ;-).

    Best regards

    Kartik

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels