View topic - BAI



All times are UTC + 1 hour


Post new topic Reply to topic  [ 56 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: BAI
PostPosted: 20 May 2010, 13:34 
AI Coder

Joined: 17 Mar 2008, 19:03
Location: RF
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, 12:04, edited 2 times in total.

Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 20 May 2010, 17:24 

Joined: 10 Jun 2008, 02:28
Thanks again but it still doesn't work.
Contents of AI\Interfaces\Java\0.1\log
Quote:
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.


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 20 May 2010, 20:20 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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).


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 20 May 2010, 22:16 
User avatar

Joined: 13 Jan 2008, 19:40
Location: New Zealand
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:
chmod -R 777 BAI/0.1


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 21 May 2010, 00:25 

Joined: 10 Jun 2008, 02:28
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).


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


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 21 May 2010, 08:07 
AI Coder

Joined: 17 Mar 2008, 19:03
Location: RF
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.


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 26 May 2010, 21:03 

Joined: 13 Jun 2005, 15:37
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:
jvm.option.x=-Xms4M
jvm.option.x=-Xmx64M

With
Code:
jvm.option.x=-Xms16M
jvm.option.x=-Xmx128M


That might solve your problem :)


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 27 May 2010, 01:43 
User avatar

Joined: 13 Jan 2008, 19:40
Location: New Zealand
Yea that might be it. I do remember having to increase the memory settings.


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 27 May 2010, 02:37 

Joined: 10 Jun 2008, 02:28
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


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 27 May 2010, 12:00 

Joined: 13 Jun 2005, 15:37
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?


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 27 May 2010, 12:12 

Joined: 10 Jun 2008, 02:28
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.


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 27 May 2010, 14:40 

Joined: 13 Jun 2005, 15:37
Drat, that's me out of idea's :)
hoijui: Help! ^.^


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 27 May 2010, 19:16 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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).


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 27 May 2010, 22:25 

Joined: 13 Jun 2005, 15:37
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


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 27 Dec 2010, 18:02 

Joined: 10 Jul 2009, 22:34
Quote:
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?


Top
 Offline Profile  
 
 Post subject: Re: BAI
PostPosted: 28 Dec 2010, 13:15 

Joined: 13 Jun 2005, 15:37
yanom wrote:
Quote:
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 ^.^


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 56 posts ]  Go to page Previous  1, 2, 3

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.