Macro-Deck icon indicating copy to clipboard operation
Macro-Deck copied to clipboard

attempting to toggle bool results in error

Open ravenx99 opened this issue 2 years ago • 1 comments

I create a new Bool I try to create a new action = Macro Deck variables -> Change variable value, select my bool and check "toggle", the "Okay" button is unresponsive... I can't save this action. I have to ESC out and abort.

Clicking "Okay" results in the following in the log:

3:01:55 PM [Macro Deck] [Error] >> ChangeVariableValueActionConfigViewModel: Error while saving config: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) at System.Text.Json.Serialization.JsonStringEnumConverter.CreateConverter(Type typeToConvert, JsonSerializerOptions options) at System.Text.Json.Serialization.JsonConverterFactory.GetConverterInternal(Type typeToConvert, JsonSerializerOptions options) at System.Text.Json.JsonSerializerOptions.DetermineConverter(Type parentClassType, Type runtimePropertyType, MemberInfo memberInfo) at System.Text.Json.JsonClassInfo.GetConverter(Type type, Type parentClassType, MemberInfo memberInfo, Type& runtimeType, JsonSerializerOptions options) at System.Text.Json.JsonClassInfo.AddProperty(MemberInfo memberInfo, Type memberType, Type parentClassType, Nullable1 parentTypeNumberHandling, JsonSerializerOptions options) at System.Text.Json.JsonClassInfo.CacheMember(Type declaringType, Type memberType, MemberInfo memberInfo, Nullable1 typeNumberHandling, Dictionary2 cache, Dictionary2& ignoredMembers) at System.Text.Json.JsonClassInfo..ctor(Type type, JsonSerializerOptions options) at System.Text.Json.JsonSerializerOptions.GetOrAddClass(Type type) at System.Text.Json.JsonSerializerOptions.GetOrAddClassForRootType(Type type) at System.Text.Json.WriteStack.Initialize(Type type, JsonSerializerOptions options, Boolean supportContinuation) at System.Text.Json.JsonSerializer.WriteCore[TValue](Utf8JsonWriter writer, TValue& value, Type inputType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Serialize[TValue](TValue& value, Type inputType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Serialize[TValue](TValue value, JsonSerializerOptions options) at SuchByte.MacroDeck.InternalPlugins.Variables.Models.ChangeVariableValueActionConfigModel.Serialize() at SuchByte.MacroDeck.Variables.Plugin.ViewModels.ChangeVariableValueActionConfigViewModel.SetConfig() at SuchByte.MacroDeck.Variables.Plugin.ViewModels.ChangeVariableValueActionConfigViewModel.SaveConfig()

ravenx99 avatar Jul 16 '22 19:07 ravenx99

This was occurring in 2.12.0b3, but when away when I upgraded to 2.12.0 later that day. I don't know if the upgrade or the restart after creating the variable fixed it.

ravenx99 avatar Jul 18 '22 19:07 ravenx99