Forums › English Language Forums › Technical › Technical Issues

Search

Freezing movement due to memory

4 replies [Last post]
Fri, 04/15/2011 - 12:45
Tropus
Legacy Username

Dear technically inclined people,

Okay,
so I've played this game for the past few days and I've run into this issue
where after a while I start to freeze and jump if you will in the direction
where I was headed before I froze. I checked in task manager and found
that it was stuck on 512mb usage for java.

I tried to increase it's available memory to 1024mb.
(as I believe this freezing is caused by java not having the available memory and needing to make a bit of room therefore lagging the program)

Since I've got 4gb memory, from which 1.5gb is always available to any game/program before I need to shut down browsers etc.
I was wondering how I can increase the available memory for java.

I tried doing it by modifying a .bat program I used to launch minecraft.
But it seemed to not work for me, and my java knowledge pretty much ends at that point.
I don't know if it's due to my shortcomings in knowledge or due to security preventing me from running spiral knights with an extra memory clause in the launch properties.

I would very much appreciate an answer/solution that allows me to use more memory for spiral knights.

And to get technical:
I base the conclusion of the freezing due to memory limit on the following details.

Freezing happens locally, not due to bad internet connection. (the game freezes, not me running and lagging)
The game still sends my movements to the server, but due to freezing makes me unable to change directions etc.
I monitored the game and found that it's stuck on 512mb and will not increase usage.
(that's java that's limited to 512mb)
I've got about 2gb more memory free which basically is not used.
My quadcore CPU doesn't even run at 100% (about 70% on the first and the other three run at around 30%)

Based on the facts that I've got a stable internet connection, the client freezes, java only uses 512mb maximum and having cpu and memory available that it's due to java's memory limit.

I hope the technical information is a bit more useful for those who're interested in it.
And if I do happen to be wrong, then I'd like to hear that.

With kind regards,
Tropus

Fri, 04/15/2011 - 14:08
#1
Tumble
Legacy Username
How did you increase memory

How did you increase memory to 1024, did you configure your java settings? If so, were you still getting a cap of 512 memory usage?

It's possible that a memory leak exists within the coding. When I monitored the mem usage, it doubled over the course of a session.

Fri, 04/15/2011 - 14:56
#2
Tropus
Legacy Username
I didn't actually increase it

I didn't actually increase it I tried using the following bit of code in a .bat file:
(Modified Minecraft Bukkit Server launcher)

@ECHO OFF
IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="64" "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xmx1024M -Xms1024M -jar "%~dp0getdown-pro.jar"
IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="86" java -Xmx1024M -Xms1024M -jar "%~dp0getdown-pro.jar"
PAUSE

That did not seem to work
Note: I tried both, "%~dp0getdown-pro.jar" and "getdown-pro.jar" as destination

But yes, I'd like to change java to use standard max 1.5gb of memory instead of 512mb, but so far I usually had to add some clause to increase memory.

Edit:
Forgot to mention that I do believe there's some memory leak, but this could be a temp fix for those who're encountering it.
More memory gives the potential of the problem appearing later during a session rather than soon.

Edit 2:
I'd like to notify anyone else, trying to fiddle around with things, somehow broke my spiral knights, had to reinstall.
So be carefull (I didn't even change any of the official files, just added a .bat file to the installation folder, but even removing that didn't make it work again.
So yeah, just a heads up to be carefull

Fri, 04/15/2011 - 16:03
#3
Tumble
Legacy Username
Did the batch file not run

Did the batch file not run the game at all, or did it run the game, but you are still getting the same memory issues? If you cannot run the game at all, it may indicate that it's being pointed to the wrong location, in which case you can manually put those settings into your java.

Go to control panel > java > java, and put -Xmx1024M -Xms1024M into your runtime parameters, then try playing spiral knights

Fri, 04/15/2011 - 17:08
#4
Tropus
Legacy Username
It didn't run at all, I'll

It didn't run at all,
I'll try out your suggestion and see if that works.
Thanks for replying.

I'll report any result

Powered by Drupal, an open source content management system