Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Application crashes on entering settings #24

Closed
0gordonfreeman opened this issue Jan 25, 2022 · 4 comments
Closed

Application crashes on entering settings #24

0gordonfreeman opened this issue Jan 25, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@0gordonfreeman
Copy link

i customized my menu with some custom HA entities.
I deleted one of the entity in HA, because i sold it.

Since then the Settings of the Home Assistant Taskbar Menu Application can't be opened anymore.
The Application crashes with this error message:

Unbehandelte Ausnahme: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei Home_Assistant_Taskbar_Menu.ViewConfigurationWindow.Add(ViewConfiguration rootView, ViewConfiguration viewConfiguration, ItemsControl root) in D:\Files\Programowanie\PycharmProjects\Home Assistant\Other\Home Assistant Taskbar Menu\Home Assistant Taskbar Menu\Views\ViewConfigurationWindow.xaml.cs:Zeile 106.
   bei Home_Assistant_Taskbar_Menu.ViewConfigurationWindow.<>c__DisplayClass10_1.<Add>b__7(ViewConfiguration c) in D:\Files\Programowanie\PycharmProjects\Home Assistant\Other\Home Assistant Taskbar Menu\Home Assistant Taskbar Menu\Views\ViewConfigurationWindow.xaml.cs:Zeile 174.
   bei System.Collections.Generic.List`1.ForEach(Action`1 action)
   bei Home_Assistant_Taskbar_Menu.ViewConfigurationWindow.Add(ViewConfiguration rootView, ViewConfiguration viewConfiguration, ItemsControl root) in D:\Files\Programowanie\PycharmProjects\Home Assistant\Other\Home Assistant Taskbar Menu\Home Assistant Taskbar Menu\Views\ViewConfigurationWindow.xaml.cs:Zeile 174.
   bei Home_Assistant_Taskbar_Menu.ViewConfigurationWindow.<GenerateTree>b__6_0(ViewConfiguration c) in D:\Files\Programowanie\PycharmProjects\Home Assistant\Other\Home Assistant Taskbar Menu\Home Assistant Taskbar Menu\Views\ViewConfigurationWindow.xaml.cs:Zeile 47.
   bei System.Collections.Generic.List`1.ForEach(Action`1 action)
   bei Home_Assistant_Taskbar_Menu.ViewConfigurationWindow.GenerateTree() in D:\Files\Programowanie\PycharmProjects\Home Assistant\Other\Home Assistant Taskbar Menu\Home Assistant Taskbar Menu\Views\ViewConfigurationWindow.xaml.cs:Zeile 47.
   bei Home_Assistant_Taskbar_Menu.ViewConfigurationWindow..ctor(List`1 stateObjects, ViewConfiguration viewConfiguration) in D:\Files\Programowanie\PycharmProjects\Home Assistant\Other\Home Assistant Taskbar Menu\Home Assistant Taskbar Menu\Views\ViewConfigurationWindow.xaml.cs:Zeile 26.
   bei Home_Assistant_Taskbar_Menu.MainWindow.<>c__DisplayClass12_0.<CreateDefaultMenuItems>b__0() in D:\Files\Programowanie\PycharmProjects\Home Assistant\Other\Home Assistant Taskbar Menu\Home Assistant Taskbar Menu\Views\MainWindow.xaml.cs:Zeile 74.
   bei Home_Assistant_Taskbar_Menu.MainWindow.<>c__DisplayClass13_0.<CreateMenuIcon>b__0(Object sender, MouseButtonEventArgs args) in D:\Files\Programowanie\PycharmProjects\Home Assistant\Other\Home Assistant Taskbar Menu\Home Assistant Taskbar Menu\Views\MainWindow.xaml.cs:Zeile 126.
   bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   bei System.Windows.Input.InputManager.ProcessStagingArea()
   bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   bei System.Windows.Application.RunDispatcher(Object ignore)
   bei System.Windows.Application.RunInternal(Window window)
   bei System.Windows.Application.Run(Window window)
   bei Home_Assistant_Taskbar_Menu.App.Main()
@PiotrMachowski PiotrMachowski self-assigned this Jan 25, 2022
@PiotrMachowski PiotrMachowski added the bug Something isn't working label Jan 25, 2022
@PiotrMachowski
Copy link
Owner

I didn't know, that it's possible to sell HA entities 😃

You can remove deleted entity from config manually:

  • Paste following address in File Explorer
    %APPDATA%\Home Assistant Taskbar Menu\Home Assistant Taskbar Menu
  • Open config_view.dat file
  • Remove entry for deleted entity

@0gordonfreeman
Copy link
Author

😆 🤣 that would be nice, but i sold one smart device...

i removed the whole json inside the file, now it's possible to access the settings.
thanks for your fast help

@PiotrMachowski
Copy link
Owner

Well, you didn't have to remove whole json, just one entry with removed entity would be enough

@PiotrMachowski
Copy link
Owner

Fixed in v1.3.0.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants