Page 1 of 1

UNable to import custom .plist files

Posted: Thu May 11, 2017 5:39 pm
by monojo
Just updated to 10.7 however my two custom settings wont import.

The error is below, is there an easy fix or a way to convert legacy plist files?

Code: Select all

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Newtonsoft.Json.JsonSerializationException: Error converting value {null} to type 'System.Int32'. Path 'VideoAvgBitrate', line 54, position 24. ---> System.InvalidCastException: Null object cannot be converted to a value type.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at HandBrakeWPF.Services.Presets.PresetService.Import(String filename) in C:\HandBrake\hbworkspace\workspace\Release_WindowsGui64\HandBrake\win\CS\HandBrakeWPF\Services\Presets\PresetService.cs:line 165
   at HandBrakeWPF.ViewModels.MainViewModel.PresetImport() in C:\HandBrake\hbworkspace\workspace\Release_WindowsGui64\HandBrake\win\CS\HandBrakeWPF\ViewModels\MainViewModel.cs:line 2007
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Caliburn.Micro.ActionMessage.<>c.<.cctor>b__31_0(ActionExecutionContext context)
   at Caliburn.Micro.ActionMessage.Invoke(Object eventArgs)
   at System.Windows.Interactivity.TriggerBase.InvokeActions(Object parameter)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Re: UNable to import custom .plist files

Posted: Thu May 11, 2017 8:40 pm
by mduell
No, plists were never intended to be forward compatible.

Re: UNable to import custom .plist files

Posted: Fri May 12, 2017 9:07 am
by monojo
OK thanks, I'll go back to 0.10.5

Re: UNable to import custom .plist files

Posted: Fri May 12, 2017 9:48 am
by Ritsuka
It should work, if it doesn't it's a bug. I'll move the thread to the bug section.

Re: UNable to import custom .plist files

Posted: Fri May 12, 2017 3:22 pm
by JohnAStebbins
Ritsuka wrote: Fri May 12, 2017 9:48 am It should work, if it doesn't it's a bug. I'll move the thread to the bug section.
The plist format on windows was not the same as on Linux and OSX. So importing from old windows releases doesn't work.

Re: UNable to import custom .plist files

Posted: Fri May 12, 2017 3:44 pm
by Ritsuka
But It tried to be compatible, anyway, it should throw an exception in the GUI code.