Visual Studio restarts by itself after a while due to error in "StatusBar/InitializeCustomAnimationAsync"

Goncalo Marques 0 Reputation points
2024-07-04T12:52:22.41+00:00

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+.&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.&lt;InitializeCustomAnimationAsync&gt;d__68.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.&lt;&gt;c.&lt;&lt;FileAndForget&gt;b__35_0&gt;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+.&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.&lt;InitializeCustomAnimationAsync&gt;d__68.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.&lt;&gt;c.&lt;&lt;FileAndForget&gt;b__35_0&gt;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+.&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.&lt;InitializeCustomAnimationAsync&gt;d__68.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.&lt;&gt;c.&lt;&lt;FileAndForget&gt;b__35_0&gt;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+.&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.&lt;InitializeCustomAnimationAsync&gt;d__68.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.&lt;&gt;c.&lt;&lt;FileAndForget&gt;b__35_0&gt;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+.&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.&lt;InitializeCustomAnimationAsync&gt;d__68.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.&lt;&gt;c.&lt;&lt;FileAndForget&gt;b__35_0&gt;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+.&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.&lt;InitializeCustomAnimationAsync&gt;d__68.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.&lt;&gt;c.&lt;&lt;FileAndForget&gt;b__35_0&gt;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+.&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)&#x000D;&#x000A; at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.CreateNewCustomAnimationForCache(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.SimpleCache`2.GetItem(TKey key)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.GetCustomAnimation(Int32 animationInfoKey)&#x000D;&#x000A; at Microsoft.VisualStudio.PlatformUI.StatusBarService.&lt;InitializeCustomAnimationAsync&gt;d__68.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.&lt;&gt;c.&lt;&lt;FileAndForget&gt;b__35_0&gt;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>

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,193 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.