Identinator
Identinator copied to clipboard
Crash on systems without filter driver presence
Reading the custom filter device properties fails with an exception and a hard crash on systems without the driver installed, stack trace:
Application: Identinator.exe
CoreCLR Version: 6.0.622.26707
.NET Version: 6.0.6
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException: The supplied object type doesn't match the property type. (Parameter 'propertyKey')
at Nefarius.Utilities.DeviceManagement.PnP.PnPDevice.GetProperty[T](DevicePropertyKey propertyKey)
at Identinator.ViewModels.UsbDevice.get_DeviceId()
at Identinator.ViewModels.UsbDevice.Equals(UsbDevice other)
at System.Collections.Generic.GenericEqualityComparer`1.IndexOf(T[] array, T value, Int32 startIndex, Int32 count)
at System.Array.IndexOf[T](T[] array, T value, Int32 startIndex, Int32 count)
at System.Collections.Generic.List`1.Contains(T item)
at System.Collections.ObjectModel.Collection`1.Contains(T item)
at Identinator.ViewModels.UsbDevice.EnumerateChildren(UsbHub parentHub, UsbDevice device)
at Identinator.ViewModels.UsbDevice..ctor(UsbHub parentHub, PnPDevice device)
at Identinator.ViewModels.UsbDevice.EnumerateChildren(UsbHub parentHub, UsbDevice device)
at Identinator.ViewModels.UsbDevice..ctor(UsbHub parentHub, PnPDevice device)
at Identinator.ViewModels.UsbDevice.EnumerateChildren(UsbHub parentHub, UsbDevice device)
at Identinator.ViewModels.UsbDevice..ctor(UsbHub parentHub, PnPDevice device)
at Identinator.MainWindow.EnumerateAllDevices()
at Identinator.MainWindow.MainWindow_OnLoaded(Object sender, RoutedEventArgs e)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
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)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
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)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run()
at Identinator.App.Main()