Page 3 of 3

Re: BAI

Posted: 20 May 2010, 14:34
by slogic
Is demo file attached at first post for development version of Spring?
PS. Worked anyway for release version.
PSS. I liked the idea how you distributed different types of factory per each AI in a same team as starting factory.

Re: BAI

Posted: 20 May 2010, 18:24
by jseah
Thanks again but it still doesn't work.
Contents of AI\Interfaces\Java\0.1\log
05/20/10 17:15:29 / CUSTOM(-1): [logging started (time-stamps: yes / logLevel: 5)]
05/20/10 17:15:29 / NORMAL(5): This is the log-file of the Java v0.1 AI Interface
05/20/10 17:15:29 / NORMAL(5): Using read/write data-directory: E:\Root\Games\Spring\AI\Interfaces\Java\0.1\
05/20/10 17:15:29 / NORMAL(5): Using log file: E:\Root\Games\Spring\AI\Interfaces\Java\0.1\interface.properties
05/20/10 17:15:29 / NORMAL(5): Successfully loaded the JVM shared library at "C:\Program Files\Java\jre6\bin\client\jvm.dll".
05/20/10 17:15:29 / NORMAL(5): Unable to find common read-only native libs data-dir (optional).
Appears to be the same problem as before. After I have reinstalled JRE since this morning.

Re: BAI

Posted: 20 May 2010, 21:20
by hoijui
hmm.. that line is normal too. it did not find an optional dir -> nothing bad.

maybe upload whole infolog.txt and script.txt (should always give whole infolog, it is not always the last part that is interesting).

Re: BAI

Posted: 20 May 2010, 23:16
by Petah
Nothing was logged in BAI/0.1/logs/ or BAI/0.1/logs/archive/ ?
If you are not on windows you might need to provide write permission to the following directories:
  • logs
  • logs/archive
  • cache
  • settings
I would personally just:

Code: Select all

chmod -R 777 BAI/0.1

Re: BAI

Posted: 21 May 2010, 01:25
by jseah
In BAI\logs and \archive are only .gitignore files.

Infolog from just now:
http://pastebin.com/Rhn8LyQS

Java\0.1\log
[quote]05/21/10 00:23:05 / CUSTOM(-1): [logging started (time-stamps: yes / logLevel: 5)]
05/21/10 00:23:05 / NORMAL(5): This is the log-file of the Java v0.1 AI Interface
05/21/10 00:23:05 / NORMAL(5): Using read/write data-directory: E:\Root\Games\Spring\AI\Interfaces\Java\0.1\
05/21/10 00:23:05 / NORMAL(5): Using log file: E:\Root\Games\Spring\AI\Interfaces\Java\0.1\interface.properties
05/21/10 00:23:05 / NORMAL(5): Successfully loaded the JVM shared library at "C:\Program Files\Java\jre6\bin\client\jvm.dll".
05/21/10 00:23:05 / NORMAL(5): Unable to find common read-only native libs data-dir (optional).[/quote]


EDIT: I am on windows (32bit)
Also, the Java NullAI works.

Re: BAI

Posted: 21 May 2010, 09:07
by slogic
Exactly same issue as jseah faced. OS: Windows 7 32 bit. Same logs. AI log fodlers are empty. There is no sign that BAI attempted to run.

Re: BAI

Posted: 26 May 2010, 22:03
by cranphin
Hmm, BAI from the zipfile runs fine for me.
That's on Windows 7, 64bit :)
Java: 1.6.0_20 (32 bit version).
Spring: Spring 0.81.2.1

I installed Spring under c:\Spring, since it's not happy under the 'Program Files' folder :)

Is your Java version recent?

Hmm, I might've tweaked stuff..
Yeah, that breaks it for me if I revert it :)
Try this, in:
\Spring\AI\Interfaces\Java\0.1\jvm.properties
Replace:

Code: Select all

jvm.option.x=-Xms4M
jvm.option.x=-Xmx64M
With

Code: Select all

jvm.option.x=-Xms16M
jvm.option.x=-Xmx128M
That might solve your problem :)

Re: BAI

Posted: 27 May 2010, 02:43
by Petah
Yea that might be it. I do remember having to increase the memory settings.

Re: BAI

Posted: 27 May 2010, 03:37
by jseah
I have done the above change to the file.
And my java was reinstalled just last week.

It now crashes properly. (instead of randomly exiting)

Spring Infolog:
http://pastebin.com/GjdE1SGK

Error Log in BAI logs folder is blank
This is the "output" file:
http://pastebin.com/4WZEfaD1

Re: BAI

Posted: 27 May 2010, 13:00
by cranphin
Hmm, now that's a nasty crash :)
Is there a "hs_err_pid*.log" file in the Spring folder?
Looks like atleast the Java code runs before it crashes, so that's something :) (based on the BAI output log).
Never seen that happen tho:
(0) C:\Program Files\Java\jre6\bin\java.dll(JNU_CallStaticMethodByName+0x1f) [0x6D334E46]

Not sure how to debug that, looks like Java code (trying) to be called from native, or? No idea XD Mayby hoijui has an idea :)

Otherwise, need to somehow figure out where in the Java code exactly it fails, could add debug stuff and recompile and run ;) The output log already gives an indication where it crashes possibly :)

Hmm, what Java version are you running? (javapath/bin/java.exe -version).
This is a clean Spring install?

Re: BAI

Posted: 27 May 2010, 13:12
by jseah
There's no hs_err_pid*.log file in the Spring folder.

It's not a clean install in that I've run it for some time and added lots of mod and maps. But no, I'm not running it off the Kernel Panic install or anything like that. (KP is in a separate install path)
Anyway, trying a clean install and seeing what works.

Command Prompt:
anywhere\>java -version

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

EDIT:
from clean install generates the same error.

Re: BAI

Posted: 27 May 2010, 15:40
by cranphin
Drat, that's me out of idea's :)
hoijui: Help! ^.^

Re: BAI

Posted: 27 May 2010, 20:16
by hoijui
sounds like the AI was not compiled for the Java AI Interface version you are using.
Or at least that is the most likely reason (and the only one i could think of right now).

Re: BAI

Posted: 27 May 2010, 23:25
by cranphin
hoijui wrote:sounds like the AI was not compiled for the Java AI Interface version you are using.
Or at least that is the most likely reason (and the only one i could think of right now).
Hmmm.. He used the ai from the BAI.zip Petah made for him if I understand well..
I've tested thatone against the same Spring version as he used (based on the infolog = latest release), and it works fine. Also I think Petah would have used the latest release Spring ;)
So I don't think it's a version mismatch.

But it does have me stumped :)
That method isn't called from your C code, so it's something Java does itself I guess, and there's no (C++) stacktrace either. Mayby it's a problem with the threading model BAI uses, but dunno, still a freaky crash then :)
Mayby it's just some memory/pointer corruption thing? I noticed my (release, forgot for pureint) Spring always crashes when I exit after running a Java AI, mayby there's a wrong pointer or so somewhere :)

But I really don't know, it's weird ;)
Mayby we need more testers, see if it happens for more people :D

Re: BAI

Posted: 27 Dec 2010, 18:02
by yanom
Spring always crashes when I exit after running a Java AI, mayby there's a wrong pointer or so somewhere :)
Same here. I'm running Spring on Linux, you?

Re: BAI

Posted: 28 Dec 2010, 13:15
by cranphin
yanom wrote:
Spring always crashes when I exit after running a Java AI, mayby there's a wrong pointer or so somewhere :)
Same here. I'm running Spring on Linux, you?
Windows :D

But it's been a while since that post, not sure if it still holds :)
Think it has and hasn't with different versions ^.^