UNable to import custom .plist files

Archive of historical bug reports.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
monojo
Posts: 2
Joined: Thu May 11, 2017 5:36 pm

UNable to import custom .plist files

Post by monojo » Thu May 11, 2017 5:39 pm

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)

mduell
Veteran User
Posts: 6594
Joined: Sat Apr 21, 2007 8:54 pm

Re: UNable to import custom .plist files

Post by mduell » Thu May 11, 2017 8:40 pm

No, plists were never intended to be forward compatible.

monojo
Posts: 2
Joined: Thu May 11, 2017 5:36 pm

Re: UNable to import custom .plist files

Post by monojo » Fri May 12, 2017 9:07 am

OK thanks, I'll go back to 0.10.5

User avatar
Ritsuka
HandBrake Team
Posts: 1057
Joined: Fri Jan 12, 2007 11:29 am

Re: UNable to import custom .plist files

Post by Ritsuka » 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.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5424
Joined: Sat Feb 09, 2008 7:21 pm

Re: UNable to import custom .plist files

Post by JohnAStebbins » Fri May 12, 2017 3:22 pm

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.

User avatar
Ritsuka
HandBrake Team
Posts: 1057
Joined: Fri Jan 12, 2007 11:29 am

Re: UNable to import custom .plist files

Post by Ritsuka » Fri May 12, 2017 3:44 pm

But It tried to be compatible, anyway, it should throw an exception in the GUI code.

Post Reply