yujie
November 18, 2025, 8:41am
1
Hi there, Yujie here.
I use a KVM switch so I can share a single mouse and keyboard across multiple workstations.
However, the display resolution of the workstations changes whenever I switch channels.
When that happens, VC becomes unresponsive if the application is not minimized.
(It works fine as long as it is minimized.)
Is there any way to prevent VC from becoming unresponsive?
I often start a simulation and then switch to another workstation to do other tasks.
I know it works fine if I remember to minimize VC before switching, but sometimes I forget, and then the program hangs and I lose time for nothing. XD
1 Like
TSy
November 18, 2025, 9:55am
2
This sounds like bit different way to trigger a known bug in Microsoft WPF (which VC uses for UI), which is caused by losing monitor due to sleep or hibernation and WPF not recovering from it when resuming. Minimizing the application before such switch is the only known workaround.
opened 05:17AM - 18 Dec 24 UTC
Investigate
_This issue has been moved from [a ticket on Developer Community](https://develo… percommunity.visualstudio.com/t/WPF-3D-model-example-throws-OutOfMemoryE/10793983)._
---
[severity:Other]
Using the Viewport3D and GeometryModel3D features in .NET 4.8 application seem to always cause an exception when Windows 11 computer resumes from hibernation.
Applying this example XAML into the WPF application template in Visual Studio 2022 produces an application which will throw after computer is hibernated and resumed.
https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/how-to-create-a-3-d-scene?view=netframeworkdesktop-4.8#create-a-3d-scene-in-xaml
**Sample VS solution:**
[WPF3DBugTest.zip](https://aka.ms/dc/file?name=B6ae0c4a614104028a101029fc5486400638676163101131965_WPF3DBugTest.zip&tid=6ae0c4a614104028a101029fc5486400638676163101131965)
**Issue repro steps:**
1. Build the provided application with Visual Studio 2022
2. Configure Visual Studio to stop on OutOfMemoryException and run the application with debugger attached
2. Hibernate Windows
3. Turn computer back on and login
4. Try to move or resize the application window
5. Visual Studio stops on exception, resuming closes the application.
I have noted that running the application without debugger attached might not cause visible issues, or the repro steps might not be reliable. However, in a more complex application utilizing WPF 3D features an exception always occurs.
The crash occurs as OutOfMemoryException is thrown in WPF render thread.
```
System.OutOfMemoryException
HResult=0x8007000E
Message=Insufficient memory to continue the execution of the program.
Source=PresentationCore
StackTrace:
at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet)
at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam)
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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) in MS.Win32\HwndWrapper.cs:line 221
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) in MS.Win32\HwndSubclass.cs:line 253
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) in System.Windows.Threading\ExceptionWrapper.cs:line 73
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) in System.Windows.Threading\ExceptionWrapper.cs:line 24
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) in System.Windows.Threading\Dispatcher.cs:line 1021
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) in MS.Win32\HwndSubclass.cs:line 207
```
**Windows information:**
Edition Windows 11 Pro
Version 24H2
OS build 26100.2314
Experience Windows Feature Experience Pack 1000.26100.32.0
---
### Original Comments
#### Feedback Bot on 11/20/2024, 07:21 AM:
<p>We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.</p>
1 Like
yujie
November 19, 2025, 1:15am
3
Okay… it seems there’s nothing I can do about it. I’ll need to put a memo on the switch button.