Mythruna

General Category => Tech Support => Topic started by: Thanos on June 13, 2012, 03:48:23 PM



Title: Moving to java 7???
Post by: Thanos on June 13, 2012, 03:48:23 PM
This is probably a dumb question, but I thought I would ask this both as a gamer and developer. Should i move to java 7 without risking messing my current java6 projects up? :P
I mean does it make any difference at all? What version of java are you using for developing and testing mythruna Paul?


Title: Re: Moving to java 7???
Post by: pspeed on June 13, 2012, 04:51:42 PM
This is probably a dumb question, but I thought I would ask this both as a gamer and developer. Should i move to java 7 without risking messing my current java6 projects up? :P
I mean does it make any difference at all? What version of java are you using for developing and testing mythruna Paul?

I develop for 6 still because there were some (minor?) issues with 7 at one time but mostly because there was some question how long it would be before Macs supported 7.

I haven't checked to see if any of these are still issues.  I think quite a few people run Mythruna under Java 7 but I can't be sure since I don't yet have stats for that.


Title: Re: Moving to java 7???
Post by: Thanos on June 13, 2012, 05:26:09 PM
oh ok well i just noticed at oracle's website there is a release of java 7u5 for Macosx-x64. java.com also recommends java 7u5 so i guess it must be pretty stable now. I may try it after all it claims to be backwards combatible with all the previous java versions so i guess i wont have any problems with my code.
p.s im using windows 7


Title: Re: Moving to java 7???
Post by: pspeed on June 13, 2012, 05:53:08 PM
Yeah, I heard there was movement on the Java 7 on Mac issue recently.  Since Java 6 is already end-of-lifed I think... it's worth moving.


Title: Re: Moving to java 7???
Post by: FutureB on June 14, 2012, 02:21:16 AM
tryed it just then with java 7 and it seemed fine.

in a few weeks ill be on holidays and will come back to mythruna properly haha i achualy miss playing it, when i went online just then i was so tempted to start building my next project iv planed but ehh have to get school over with so ill see you all soonnnnn :]


Title: Re: Moving to java 7???
Post by: Thanos on June 14, 2012, 06:47:20 AM
Yeay i tried mythruna with java 7 too and theres no difference at all except some stutterings on multiplayer (freezes for some milliseconds) that i also had with java 6 but now they seem to occur more frequently but maybe its my gpu's fault for that. (same thing with minecraft too) Programs tha use ftp calls though wont work with java 7 until you disable windows firewall... That bug has been reported as fas as ive seen but no solution yet :-\


Title: Re: Moving to java 7???
Post by: pspeed on June 14, 2012, 10:10:47 AM
Yeay i tried mythruna with java 7 too and theres no difference at all except some stutterings on multiplayer (freezes for some milliseconds) that i also had with java 6 but now they seem to occur more frequently but maybe its my gpu's fault for that. (same thing with minecraft too) Programs tha use ftp calls though wont work with java 7 until you disable windows firewall... That bug has been reported as fas as ive seen but no solution yet :-\

When you run, is the memory indicator in the lower right red or the same color as the rest of the debug stuff?  If you don't know what I'm talking about then maybe a screen shot would help.


Title: Re: Moving to java 7???
Post by: Thanos on June 14, 2012, 12:18:17 PM
Yeap it is red. That picture was taken using Java 6 if it matters at all. Oh i'd like to mention also that when i pause the game with esc and doing other stuff on the pc like browsing etc the game gives me an error and terminates that doesn't happen always though ::)
(http://i1242.photobucket.com/albums/gg524/ThanosFisherman/Mythruna1338946023583.png)


Title: Re: Moving to java 7???
Post by: pspeed on June 14, 2012, 12:24:03 PM
Yeap it is red. That picture was taken using Java 6 if it matters at all.
(http://i1242.photobucket.com/albums/gg524/ThanosFisherman/Mythruna1338946023583.png)

Red means it is ignoring the heap settings that are built into the exe.  You have have some global Java environment variable set somewhere since apparently this is common for Minecraft.

If you type /mem in the chat bar you should see the max memory... the max total is supposed to be 512 meg but I suspect it is only 256 in yours.  This will cause frequent GC pauses once the heap percentage starts to go up.  Worse on multiplayer since the networking stack churns through lots of temporary buffers.


Title: Re: Moving to java 7???
Post by: Thanos on June 14, 2012, 12:43:22 PM
i haven't set a global Java environment variable at least manually but if i type "java" on cmd, the java options menu shows up. Im using both java 64 and 32 bit (on windows 7 64bit) virtual machines you think this may causing a conflict?
i tried /mem a few times and this is what i get

Working Memory 51% (165888344/321060864) VmMax 34% (165888344/477233152)
Working Memory 59% (too bored to write the numbers) VmMax 40%
Working Memory 65% VmMax 43%
Working Memory 70% VmMax 46%
Working Memory 67% VmMax 45%
Working Memory 69% VmMax 46%
Working Memory 43% VmMax 29%

How can i fix this red mem thing?


Title: Re: Moving to java 7???
Post by: pspeed on June 14, 2012, 12:59:50 PM
i haven't set a global Java environment variable at least manually but if i type "java" on cmd, the java options menu shows up. Im using both java 64 and 32 bit (on windows 7 64bit) virtual machines you think this may causing a conflict?
i tried /mem a few times and this is what i get

Working Memory 51% (165888344/321060864) VmMax 34% (165888344/477233152)
Working Memory 59% (too bored to write the numbers) VmMax 40%
Working Memory 65% VmMax 43%
Working Memory 70% VmMax 46%
Working Memory 67% VmMax 45%
Working Memory 69% VmMax 46%
Working Memory 43% VmMax 29%

How can i fix this red mem thing?

This one: 477233152  is the critical number.  That's the max heap in bytes... and it should be above 512000000.  Mine is 518979something.

There was another user who had this issue and it turned out to be a global environment variable which is why I asked about that.  If you open a command line and run "set" with no options it will dump all of the variables.  "set JAVA" will dump all of the ones that start with the word "JAVA".

...see what that says.  Apparently it seems like some minecraft related utility or something may set this environment variable but I don't know the specifics.


Title: Re: Moving to java 7???
Post by: Thanos on June 14, 2012, 01:09:33 PM
thats strange i dont see anything java related with SET also SET JAVA responds with "Environment Variable JAVA not defined"  ???


Title: Re: Moving to java 7???
Post by: pspeed on June 14, 2012, 02:26:49 PM
thats strange i dont see anything java related with SET also SET JAVA responds with "Environment Variable JAVA not defined"  ???

Ok... then you must not have any defined and something else is overriding the settings.  Very strange.


Title: Re: Moving to java 7???
Post by: Thanos on June 14, 2012, 03:23:12 PM
Does the fact that im running both 32 and 64bit jres have anything to do with the problem? I created a bat file trying to give bigger heap size to mythruna.exe but i dont know if its correct. It looks like this

@ECHO OFF
SET BINDIR=%~dp0
CD /D "%BINDIR%"
"%ProgramFiles%\Java\jre7\bin\java.exe" -Xmx1024M -Xms1024M -jar Mythruna-20120508.exe
PAUSE

In that case Mythruna.exe is running using the 64bit jre, So i run the bat file and then it runs the exe. Take a look at the pictures below the mem has improved but im getting tons of errors at command prompt and this is causing the game to run too damn slow in fact slower than ever before lol :P So i dont know whats going on either but anyway its not a big deal just a few freezes here and there i can handle them i guess.

(http://i1242.photobucket.com/albums/gg524/ThanosFisherman/Mythruna1339711449401.png)
(http://i1242.photobucket.com/albums/gg524/ThanosFisherman/errors.jpg)


Title: Re: Moving to java 7???
Post by: pspeed on June 14, 2012, 05:54:37 PM
Ah... I think the errors are good.  We might have seen them in the error log too.  I will try to fix these for the next version.  This may be why you get pauses, too.


Title: Re: Moving to java 7???
Post by: pspeed on June 14, 2012, 05:54:53 PM
Note: errors are Java 7 specific.


Title: Re: Moving to java 7???
Post by: Thanos on June 15, 2012, 06:24:30 AM
Well i may switch again to java 6 as long as they are still updating it but the difference to the game is not dramatically big Anyway good luck with the errors i hope i helped a bit :)


Title: Re: Moving to java 7???
Post by: pspeed on June 15, 2012, 09:39:34 AM
Yeah, it's helpful.  It was a bug that I sort of knew about but had forgotten... so it's good for the reminder.

If I have time this weekend I may make a side-track through some maintenance related things and put out a new release with bug fixes, some performance tests, and the new mortared stone material.


Title: Re: Moving to java 7???
Post by: Thanos on June 16, 2012, 07:40:37 AM
Just a little update: The fact that i was running both 32 and 64 bit jvms on an 64bit Windows7 was the reason that the heap sized was being ignored So i deleted the 64bit Jvm and there are no classpath issues now, also the /mem command gives me 5189something as you said. There are still some pauses though here and there but it feels like its better than before. I really dont know whats the difference between 64 vs 32 bit jvms but i need them both cause some native-32-bit dll libraries won't compile on 64 jvm and vice versa  :-\


Title: Re: Moving to java 7???
Post by: pspeed on June 16, 2012, 09:00:30 AM
Just a little update: The fact that i was running both 32 and 64 bit jvms on an 64bit Windows7 was the reason that the heap sized was being ignored So i deleted the 64bit Jvm and there are no classpath issues now, also the /mem command gives me 5189something as you said. There are still some pauses though here and there but it feels like its better than before. I really dont know whats the difference between 64 vs 32 bit jvms but i need them both cause some native-32-bit dll libraries won't compile on 64 jvm and vice versa  :-\

On Java7 I'm pretty sure the pauses come from when it manually tries to free buffers but instead produces a ton of error output.  The buffers get freed by themselves eventually but replacing freeing with error output can't be good for performance. :)


Title: Re: Moving to java 7???
Post by: ahmadsal on June 16, 2012, 06:34:14 PM
I would like to add I also have the red memory

Windows 7 x64
Using both 32bit and 64bit java 6

I'm going to upgrade to java 7 64bit today but looking above I don't think the memory would turn white

Also, the lag is very minor when one loads a new leaf


Title: Re: Moving to java 7???
Post by: pspeed on June 16, 2012, 06:52:44 PM
I would like to add I also have the red memory

Windows 7 x64
Using both 32bit and 64bit java 6

I'm going to upgrade to java 7 64bit today but looking above I don't think the memory would turn white

Also, the lag is very minor when one loads a new leaf


Try running the /mem command in the chat bar and taking a screen cap.

Usually with Java 6 if there is a red memory indicator then it is a sign that the memory settings have been overridden at the operating system level with an environment variable.


Title: Re: Moving to java 7???
Post by: Thanos on June 17, 2012, 01:49:33 PM
I would like to add I also have the red memory

Windows 7 x64
Using both 32bit and 64bit java 6

I'm going to upgrade to java 7 64bit today but looking above I don't think the memory would turn white

Also, the lag is very minor when one loads a new leaf


if you delete the 64bit jre your mythruna memory indicator will be white and fine, alternatively you could use the bat script i made and give it a bigger heap size manually. It really works but only on java6. I switched back to java6 again and running mythruna through the bat file i made and its pretty fine :)


Title: Re: Moving to java 7???
Post by: pspeed on June 17, 2012, 03:12:28 PM
The slight memory difference isn't the big deal with 7... it's the other bug.

I put the red memory indicator in to catch the people that had global options overriding Mythruna's default memory settings... since in the case the other player was seeing it the memory was half what it was supposed to be.


Title: Re: Moving to java 7???
Post by: ahmadsal on June 17, 2012, 03:34:04 PM
I'm fine with how it is, it just happens to be a less-than-a-second lag updating the world with the new leaf.

No screenshot but first check resulted with a number exactly the same as thanos 477233152.
Opening a couple of thermal monitoring software, the number actually rose to 500something, so better?

It isn't a big deal, just adding to information pool if you ever have the time to fix these minor things.


Title: Re: Moving to java 7???
Post by: Moonkey on June 18, 2012, 07:33:17 AM
Just to clarify: Minecraft uses 512 mb's of Memory and nothing less since if less you would get "out of Memory" errors in Minecraft.


Title: Re: Moving to java 7???
Post by: pspeed on June 18, 2012, 12:07:18 PM
Just to clarify: Minecraft uses 512 mb's of Memory and nothing less since if less you would get "out of Memory" errors in Minecraft.

See this thread:
http://mythruna.com/forum/index.php?topic=688.0

Mythruna also wants 512 meg.  Some Minecraft related utility was setting it to 256 (with 256 minimum also which Mythruna doesn't care about).


Title: Re: Moving to java 7???
Post by: Moonkey on June 18, 2012, 06:09:18 PM
Just to clarify: Minecraft uses 512 mb's of Memory and nothing less since if less you would get "out of Memory" errors in Minecraft.

See this thread:
http://mythruna.com/forum/index.php?topic=688.0

Mythruna also wants 512 meg.  Some Minecraft related utility was setting it to 256 (with 256 minimum also which Mythruna doesn't care about).

I've never had this problem with Minecraft and since Minecraft needs lots of memory to run I doubt they would have something set up to limit it. I'm sure it has to be the cards problem. But just to clear my mistakes, what do you mean by "utility".


Title: Re: Moving to java 7???
Post by: pspeed on June 18, 2012, 08:06:17 PM
Just to clarify: Minecraft uses 512 mb's of Memory and nothing less since if less you would get "out of Memory" errors in Minecraft.

See this thread:
http://mythruna.com/forum/index.php?topic=688.0

Mythruna also wants 512 meg.  Some Minecraft related utility was setting it to 256 (with 256 minimum also which Mythruna doesn't care about).

I've never had this problem with Minecraft and since Minecraft needs lots of memory to run I doubt they would have something set up to limit it. I'm sure it has to be the cards problem. But just to clear my mistakes, what do you mean by "utility".

I don't know, man.  This has nothing to do with graphics cards, either.  Read the other thread and maybe you will see something I didn't.

when he was reporting the problem I went to see if I could find anything on the _JAVA_OPTs thing and I was getting lots of minecraft related hits and hits for some related utility.