DmitriySalnikov / OBSNotifier

Simple program for displaying notifications from OBS on your desktop.
MIT License
58 stars 1 forks source link

[Bug]: OBSNotifier does not open and crashes silently in background #19

Closed NightMean closed 1 day ago

NightMean commented 1 day ago

Commit or version

1.3.2

On which operating systems the error occurs

OS: Windows 10 22H2 (19045.5131) with all updates installed along with .NET Framewework 4.8 OBS: 30.2.3 (64 bit) with websockets enabled

PS C:\Users\PC> Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)\p{L}' } | Select PSChildName, version

PSChildName                      Version
-----------                      -------
v2.0.50727                       2.0.50727.4927
v3.0                             3.0.30729.4926
Windows Communication Foundation 3.0.4506.4926
Windows Presentation Foundation  3.0.6920.4902
v3.5                             3.5.30729.4926
Client                           4.8.09037
Full                             4.8.09037
Client                           4.0.0.0

Issue description

Hi, I wanted to use this app once again as I reinstalled my Windows but whenever I open OBSNotifier.exe v1.3.2, the app silently crashes in the background without any prompt or any helpful logs.

[11/16/2024 19:26:10]   // Time format - MM/dd/yyyy HH:mm:ss

As I've used this in the past on my previous Windows installation without any issue, I tried to open older version 1.3.0 but the result was the same although, this time I saw something in the error logs. I'm not sure if this is related.

Logs:

[11/16/2024 19:22:25]   // Time format - MM/dd/yyyy HH:mm:ss
[11/16/2024 19:22:25]   --- The program crashed due to an exception ---
[11/16/2024 19:22:25]   Exception:
[11/16/2024 19:22:25]-  Sequence contains no elements
[11/16/2024 19:22:25]-  StackTrace:
[11/16/2024 19:22:25]-     at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
[11/16/2024 19:22:25]-     at OBSNotifier.App.SelectLanguageOnStart(CultureInfo start_ui_info)
[11/16/2024 19:22:25]-     at OBSNotifier.App.Application_Startup(Object sender, StartupEventArgs ee)
[11/16/2024 19:22:25]-     at System.Windows.Application.OnStartup(StartupEventArgs e)
[11/16/2024 19:22:25]-     at System.Windows.Application.<.ctor>b__1_0(Object unused)
[11/16/2024 19:22:25]-     at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
[11/16/2024 19:22:25]-     at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
[11/16/2024 19:22:25]-     at System.Windows.Threading.DispatcherOperation.InvokeImpl()
[11/16/2024 19:22:25]-     at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
[11/16/2024 19:22:25]-     at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
[11/16/2024 19:22:25]-     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[11/16/2024 19:22:25]-     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[11/16/2024 19:22:25]-     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
[11/16/2024 19:22:25]-     at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
[11/16/2024 19:22:25]-     at System.Windows.Threading.DispatcherOperation.Invoke()
[11/16/2024 19:22:25]-     at System.Windows.Threading.Dispatcher.ProcessQueue()
[11/16/2024 19:22:25]-     at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
[11/16/2024 19:22:25]-     at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
[11/16/2024 19:22:25]-     at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
[11/16/2024 19:22:25]-     at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
[11/16/2024 19:22:25]-     at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
[11/16/2024 19:22:25]-     at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
[11/16/2024 19:22:25]-     at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
[11/16/2024 19:22:25]-     at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
[11/16/2024 19:22:25]-     at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
[11/16/2024 19:22:25]-     at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
[11/16/2024 19:22:25]-     at System.Windows.Application.RunDispatcher(Object ignore)
[11/16/2024 19:22:25]-     at System.Windows.Application.RunInternal(Window window)
[11/16/2024 19:22:25]-     at System.Windows.Application.Run(Window window)
[11/16/2024 19:22:25]-     at OBSNotifier.App.Main()

Steps to reproduce

  1. Open OBSNotifier.exe > App silently crashes in background
NightMean commented 1 day ago

I've now also checked EventViewer and upon opening 1.3.2, the event viewer shows the same log I've shared for 1.3.0 above although the log in %APPDATA%/OBSNotifier/logs is empty.

DmitriySalnikov commented 1 day ago
Offtop > all updates installed along with `.NET Framewework 4.8` My program is actually targeting 4.7.2. https://github.com/DmitriySalnikov/OBSNotifier/blob/04937bfe7338b943f0d495acc8fcdafed59ec5e1/OBSNotifier/OBSNotifier.csproj#L11

[11/16/2024 19:22:25] Exception: [11/16/2024 19:22:25]- Sequence contains no elements [11/16/2024 19:22:25]- StackTrace: [11/16/2024 19:22:25]- at System.Linq.Enumerable.First[TSource](IEnumerable`1 source) [11/16/2024 19:22:25]- at OBSNotifier.App.SelectLanguageOnStart(CultureInfo start_ui_info) [11/16/2024 19:22:25]- at OBSNotifier.App.Application_Startup(Object sender, StartupEventArgs ee)

Based on these logs I will assume that your language is not added to the list of supported localizations.

https://github.com/DmitriySalnikov/OBSNotifier/blob/04937bfe7338b943f0d495acc8fcdafed59ec5e1/OBSNotifier/App.xaml.cs#L375-L380

I'll fix that soon.

DmitriySalnikov commented 1 day ago

Can you check this build?

NightMean commented 1 day ago

My program is actually targeting 4.7.2.

Yeah, I noticed. Although having a newer minor version shouldn't be a problem.

Based on these logs I will assume that your language is not added to the list of supported localizations.

Also, yes. I didn't submit any translation yet :) Although, I thought that might be an issue, when I switched my Windows to English as a primary language, the app still didn't open without this fix.

Can you check this build?

You are awesome! :) Now it starts without any issue. Thanks for the quick fix!

DmitriySalnikov commented 1 day ago

Now it starts without any issue.

I hope the program restarts and the language changes without problems too? If so, I will prepare and release this version.

NightMean commented 1 day ago

Yes it does, already tried to auto start it along OBS. No issues here :)