Minecraft crashing on window unfocus or when fullscreen gets disabled.

Whenever I play Minecraft with Distant Horizons 1.7+ installed on any 1.20 version, the game crashes once I unfocus the window, Alt+Tab out of it or even when I disable fullscreen. The issue occurs on any instance I have installed, with Fabric and no other mods installed too. Launcher shows error code "-1073741819" but no error log is generated. I'll paste the actual log in a comment. My hardware and software config is: - Windows 11 Pro 23H2 - AMD Ryzen 7 7800X3D @4.2 GHz, PBO -40, iGPU disabled - 32 GB DDR5 6200MT/s - 2 TB nvme SSD - 2 TB SATA SSD - RX 7900XT 20GB @1040mV, 299W - Java JDK 21 - Legacy Minecraft Launcher Minecraft with Distant Horizons works perfectly fine until the window unfocuses for even a split second. I appreciate any help! Thank you!
Solution:
I went into settings to Graphics and changed both Minecraft Java Runtimes, gamma and delta to Energy saving mode (iGPU) and it worked. Setting it to high performance (RX 7900XT) worked too
Jump to solution
51 Replies
Scherzkeks
Scherzkeks•2w ago
log, only DH, unfocused on startup
Puhpine
Puhpine•2w ago
are you sure your PBO is stable? -40 is really heavy yo can use prime95 to figure that out if you haven't already
Scherzkeks
Scherzkeks•2w ago
yes works everywhere even in UE5 games
Puhpine
Puhpine•2w ago
hhmm, i dont see anything in logs, so thats annoying
l_aggy
l_aggy•2w ago
u only using dh? theres like nothing in the logs lol
Puhpine
Puhpine•2w ago
does it at least work without DH?
Scherzkeks
Scherzkeks•2w ago
yup thats the issue yes
Puhpine
Puhpine•2w ago
really weird. i dont even know how to diagnose this
l_aggy
l_aggy•2w ago
how long were u in the game b4 tabbing out
Scherzkeks
Scherzkeks•2w ago
doesn't matter... seconds to hours let me try reinstalling it one more time
l_aggy
l_aggy•2w ago
not any external program doing it?
Scherzkeks
Scherzkeks•2w ago
wdym?
l_aggy
l_aggy•2w ago
idk maybe a program closed it
Scherzkeks
Scherzkeks•2w ago
nope
l_aggy
l_aggy•2w ago
how much ram is allocated
Scherzkeks
Scherzkeks•2w ago
24GB One thing though:
l_aggy
l_aggy•2w ago
whats is javaw's priority ye...
Scherzkeks
Scherzkeks•2w ago
I did install Stable Diffusion, ROCm and Python around the time this issue started to happen... seems unlikely, but idk normal also i cant change it bc that would mean it would crash
l_aggy
l_aggy•2w ago
i mean u can with a program automatically
Scherzkeks
Scherzkeks•2w ago
Yes but I want to avoid that, normal seams to be fine for everything and only if priorities are changed on unfocusing then it could become and issue
l_aggy
l_aggy•2w ago
ok some pple say that giving java alot of ram can mess it up as its not good with alot but idk if thts true if u want maybe try with the igpu
Puhpine
Puhpine•2w ago
it gives more GC stutter. it wont crash the game or anything like that
l_aggy
l_aggy•2w ago
ye ik
Puhpine
Puhpine•2w ago
its better to give too much ram than too little
l_aggy
l_aggy•2w ago
best to check everything asw tho right?
Puhpine
Puhpine•2w ago
true
Scherzkeks
Scherzkeks•2w ago
okay ill set it to 4gb and igpu
l_aggy
l_aggy•2w ago
alr ur drivers up to date im guessing asw? maybe ur igpu needs updating b4 launching mc on it asw?
Scherzkeks
Scherzkeks•2w ago
i usually have the iGPU disabled, now it didn't work, I'm on the latest Adrenalin drivers 4GB made it crash
l_aggy
l_aggy•2w ago
crashed on 4gb wt
Scherzkeks
Scherzkeks•2w ago
wt?
l_aggy
l_aggy•2w ago
howd the game crash due to 4gb ram allocated
Scherzkeks
Scherzkeks•2w ago
oom
l_aggy
l_aggy•2w ago
reinstall dh ig idrk
Scherzkeks
Scherzkeks•2w ago
wait it works... I've had this issue for 2 weeks But WHY
l_aggy
l_aggy•2w ago
works with what ????!!??!
Scherzkeks
Scherzkeks•2w ago
It just works with the config listed in the description
l_aggy
l_aggy•2w ago
wdym listed in the description
Scherzkeks
Scherzkeks•2w ago
hold on
l_aggy
l_aggy•2w ago
where did u download DH
Scherzkeks
Scherzkeks•2w ago
Modrinth & GitLab Hold on one sec Okay so: I reenabled the iGPU, that did not change anything
l_aggy
l_aggy•2w ago
reenabled and selected it or just reenabling it
Solution
Scherzkeks
Scherzkeks•2w ago
I went into settings to Graphics and changed both Minecraft Java Runtimes, gamma and delta to Energy saving mode (iGPU) and it worked. Setting it to high performance (RX 7900XT) worked too
l_aggy
l_aggy•2w ago
o ok
Scherzkeks
Scherzkeks•2w ago
setting it back to auto did work too I did however not reboot the system
l_aggy
l_aggy•2w ago
💀 windows
Scherzkeks
Scherzkeks•2w ago
But for some reasons it now works on no matter what i do???
l_aggy
l_aggy•2w ago
nice maybe it was a cosmic ray yk
Scherzkeks
Scherzkeks•2w ago
And I could swear to you, I did everything, i even uninstalled all drivers and everything and I had this issue for weeks Well ig thanks for the tips, the magic did its thing
l_aggy
l_aggy•2w ago
ye gj gl
Scherzkeks
Scherzkeks•2w ago
thx