Constant Client crashes

Forum for alternative clients, mods & discussions on the same.
User avatar
cyrus9586
Posts: 425
Joined: Sat Aug 10, 2013 7:40 am

Constant Client crashes

Post by cyrus9586 »

java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Unknown Source)
at haven.Defer$1.run(Defer.java:297)
at haven.Defer$1.run(Defer.java:294)
at java.security.AccessController.doPrivileged(Native Method)
at haven.Defer.defer(Defer.java:294)
at haven.Defer.defer(Defer.java:308)
at haven.Defer.later(Defer.java:330)
at haven.MCache$Grid.buildcut(MCache.java:474)
at haven.MCache$Grid.invalidate(MCache.java:519)
at haven.MCache$Grid.fill(MCache.java:720)
at haven.MCache.mapdata2(MCache.java:940)
at haven.MCache.mapdata(MCache.java:969)
at haven.Session$RWorker.run(Session.java:522)

Vanilla or ender dont matter. Happens mostly when entering buildings, mines, sometimes just walking around.
Former proud Owner of Hoo Cudda De Cheese Factory W9.
Mad God of New Sheoth W14
CHEESE FOR EVERYONE!
User avatar
dagrimreefah
Posts: 2648
Joined: Wed May 25, 2011 3:01 am

Re: Constant Client crashes

Post by dagrimreefah »

What OS are you using? Are you on a virtual machine? Seems the application is hitting the OS's thread limit. Going out on a limb here but If you can lower the stack size for the process that might help. Usually it's 1 megabyte but you can try lowering it using:

Code: Select all

$java -Xss1024k -jar /path/to/launcher-hafen.jar
...just put in a value lower than the 1024k value shown above at application startup.
User avatar
cyrus9586
Posts: 425
Joined: Sat Aug 10, 2013 7:40 am

Re: Constant Client crashes

Post by cyrus9586 »

Sorry. Win10. no VC etc. Just using stanard client or ender. dont know how to add that
Former proud Owner of Hoo Cudda De Cheese Factory W9.
Mad God of New Sheoth W14
CHEESE FOR EVERYONE!
User avatar
dagrimreefah
Posts: 2648
Joined: Wed May 25, 2011 3:01 am

Re: Constant Client crashes

Post by dagrimreefah »

cyrus9586 wrote:Sorry. Win10. no VC etc. Just using stanard client or ender. dont know how to add that
You might be running too many applications, how much memory are you sitting at?
cyrus9586 wrote:dont know how to add that
You can open a command line window by typing cmd in the start menu's search bar, then just enter the above command into it (minus the $ and replace "/path/to/launcher-hafen.jar" with the path to your own launcher-hafen.jar)
Last edited by dagrimreefah on Sat May 27, 2023 3:51 am, edited 2 times in total.
User avatar
cyrus9586
Posts: 425
Joined: Sat Aug 10, 2013 7:40 am

Re: Constant Client crashes

Post by cyrus9586 »

128gb. Not an error there. I have 128gb of RAM installed and sit at about 8-10% depending on if chrome is open
Former proud Owner of Hoo Cudda De Cheese Factory W9.
Mad God of New Sheoth W14
CHEESE FOR EVERYONE!
User avatar
dagrimreefah
Posts: 2648
Joined: Wed May 25, 2011 3:01 am

Re: Constant Client crashes

Post by dagrimreefah »

cyrus9586 wrote:128gb. Not an error there. I have 128gb of RAM installed and sit at about 8-10% depending on if chrome is open
Weird. Definitely not that lol. I'm not too familiar with this memory allocation business, so the only thing I can tell ya is to try the above command to start it. You can also create a .bat file with the above command so you can just double click to start if it does indeed work. Good luck and hope you solve it
User avatar
cyrus9586
Posts: 425
Joined: Sat Aug 10, 2013 7:40 am

Re: Constant Client crashes

Post by cyrus9586 »

Already made and testing out. Thanks for the hand.
Former proud Owner of Hoo Cudda De Cheese Factory W9.
Mad God of New Sheoth W14
CHEESE FOR EVERYONE!
User avatar
JTB
Posts: 41
Joined: Fri Mar 06, 2020 2:10 pm

Re: Constant Client crashes

Post by JTB »

Well, in that case, what java do you have installed?
As fearless in death as he was in life
User avatar
vatas
Posts: 5255
Joined: Fri Apr 05, 2013 8:34 am
Location: Suomi Finland Perkele

Re: Constant Client crashes

Post by vatas »

There's also a launch argument to limit how much memory the client is allowed to use. If your run.bat has one for 1 gigabyte, it does not matter how much RAM you actually have.
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
loftar
Posts: 9096
Joined: Fri Apr 03, 2009 7:05 am
Location: Your character database

Re: Constant Client crashes

Post by loftar »

JTB wrote:Well, in that case, what java do you have installed?
This, you'll probably want to check so that you're using 64-bit Java, rather than 32-bit Java. It's still strange that you'd be hitting thread limits with 32-bit Java, but since you have 128 GB RAM, I might guess it's not an unreasonable expectation that you have quite a few cores as well, right? The client does have a bit of a per-core thread allocation strategy, so perhaps all the thread stacks cause some sort of memory fragmentation problem. Just a theory.
vatas wrote:There's also a launch argument to limit how much memory the client is allowed to use. If your run.bat has one for 1 gigabyte, it does not matter how much RAM you actually have.
This is true, but shouldn't affect thread allocation.
"Object-oriented design is the roman numerals of computing." -- Rob Pike

Return to “The Wizards' Tower”