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

System.OutOfMemoryException on Intel GPUs #4596

Open
bancog52 opened this issue Nov 28, 2024 · 6 comments
Open

System.OutOfMemoryException on Intel GPUs #4596

bancog52 opened this issue Nov 28, 2024 · 6 comments

Comments

@bancog52
Copy link

Hearthstone HDT plugin frequently crashes, the error window cannot be opened. Checking the Crash Reports file, the error message shows:System.OutOfMemoryException: There is not enough memory to continue the execution of the program.
Error status: During plugin operation, it suddenly freezes and requires a restart. After running for two or three rounds, it freezes again. Reinstalling HDT, Hearthstone, setting permissions, running antivirus, updating .NET, and even reinstalling the system have all been ineffective.
图片1
I checked the Windows system logs
图片3
图片4

Then I analyzed the possible causes
1、Insufficient system memory or improper application memory management. Ensure the system has enough available memory, close unnecessary applications
2、The exception occurs during WPF rendering process, possibly related to graphics resource management
3、Check for memory leaks or unnecessary resource allocation
4、Make sure you're using the latest version of the software

Finally, after various attempts, I discovered it was a WPF issue.
By disabling hardware acceleration, the software no longer uses the GPU but instead uses the CPU for rendering, and I found this resolved the issue.
image

I found that many people have encountered this issue but haven't solved it. I'm not sure if this solution will work for everyone. I wonder if this problem can ultimately be resolved at the code level.

@beheh
Copy link
Contributor

beheh commented Dec 1, 2024

Hi there, thanks for the report and the investigation!

I don't we can generally propose or automatically disable hardware acceleration, but this seems like it's indicative of some kind of behaviour in WPF, either because it's a bug or because HDT is triggering a bad behaviour. Nonetheless I'll see if we can add this to some FAQ or an error dialog.

@riQQ
Copy link
Collaborator

riQQ commented Jan 1, 2025

Are you using an Intel iGPU?
dotnet/wpf#7704

@bancog52
Copy link
Author

bancog52 commented Jan 2, 2025

您使用的是 Intel iGPU 吗? dotnet/WPF#7704

Yes, I am using an Intel i5-12500T CPU without a dedicated graphics card.
image

@beheh
Copy link
Contributor

beheh commented Jan 28, 2025

Hello,

I have a test build with one fix that might address this issue (even when removing the registry key again). There's more fixes and performance improvements on the way, but I'd like to get an early lead on whether this addresses the issue:

https://drive.google.com/file/d/1QJPOH6WTlq9bWuF5VKmKJGTwtXv0gdZM/view?usp=sharing

How to use:

  1. Download the Zip and unpack it anywhere (do not copy it over any existing install).
  2. Run HearthstoneDeckTracker.exe. You may need to explicitly tell Windows to allow this version, as it is not an official release yet.
  3. Play as usual. You hopefully don't get a crash anymore.

If you use the build, I'd be happy to hear how it goes (crash or no crash).

@bancog52
Copy link
Author

Hello,

I have a test build with one fix that might address this issue (even when removing the registry key again). There's more fixes and performance improvements on the way, but I'd like to get an early lead on whether this addresses the issue:

https://drive.google.com/file/d/1QJPOH6WTlq9bWuF5VKmKJGTwtXv0gdZM/view?usp=sharing

How to use:

  1. Download the Zip and unpack it anywhere (do not copy it over any existing install).
  2. Run HearthstoneDeckTracker.exe. You may need to explicitly tell Windows to allow this version, as it is not an official release yet.
  3. Play as usual. You hopefully don't get a crash anymore.

If you use the build, I'd be happy to hear how it goes (crash or no crash).

report.zip

Thank you for providing the test build. I followed the instructions and tested this version, but unfortunately the issue still persists

@beheh beheh changed the title Try to solve the error issue:System.OutOfMemoryException System.OutOfMemoryException on Intel GPUs Jan 29, 2025
@beheh
Copy link
Contributor

beheh commented Jan 29, 2025

I have a suspicion at this point that this instant crash only affects Intel integrated GPUs, and you can work around there with the registry fix suggested above. If you're a user who encounters more or less instant crashes on HDT v1.38.4+ and you're not on an Intel GPU, please also report here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants