BAI - Page 3

BAI

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

slogic
AI Developer
Posts: 626
Joined: 17 Mar 2008, 19:03

Re: BAI

Post 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.
Last edited by slogic on 11 Jul 2010, 13:04, edited 2 times in total.
jseah
Posts: 42
Joined: 10 Jun 2008, 03:28

Re: BAI

Post 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.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: BAI

Post 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).
User avatar
Petah
Posts: 426
Joined: 13 Jan 2008, 19:40

Re: BAI

Post 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
jseah
Posts: 42
Joined: 10 Jun 2008, 03:28

Re: BAI

Post 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.
slogic
AI Developer
Posts: 626
Joined: 17 Mar 2008, 19:03

Re: BAI

Post 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.
cranphin
Posts: 136
Joined: 13 Jun 2005, 16:37

Re: BAI

Post 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 :)
User avatar
Petah
Posts: 426
Joined: 13 Jan 2008, 19:40

Re: BAI

Post by Petah »

Yea that might be it. I do remember having to increase the memory settings.
jseah
Posts: 42
Joined: 10 Jun 2008, 03:28

Re: BAI

Post 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
cranphin
Posts: 136
Joined: 13 Jun 2005, 16:37

Re: BAI

Post 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?
jseah
Posts: 42
Joined: 10 Jun 2008, 03:28

Re: BAI

Post 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.
cranphin
Posts: 136
Joined: 13 Jun 2005, 16:37

Re: BAI

Post by cranphin »

Drat, that's me out of idea's :)
hoijui: Help! ^.^
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: BAI

Post 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).
cranphin
Posts: 136
Joined: 13 Jun 2005, 16:37

Re: BAI

Post 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
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: BAI

Post 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?
cranphin
Posts: 136
Joined: 13 Jun 2005, 16:37

Re: BAI

Post 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 ^.^
Post Reply

Return to “AI”