Can't create Invoke node if using System.Runtime.InteropServices

Hey there,

I’m using System.Runtime.InteropServices that comes with the GAC (referenced using CTRL + SHIFT + E) in 6.0-146.

When trying to create an Invoke node, vvvv throws this error in the console

Error
NotImplementedException: "The method or operation is not implemented."
    StackTrace:
        VL.Lang.Platforms.Roslyn.SymbolSourceProvider { internal VL.Lang.Symbols.ITypeSymbol GetTypeSymbol(Microsoft.CodeAnalysis.ITypeSymbol type, bool mustBeAnInstanceType) { ... } } 
        VL.Lang.Platforms.Roslyn.ImportedReturnValuePinDefinitionSymbol { protected virtual VL.Lang.Symbols.ITypeSymbol GetPinType() { ... } } 
        VL.Lang.Platforms.Roslyn.ImportedPinDefinitionSymbol`1 { public virtual VL.Lang.Symbols.ITypeSymbol get_Type() { ... } } 
        VL.Lang.Symbols.TypeExtensions+<>c { internal VL.Lang.Symbols.ITypeSymbol <GetDelegateOutputTypes>b__87_1(VL.Lang.Symbols.IPinDefinitionSymbol p) { ... } } 
        System.Linq.Enumerable+WhereSelectArrayIterator`2 { public virtual bool MoveNext() { ... } } 
        System.Linq.Enumerable+<TakeRangeFromEndIterator>d__281`1 { private virtual bool MoveNext() { ... } } 
        VL.Lang.Symbols.SymbolRenderer { protected void AppendCommaSeperatedList(VL.Lang.Symbols.SymbolRendering r, System.Text.StringBuilder b, System.Collections.Generic.IEnumerable<VL.Lang.Symbols.INamedSymbol> symbols) { ... } } 
        VL.Lang.Symbols.ConcreteTypeRenderer { public virtual void AppendToRendering(VL.Lang.Symbols.SymbolRendering r, System.Text.StringBuilder b) { ... } } 
        VL.Lang.Symbols.SymbolRenderingExtensions+InfoStringBuilder { public virtual string Visit(VL.Lang.Symbols.IConcreteTypeSymbol type) { ... } } 
        VL.Lang.Platforms.Roslyn.ImportedConcreteTypeSymbol { public virtual T Dispatch(VL.Lang.Symbols.ISymbolVisitor<> visitor) { ... } } 
        VL.Lang.Symbols.SymbolRenderingExtensions { public static string GetInfoString(VL.Lang.Symbols.ISymbol symbol, VL.Lang.Symbols.Scope scope, VL.Lang.Symbols.SymbolRendering rendering) { ... } } 
        VL.Lang.Symbols.PinDefinitionRenderer { public virtual void AppendToRendering(VL.Lang.Symbols.SymbolRendering r, System.Text.StringBuilder b) { ... } } 
        VL.Lang.Symbols.SymbolRenderingExtensions { internal static void AppendToRendering(VL.Lang.Symbols.INamedSymbol symbol, VL.Lang.Symbols.SymbolRendering r, System.Text.StringBuilder b, VL.Lang.Symbols.Scope scope) { ... } } 
        VL.Lang.Symbols.SymbolRenderer { protected void AppendCommaSeperatedList(VL.Lang.Symbols.SymbolRendering r, System.Text.StringBuilder b, System.Collections.Generic.IEnumerable<VL.Lang.Symbols.INamedSymbol> symbols) { ... } } 
        VL.Lang.Symbols.NodeDefinitionRenderer { public virtual void AppendToRendering(VL.Lang.Symbols.SymbolRendering r, System.Text.StringBuilder b) { ... } } 
        VL.Lang.Symbols.SymbolRenderingExtensions+InfoStringBuilder { public virtual string Visit(VL.Lang.Symbols.INodeDefinitionSymbol node) { ... } } 
        VL.Lang.Symbols.SymbolVisitor`1 { public virtual T Visit(VL.Lang.Symbols.IOperationDefinitionSymbol operation) { ... } } 
        VL.Lang.Platforms.Roslyn.ImportedMethodOperationDefinitionSymbol { public virtual T Dispatch(VL.Lang.Symbols.ISymbolVisitor<> visitor) { ... } } 
        VL.Lang.Symbols.SymbolRenderingExtensions { public static string GetInfoString(VL.Lang.Symbols.ISymbol symbol, VL.Lang.Symbols.Scope scope, VL.Lang.Symbols.SymbolRendering rendering) { ... } } 
        VL.Lang.Symbols.Resolver { private string <ResolveNode>g__GetErrorMessage|18_0(System.Collections.Immutable.ImmutableArray<System.ValueTuple<VL.Lang.Symbols.INodeDefinitionSymbol, VL.Lang.Symbols.LayerEntry, bool>> candidates, VL.Lang.Symbols.<>c__DisplayClass18_0& ) { ... } } 
        VL.Lang.Symbols.Resolver { public VL.Lang.Symbols.ResolveResult<VL.Lang.Symbols.INodeDefinitionSymbol> ResolveNode(VL.Model.ChoiceBasedNodeReference model, System.Nullable<VL.Lang.Symbols.ResolveOptions> resolveOptions, VL.Model.INode nodeApplication) { ... } } 
        VL.HDE.SymbolBrowsers.NodeBrowser { public VL.Lang.Symbols.INodeDefinitionSymbol GetNodeDefinitionForChoiceAsSeenByLinker(VL.Model.IChoice choice) { ... } } 
        VL.HDE.SymbolBrowsers.NodeBrowser { protected virtual VL.HDE.SymbolBrowsers.TooltipArgs DoUpdateInfo(VL.HDE.SymbolBrowsers.InteractionArgs interactionArgs) { ... } } 
        VL.HDE.SymbolBrowsers.SymbolBrowser { protected VL.HDE.SymbolBrowsers.TooltipArgs UpdateInfo(VL.HDE.SymbolBrowsers.InteractionArgs interactionArgs) { ... } } 
        System.Reactive.Linq.ObservableImpl.Select`2+Selector+_ { public virtual void OnNext(TSource value) { ... } } 
        System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { ... } } 
        System.Reactive.PlatformServices.ExceptionServicesImpl { public virtual void Rethrow(System.Exception exception) { ... } } 
        System.Reactive.ExceptionHelpers { public static void Throw(System.Exception exception) { ... } } 
        System.Reactive.Stubs+<>c { internal void <.cctor>b__2_1(System.Exception ex) { ... } } 
        System.Reactive.AnonymousSafeObserver`1 { public virtual void OnError(System.Exception error) { ... } } 
        System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
        System.Reactive.Linq.ObservableImpl.Throttle`1+_ { public virtual void OnError(System.Exception error) { ... } } 
        System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
        System.Reactive.Linq.ObservableImpl.Select`2+Selector+_ { public virtual void OnNext(TSource value) { ... } } 
        System.Reactive.Linq.ObservableImpl.Sample`1+_ { private void Tick() { ... } } 
        System.Reactive.Concurrency.Scheduler+SchedulePeriodicStopwatch`1 { private void Tick(System.Action<, > recurse) { ... } } 
        System.Reactive.Concurrency.Scheduler+<>c__78`1 { internal System.IDisposable <ScheduleAction>b__78_0(System.Reactive.Concurrency.IScheduler _, System.ValueTuple<, > tuple) { ... } } 
        System.Reactive.Concurrency.SynchronizationContextExtensions+<>c__DisplayClass1_0 { internal void <PostWithStartComplete>b__0(object _) { ... } } 
         { public static object InvokeStub_SendOrPostCallback.Invoke(object , System.Span<object> ) { ... } } 
        System.Reflection.MethodBaseInvoker { internal object InvokeWithOneArg(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) { ... } } 

Repro steps :

  • Open a fresh vvvv patch, make sure the advanced aspect is disabled
  • Press CTRL + SHIFT + E and reference System.Runtime.InteropServices
  • Open the node browser and type Invoke
  • Just hovering the entry in the node browser will throw the error
  • Un-reference the lib : all good

Temporary solution is to have a second document open which does not reference the library, create the Invoke node there and copy it to the document that has the lib referenced.

Thanks!

Thanks. With .NET 8 some new pointer types came into the system (function pointer in this case) which VL wouldn’t know how to deal with. Instead of throwing an exception it will now simply map such types to a dummy and move on. Fix in upcoming build.

2 Likes