Patch throws exception error on loading 5.3-0234

After I cloned my git on my workstation I am getting an Exception (Dynamic Enum Definition)
I am using VL.Audio (latest 1.3.1)

The same patch works perfectly fine on my laptop (where I started the development)

I tried different approaches, disabling all the nugets, disabling cache etc

VL starts and sthutdowns on the “orange” loader indicator.

follows spoiler:

    ManagementException: "Invalid class "
        StackTrace:
            System.Management.ManagementException { internal static void ThrowWithExtendedInfo(System.Management.ManagementStatus errorCode) { ... } } 
            System.Management.ManagementEventWatcher { public void Start() { ... } } 
            VL.Lib.HardwareChangedEvents { private static VL.Lib.HardwareChangedEvents.WatcherWrapper CreateWatcher(string queryString) { ... } } 
            VL.Lib.HardwareChangedEvents+<>c__DisplayClass12_0 { internal VL.Lib.HardwareChangedEvents.WatcherWrapper <.cctor>b__0() { ... } } 
            System.Reactive.Linq.ObservableImpl.Using`2+_ { public void Run(System.Reactive.Linq.ObservableImpl.Using<, > parent) { ... } } 
            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.Sink`2 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Subjects.Subject`1 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
            System.Reactive.Sink`2 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
            System.Reactive.Sink`2 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
            System.Reactive.Sink`2 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Subjects.Subject`1 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
            System.Reactive.Sink`2 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
            System.Reactive.Linq.ObservableImpl.Merge`1+Observables+_+InnerObserver { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
            System.Reactive.Sink`2 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Subjects.Subject`1 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
            System.Reactive.Sink`2 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
            System.Reactive.Sink`2 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
            System.Reactive.Sink`2 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
            System.Reactive.Linq.ObservableImpl.Buffer`1+TimeHopping+_ { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnError(System.Exception error) { ... } } 
            System.Reactive.Sink`2 { public virtual void OnError(System.Exception error) { ... } } 
            System.Reactive.Linq.ObservableImpl.ThrowImmediate`1 { protected virtual System.IDisposable Run(System.IObserver<> observer) { ... } } 
            System.Reactive.BasicProducer`1 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Sink`2 { public virtual void Run(System.IObservable<> source) { ... } } 
            System.Reactive.Linq.ObservableImpl.Using`2+_ { public void Run(System.Reactive.Linq.ObservableImpl.Using<, > parent) { ... } } 
            System.Reactive.Linq.ObservableImpl.Using`2 { protected virtual void Run(System.Reactive.Linq.ObservableImpl.Using<, >._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Sink`2 { public virtual void Run(System.IObservable<> source) { ... } } 
            System.Reactive.Linq.ObservableImpl.Buffer`1+TimeHopping+_ { public void Run(System.Reactive.Linq.ObservableImpl.Buffer<>.TimeHopping parent) { ... } } 
            System.Reactive.Linq.ObservableImpl.Buffer`1+TimeHopping { protected virtual void Run(System.Reactive.Linq.ObservableImpl.Buffer<>.TimeHopping._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Sink`2 { public virtual void Run(System.IObservable<> source) { ... } } 
            System.Reactive.Linq.ObservableImpl.Where`1+Predicate { protected virtual void Run(System.Reactive.Linq.ObservableImpl.Where<>.Predicate._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Sink`2 { public virtual void Run(System.IObservable<> source) { ... } } 
            System.Reactive.Linq.ObservableImpl.Cast`2 { protected virtual void Run(System.Reactive.Linq.ObservableImpl.Cast<, >._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Sink`2 { public virtual void Run(System.IObservable<> source) { ... } } 
            System.Reactive.Linq.ObservableImpl.AsObservable`1 { protected virtual void Run(System.Reactive.Linq.ObservableImpl.AsObservable<>._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Subjects.ConnectableObservable`2 { public virtual System.IDisposable Connect() { ... } } 
            System.Reactive.Linq.ObservableImpl.RefCount`1+Eager+_ { public void Run() { ... } } 
            System.Reactive.Linq.ObservableImpl.RefCount`1+Eager { protected virtual void Run(System.Reactive.Linq.ObservableImpl.RefCount<>.Eager._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Linq.ObservableImpl.Merge`1+Observables+_ { public virtual void OnNext(System.IObservable<> value) { ... } } 
            System.Reactive.Sink`1 { public virtual void ForwardOnNext(TTarget value) { ... } } 
            System.Reactive.Linq.ObservableImpl.ToObservableRecursive`1+_ { private System.IDisposable LoopRec(System.Reactive.Concurrency.IScheduler scheduler) { ... } } 
            System.Reactive.Linq.ObservableImpl.ToObservableRecursive`1+_+<>c { internal System.IDisposable <Run>b__3_0(System.Reactive.Concurrency.IScheduler innerScheduler, System.Reactive.Linq.ObservableImpl.ToObservableRecursive<>._ this) { ... } } 
            System.Reactive.Concurrency.ImmediateScheduler { public virtual System.IDisposable Schedule(TState state, System.Func<, , > action) { ... } } 
            System.Reactive.Linq.ObservableImpl.ToObservableRecursive`1+_ { public void Run(System.Collections.Generic.IEnumerable<> source, System.Reactive.Concurrency.IScheduler scheduler) { ... } } 
            System.Reactive.Linq.ObservableImpl.ToObservableRecursive`1 { protected virtual void Run(System.Reactive.Linq.ObservableImpl.ToObservableRecursive<>._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Sink`2 { public virtual void Run(System.IObservable<> source) { ... } } 
            System.Reactive.Linq.ObservableImpl.Merge`1+Observables { protected virtual void Run(System.Reactive.Linq.ObservableImpl.Merge<>.Observables._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Sink`2 { public virtual void Run(System.IObservable<> source) { ... } } 
            System.Reactive.Linq.ObservableImpl.AsObservable`1 { protected virtual void Run(System.Reactive.Linq.ObservableImpl.AsObservable<>._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Subjects.ConnectableObservable`2 { public virtual System.IDisposable Connect() { ... } } 
            System.Reactive.Linq.ObservableImpl.RefCount`1+Eager+_ { public void Run() { ... } } 
            System.Reactive.Linq.ObservableImpl.RefCount`1+Eager { protected virtual void Run(System.Reactive.Linq.ObservableImpl.RefCount<>.Eager._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Sink`2 { public virtual void Run(System.IObservable<> source) { ... } } 
            System.Reactive.Linq.ObservableImpl.Select`2+Selector { protected virtual void Run(System.Reactive.Linq.ObservableImpl.Select<, >.Selector._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Sink`2 { public virtual void Run(System.IObservable<> source) { ... } } 
            System.Reactive.Linq.ObservableImpl.AsObservable`1 { protected virtual void Run(System.Reactive.Linq.ObservableImpl.AsObservable<>._ sink) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.ObservableExtensions { public static System.IDisposable SubscribeSafe(System.IObservable<> source, System.IObserver<> observer) { ... } } 
            System.Reactive.Subjects.ConnectableObservable`2 { public virtual System.IDisposable Connect() { ... } } 
            System.Reactive.Linq.ObservableImpl.RefCount`1+Eager+_ { public void Run() { ... } } 
            System.Reactive.Linq.ObservableImpl.RefCount`1+Eager { protected virtual void Run(System.Reactive.Linq.ObservableImpl.RefCount<>.Eager._ sink) { ... } } 
            System.Reactive.Producer`2+<>c { internal void <SubscribeRaw>b__1_0(System.ValueTuple<, > tuple) { ... } } 
            System.Reactive.Concurrency.Scheduler+<>c__75`1 { internal System.IDisposable <ScheduleAction>b__75_0(System.Reactive.Concurrency.IScheduler _, System.ValueTuple<, > tuple) { ... } } 
            System.Reactive.Concurrency.CurrentThreadScheduler { public virtual System.IDisposable Schedule(TState state, System.TimeSpan dueTime, System.Func<, , > action) { ... } } 
            System.Reactive.Concurrency.LocalScheduler { public virtual System.IDisposable Schedule(TState state, System.Func<, , > action) { ... } } 
            System.Reactive.Concurrency.Scheduler { internal static System.IDisposable ScheduleAction(System.Reactive.Concurrency.IScheduler scheduler, TState state, System.Action<> action) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable SubscribeRaw(System.IObserver<> observer, bool enableSafeguard) { ... } } 
            System.Reactive.Producer`2 { public virtual System.IDisposable Subscribe(System.IObserver<> observer) { ... } } 
            System.ObservableExtensions { public static System.IDisposable Subscribe(System.IObservable<> source, System.Action<> onNext) { ... } } 
            VL.Lib.Collections.DynamicEnumDefinitionBase`1 { private void InternalInitialize() { ... } } 
            
            
            System.RuntimeType { internal object CreateInstanceOfT() { ... } } 

    TargetInvocationException: "Exception has been thrown by the target of an invocation."
        StackTrace:
            System.RuntimeType { internal object CreateInstanceOfT() { ... } } 
            System.Activator { public static T CreateInstance() { ... } } 
            

    TypeInitializationException: "The type initializer for 'VL.Lib.Collections.DynamicEnumDefinitionBase`1' threw an exception."
        TypeName: "VL.Lib.Collections.DynamicEnumDefinitionBase`1"
        StackTrace:
            VL.Lib.Collections.DynamicEnumDefinitionBase`1 { public static TDefinitionSubclass get_Instance() { ... } } 
            VL.Lib.Collections.DynamicEnumBase`2 { private static VL.Lib.Collections.DynamicEnumDefinitionBase<> get_DefinitionInstance() { ... } } 
            VL.Lib.Collections.DynamicEnumBase`2 { public virtual VL.Lib.Collections.IDynamicEnumDefinition get_Definition() { ... } } 
            

TargetInvocationException: "Exception has been thrown by the target of an invocation."
    StackTrace:
        System.RuntimeMethodHandle { internal static object InvokeMethod(object target, System.Span<>& arguments, System.Signature sig, bool constructor, bool wrapExceptions) { ... } } 
        System.Reflection.RuntimeConstructorInfo { public virtual object Invoke(System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) { ... } } 
        System.RuntimeType { internal object CreateInstanceImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture) { ... } } 
        System.Activator { public static object CreateInstance(System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) { ... } } 
        System.Activator { public static object CreateInstance(System.Type type, object[] args) { ... } } 
        VL.HDE.PatchEditor.Editors.EditorFactory+<>c__DisplayClass10_0 { internal VL.HDE.PatchEditor.Editors.IValueEditor <.cctor>b__47(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.PadView { private void UpdateEditor(VL.Model.Pad pad) { ... } } 
        VL.Lang.View.PadView { protected virtual void SetModel(VL.Model.Element oldValue, VL.Model.Element value) { ... } } 
        VL.Lang.View.ElementView { public virtual void set_Model(VL.Model.Element value) { ... } } 
        VL.Lang.View.DataHubView { public virtual void set_Model(VL.Model.Element value) { ... } } 
        
        VL.Lang.View.CompoundView { private VL.Lang.View.PadView <SetModel>b__39_2(VL.Model.Pad m) { ... } } 
        VL.Lang.RestoreViewHelpers+Synchronizer`2 { public void Update(System.Collections.Generic.IEnumerable<> input, System.Func<, > create, System.Action<, > updator) { ... } } 
        VL.Lang.RestoreViewHelpers { public static void RestoreViews(System.Collections.Generic.IEnumerable<> newElements, VL.Lang.RestoreViewHelpers.Synchronizer<, > sync, System.Func<, > creator, System.Action<, > modelsetter) { ... } } 
        VL.Lang.View.CompoundView { protected virtual void SetModel(VL.Model.Element oldValue, VL.Model.Element value) { ... } } 
        VL.Lang.View.CanvasView { protected virtual void SetModel(VL.Model.Element oldValue, VL.Model.Element value) { ... } } 
        VL.Lang.View.ElementView { public virtual void set_Model(VL.Model.Element value) { ... } } 
        
        VL.HDE.PatchEditor.EditorControl { private VL.Lang.View.CanvasView NewCanvas(VL.Model.Canvas canvas) { ... } } 
        VL.HDE.PatchEditor.EditorControl { public VL.Model.Canvas OpenCanvas(VL.Model.Canvas canvas, bool addToHistory, VL.Model.Element focusedElement, bool setActiveCanvs) { ... } } 
        VL.HDE.PatchEditor.EditorControl+<>c__DisplayClass42_0 { internal bool <ShowDocument>g__ShowAppPatch|0(System.Func<VL.Model.Canvas, bool> askagain) { ... } } 
        VL.HDE.PatchEditor.EditorControl { public void ShowDocument(VL.Model.Document document, VL.HDE.PatchEditor.ShowSpecialPatch showSpecialPatch) { ... } } 
        VL.HDE.PatchEditor.NavigationMenuProvider+<DoOpenDocumentsAsync>d__44 { private virtual void MoveNext() { ... } } 
        System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { ... } } 
        System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { ... } } 
        System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task) { ... } } 
        VL.Model.VLSession+<>c__DisplayClass186_0+<<RunAndForget>b__0>d { private virtual void MoveNext() { ... } } 


Starting VL_Audio_HDEApplication_VyP04T5McEJP0VF85XlHM4


Starting VL_IO_Midi_HDEApplication_BA9lY6knqNtNGfUFmyrJma

Does this also happen in 5.2?

Little google shows it might be a configuration issue on the machine, for example see windows - c# 'Invalid class' in a simple WMI query - Stack Overflow

In any case, upcoming preview should catch that exception and continue to run normally (dynamic enums for hardware devices will probably not auto-update when devices get connected/disconnected).

I tried this with the WMI but it didnt resolve the problem :/ I ll also try the 5.2 version and I ll get back to you

I guess it is about time to format my machine sooner or later

Is 238 also crashing on that machine? Or did you format already?

Hah no I didn’t yet. I am avoiding it for the moment. Unfortunately I can’t test it on the time being. Tomorrow I ll give you a certain answer.
I really appreciate your prompt response.

@Elias hello again, I couldn’t find our related discussion in element.io (where you mentioned that there will be a try-catch feature for similar occasions in future builds), I am back to tell you that in the latest versions of gamma (5.3-0318) I don’t get this error anymore. So consider its fixed!

2 Likes