Right-clicking an Optional<T> input throws an error

Hey,

This is on latest preview (6.0-134).

Repro steps :

  • Create a node that has an Optional<T> input (ImGUI’s SetChildWindowStyle in my case)
  • Try to right-click drag one of the inputs to set it quickly

This is the error I get :

InvalidCastException: "Unable to cast object of type 'VL.Core.Optional`1[System.Single]' to type 'System.Single'."
    StackTrace:
        VL.HDE.PatchEditor.Editors.EditorFactory+<>c__DisplayClass5_0`1 { internal VL.HDE.PatchEditor.Editors.IValueEditor <RegisterEditor>b__1(VL.Lang.View.CanvasView c, VL.Lang.View.View p, System.Type t, object v) { ... } } 
        VL.HDE.PatchEditor.Editors.EditorFactory { public static VL.HDE.PatchEditor.Editors.IValueEditor GetEditor(VL.Lang.View.CanvasView canvas, VL.Lang.View.View parentView, System.Type type, object value) { ... } } 
        VL.Lang.View.CanvasView+PinEditorMouseHandler { private void LaunchPinEditor(bool visible) { ... } } 
        VL.Lang.View.CanvasView+PinEditorMouseHandler { protected virtual VL.Core.Viewer.IMouseEventHandler MouseDrag(VL.Core.Viewer.VMouseEventArgs arg, System.Drawing.PointF delta, System.Drawing.PointF worldDelta) { ... } } 
        VL.Lang.View.MouseHandlerBase`1 { public virtual VL.Core.Viewer.IMouseEventHandler MouseMove(VL.Core.Viewer.VMouseEventArgs arg) { ... } } 
        VL.Lang.View.CanvasView+PinEditorMouseHandler { public virtual VL.Core.Viewer.IMouseEventHandler MouseMove(VL.Core.Viewer.VMouseEventArgs arg) { ... } } 
        VL.Core.Viewer.Handler+ParallelMouseHandler { public virtual VL.Core.Viewer.IMouseEventHandler MouseMove(VL.Core.Viewer.VMouseEventArgs arg) { ... } } 
        VL.Lang.View.CanvasView+CanvasDecisionMouseHandler { public virtual VL.Core.Viewer.IMouseEventHandler MouseMove(VL.Core.Viewer.VMouseEventArgs arg) { ... } } 
        VL.Lang.View.CanvasView { private void HandleMouseMove(object sender, VL.Core.Viewer.VMouseEventArgs e) { ... } } 
        System.Windows.Forms.Control { private void WmMouseMove(System.Windows.Forms.Message& m) { ... } } 
        System.Windows.Forms.Control { protected virtual void WndProc(System.Windows.Forms.Message& m) { ... } } 
        VL.Skia.SkiaGLControl { protected virtual void WndProc(System.Windows.Forms.Message& m) { ... } } 

Thanks in advance!

Thanks. Fixed in upcoming (>= 6.0-139).

1 Like