OpenJDK Memory Leak

The worst monsters in the Hearthlands warp the fabric of space and time...

OpenJDK Memory Leak

Postby r0ck4ev3r » Tue Dec 02, 2025 8:09 pm

When I launch any haven(modded or not) thru steam the OpenJDK will eat ram till it crashes;
With original Java .jar no issues.

Is anyone else seeing this issue launching through steam's portal?
"Don't just have an idea- have all of them." ~ Niv-Mizzet
User avatar
r0ck4ev3r
 
Posts: 192
Joined: Tue Mar 13, 2012 10:30 pm

Re: OpenJDK Memory Leak

Postby vatas » Tue Dec 02, 2025 8:47 pm

From Hurricane client's Discord server (info channel):

I've also been playing on GraalVM 21 (some different open-source java distribution based on OpenJDK), and I seem to get like 15-20 extra FPS out of the client.


https://www.graalvm.org/downloads/ (select 21 from the drop-down menu).

Personally I have Java 15 and Hurricane (standalone.) The Steam version of Hurricane should use an on-board version of Java.

Steam Note: The Steam Workshop client is already using Java 23 (not working with the standalone client for now), so you don't have to change your Java version if you're playing through Steam via the Workshop client.
Haven and Hearth Wiki (Maintained by volunteers - test/verify when practical. Forum thread

Basic Claim Safety (And what you’re doing wrong
TL:;DR: Build a Palisade with only Visitor gates.)

Combat Guide (Overview, PVE, PVP) (Includes how to escape/minimize risk of getting killed.)
User avatar
vatas
 
Posts: 4975
Joined: Fri Apr 05, 2013 8:34 am
Location: Suomi Finland Perkele

Re: OpenJDK Memory Leak

Postby r0ck4ev3r » Fri Dec 05, 2025 11:20 pm

So the temp fix I ended up using is to: force steam to stop using OpenJDK

I used Java 25.0.1, and moved its Java, Javaw, and Javac executables into steams' \common\Haven\jre
"Don't just have an idea- have all of them." ~ Niv-Mizzet
User avatar
r0ck4ev3r
 
Posts: 192
Joined: Tue Mar 13, 2012 10:30 pm

Re: OpenJDK Memory Leak

Postby bopke » Fri Dec 05, 2025 11:38 pm

I had the same issue and it turns out it was connected to discord detecting game, when I toggled that off in discord the issue went away.
bopke
 
Posts: 7
Joined: Thu Mar 10, 2022 8:35 pm

Re: OpenJDK Memory Leak

Postby loftar » Sat Dec 06, 2025 4:35 am

I don't think it's an issue intrinsic to OpenJDK, at least. I also use OpenJDK, and I haven't had any detectable memory leaks.

bopke wrote:I had the same issue and it turns out it was connected to discord detecting game, when I toggled that off in discord the issue went away.

That's interesting if true. Can anyone else confirm?
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9084
Joined: Fri Apr 03, 2009 7:05 am

Re: OpenJDK Memory Leak

Postby bopke » Sat Dec 06, 2025 5:33 am

I also recorded now the behaviour. I don't even need to get into the world. This is recorded with freshly downloaded autohaven, but client from steam is showing the same behaviour.

https://www.youtube.com/watch?v=Ku1-hZYgb5g

The memory usage will climb endlessly, and performance of the game will deteriorate until it is unable to pump next frame at all
bopke
 
Posts: 7
Joined: Thu Mar 10, 2022 8:35 pm

Re: OpenJDK Memory Leak

Postby Hayaikawa » Sat Dec 06, 2025 6:38 am

bopke wrote:I also recorded now the behaviour. I don't even need to get into the world. This is recorded with freshly downloaded autohaven, but client from steam is showing the same behaviour.


The memory usage will climb endlessly, and performance of the game will deteriorate until it is unable to pump next frame at all



I am having the same exact issue...
Hayaikawa
 
Posts: 3
Joined: Tue Jan 10, 2012 2:25 am

Re: OpenJDK Memory Leak

Postby loftar » Sat Dec 06, 2025 10:18 pm

Hayaikawa wrote:I am having the same exact issue...

So it helps if you turn off Discord's game detection?
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9084
Joined: Fri Apr 03, 2009 7:05 am

Re: OpenJDK Memory Leak

Postby Hayaikawa » Sun Dec 07, 2025 8:04 am

Ok, so potential fix.

When I stream the game play in Discord the memory leak speed is reduced by about 10 times.
I can actually play the game at full frames and it takes around 5 minutes before my ram is maxed out.

I have tested multiple times, literally streaming the game while it runs stops 90% of the way.
Hayaikawa
 
Posts: 3
Joined: Tue Jan 10, 2012 2:25 am

Re: OpenJDK Memory Leak

Postby Stoolej » Sun Dec 07, 2025 5:11 pm

loftar wrote:
Hayaikawa wrote:I am having the same exact issue...

So it helps if you turn off Discord's game detection?



I, on the other hand, have to kill the Discord process every time, otherwise I encounter a memory leak.
Stoolej
 
Posts: 1
Joined: Sat Nov 02, 2024 1:33 pm

Next

Return to Bugs

Who is online

Users browsing this forum: Claude [Bot] and 41 guests