Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Intermittent crashes #25

Closed
HenryBaby opened this issue May 16, 2022 · 6 comments
Closed

Intermittent crashes #25

HenryBaby opened this issue May 16, 2022 · 6 comments
Labels
help wanted Extra attention is needed Internal bug Related to used framework, user's OS or hardware

Comments

@HenryBaby
Copy link
Contributor

I am not sure how to reproduce this issue, but it happens to me at least a couple of times per day.

---------------------------
VoicemeeterFancyOSD
---------------------------
PRESS Ctrl + C TO COPY THIS TEXT
Unhandled exception:
 Insufficient memory to continue the execution of the program.    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)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)

   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
---------------------------
OK   
---------------------------
@A-tG
Copy link
Owner

A-tG commented May 16, 2022

It is some kind of WPF internal render failure. May be related to bad GPU driver, insufficient VRAM. You can monitor VRAM usage in Task Manager: click on the bottom 'More Details' -> 'Details' tab -> Right Click on columns -> Select columns -> Check 'Dedicated GPU memory'. In my case it's around 18-19 K. You may also disable hardware acceleration for WPF globally

@A-tG A-tG added bug Something isn't working help wanted Extra attention is needed Internal bug Related to used framework, user's OS or hardware and removed bug Something isn't working labels May 16, 2022
@HenryBaby
Copy link
Contributor Author

HenryBaby commented May 16, 2022

Interesting! I have checked and it goes between 0 K and 3760 K. See attached screenshot:

image

I did notice something interesting tho. I am using the application on a laptop that has a mux switch. So I'm basically running only on the discrete GPU, not the iGPU/Nvidia Optimus/Hybrid. Every time your app crashes, Windows/Nvidia Control Panel seem to think that I am not running on discrete mode only, it tends to swap back to thinking I'm running hybrid. A restart solves the issue. Also, this is seemingly only happening after the laptop is waking up from sleep (although this is even weirder because I have configured it to never go to sleep).

I'll try disabling hardware acceleration globally for WPF, and let's see what happens. This might not even be an issue of the application I think, it just might be this laptop right?

@A-tG
Copy link
Owner

A-tG commented May 16, 2022

I've added option to disable hardware acceleration in new version. It's not optimal but it should help in similar cases. And yeah, it most likely OS/GPU/gpu-driver problem. As far as I know iGPU may be using RAM as VRAM and maybe at some point there is not enough free memory - it might be the case too.

@HenryBaby
Copy link
Contributor Author

Yeah, I agree. You can close this issue I think. I'll look around for other solutions, seems the problem seems to be somewhere else.

@A-tG A-tG pinned this issue May 16, 2022
@A-tG A-tG closed this as completed May 16, 2022
@HenryBaby
Copy link
Contributor Author

I've tried the latest release, running on SoftwareOnly, and so far I can't reproduce the issue, which makes me happy of course!

But it would be cool to be able to fix the original issue, since I assume this might happen with other tools in the future. Thank's for the quick fix!

@HenryBaby
Copy link
Contributor Author

Just wanted to give a small update. The driver failure/memory failure(?) still happens, the only thing that is fixed in 0.13.0.0 is that if RenderMode is set to SoftwareOnly the program no longer crashes during the failure. Coincidentally if I don't run the program, I can't reproduce the issue at all.

I am currently in the process of testing older versions to see if a specific change might be the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Internal bug Related to used framework, user's OS or hardware
Projects
None yet
Development

No branches or pull requests

2 participants