Visual Studio restarts by itself after a while due to error in "StatusBar/InitializeCustomAnimationAsync"
After doing a clean install on my machine, Visual Studio will randomly crash essentially and then restart.
If I run it with devenv /log, this is what happens in the ActivityLog.xml file. It looks like the error is related to the StatusBar?
<entry>
<record>674</record>
<time>2024/07/04 12:33:38.593</time>
<type>Error</type>
<source>VS/IDE/StatusBar/InitializeCustomAnimationAsync/Fault</source>
<description>System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.<InitializeCustomAnimationAsync>d__68.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c.<<FileAndForget>b__35_0>d.MoveNext()</description>
</entry>
<entry>
<record>675</record>
<time>2024/07/04 12:33:45.980</time>
<type>Error</type>
<source>VS/IDE/StatusBar/InitializeCustomAnimationAsync/Fault</source>
<description>System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.<InitializeCustomAnimationAsync>d__68.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c.<<FileAndForget>b__35_0>d.MoveNext()</description>
</entry>
<entry>
<record>676</record>
<time>2024/07/04 12:34:06.183</time>
<type>Error</type>
<source>VS/IDE/StatusBar/InitializeCustomAnimationAsync/Fault</source>
<description>System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.<InitializeCustomAnimationAsync>d__68.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c.<<FileAndForget>b__35_0>d.MoveNext()</description>
</entry>
<entry>
<record>677</record>
<time>2024/07/04 12:34:58.220</time>
<type>Error</type>
<source>VS/IDE/StatusBar/InitializeCustomAnimationAsync/Fault</source>
<description>System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.<InitializeCustomAnimationAsync>d__68.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c.<<FileAndForget>b__35_0>d.MoveNext()</description>
</entry>
<entry>
<record>678</record>
<time>2024/07/04 12:34:59.577</time>
<type>Error</type>
<source>VS/IDE/StatusBar/InitializeCustomAnimationAsync/Fault</source>
<description>System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.<InitializeCustomAnimationAsync>d__68.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c.<<FileAndForget>b__35_0>d.MoveNext()</description>
</entry>
<entry>
<record>679</record>
<time>2024/07/04 12:35:10.270</time>
<type>Error</type>
<source>VS/IDE/StatusBar/InitializeCustomAnimationAsync/Fault</source>
<description>System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.<InitializeCustomAnimationAsync>d__68.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c.<<FileAndForget>b__35_0>d.MoveNext()</description>
</entry>
<entry>
<record>680</record>
<time>2024/07/04 12:35:12.967</time>
<type>Error</type>
<source>VS/IDE/StatusBar/InitializeCustomAnimationAsync/Fault</source>
<description>System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)
 at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)
 at Microsoft.VisualStudio.PlatformUI.StatusBarService.<InitializeCustomAnimationAsync>d__68.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c.<<FileAndForget>b__35_0>d.MoveNext()</description>
</entry>
<entry>
<record>681</record>
<time>2024/07/04 12:35:48.951</time>
<type>Information</type>
<source>Manage Visual Studio Performance</source>
<description>End execution cost summary for IdeModeChange scenario and ToolWindow component</description>
</entry>
<entry>
<record>682</record>
<time>2024/07/04 12:35:48.951</time>
<type>Information</type>
<source>Manage Visual Studio Performance</source>
<description>End execution cost summary for IdeModeChange scenario and ToolWindow component</description>
</entry>
<entry>
<record>683</record>
<time>2024/07/04 12:35:49.118</time>
<type>Information</type>
<source>window manager</source>
<description>Stored pinned views in SUO: </description>
</entry>
<entry>
<record>684</record>
<time>2024/07/04 12:40:58.600</time>
<type>Information</type>
<source>Manage Visual Studio Performance</source>
<description>End execution cost summary for IdeModeChange scenario and ToolWindow component</description>
</entry>
<entry>
<record>685</record>
<time>2024/07/04 12:40:58.600</time>
<type>Information</type>
<source>Manage Visual Studio Performance</source>
<description>End execution cost summary for IdeModeChange scenario and ToolWindow component</description>
</entry>