BAI
Moderators: hoijui, Moderators
Re: BAI
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.
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.
Re: BAI
Thanks again but it still doesn't work.
Contents of AI\Interfaces\Java\0.1\log
Contents of AI\Interfaces\Java\0.1\log
Appears to be the same problem as before. After I have reinstalled JRE since this morning.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).
Re: BAI
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:
If you are not on windows you might need to provide write permission to the following directories:
- logs
- logs/archive
- cache
- settings
Code: Select all
chmod -R 777 BAI/0.1
Re: BAI
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.
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
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:
With
That might solve your problem :)
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
Code: Select all
jvm.option.x=-Xms16M
jvm.option.x=-Xmx128M
Re: BAI
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
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
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?
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

Hmm, what Java version are you running? (javapath/bin/java.exe -version).
This is a clean Spring install?
Re: BAI
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.
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
Hmmm.. He used the ai from the BAI.zip Petah made for him if I understand well..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).
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
Windows :Dyanom wrote:Same here. I'm running Spring on Linux, you?Spring always crashes when I exit after running a Java AI, mayby there's a wrong pointer or so somewhere :)
But it's been a while since that post, not sure if it still holds :)
Think it has and hasn't with different versions ^.^