whether using jdk1.6.0_03 or _05 should not make a difference at all, as these revisions are just for bug-fixing, so you can always use the latest (though JAI worked for me with _03).
i can not help you with the stuff from infolog alone. could you please attach all the log files in Bot-libs/JAI/log, plus possibly hotspot.log (in the spring main folder)? if there is one, please send also the hs*.log. thanks!
somethign else: i think the next version of JAI will be using the new AI C interface. i think i will have 2 interfaces, one with handleMessage, and posibly one that is quite like the current one, using the other interfaec with handleMessage behind the scenes.
Well I could solve the problem, but it will probably be a while since I just want to use some of my generic game AI's I developed for other games in Spring.
2 things: * as AF mentioned already, for log files, it would be better to use either http://www.pastebin.com or attach the files as such to your posts, not copy the text into the post, as this is bad for the forum layout. * as the JVM seems to load ok, there may be usefull info under AI/hoijui/log (if you use hoijui.jar for testing)
if we won't find the soon, i guess its easyer to wait till the new C interface is ready, and JAI ported to it (once the interface is ready, porting should take little time). possibly it will work then for you too.
Okay I have built it for 5956 and it works a little with minor hacks.
Issues:
1.
This method "bool CreateClassPath(char* classPath)" fails most of the time. I have not written c++ in a while so it was not clear to me why. Although, by replacing the body with: strcat(classPath, HACK_CLASS_PATH); it works everytime.
The HACK_CLASS_PATH is the same path used when it does work.
2. It also crashed here most of the time. I remarked this out in the "GetJNIEnv" method:
/* for (i = 0; i < vm_args.nOptions; i++) { delete vm_args.options[i].optionString; } delete vm_args.options; */
Okay with those two fixes it runs every load, but I get an Sync error and some of the commands crash. Specifically, 2,4, and 7 fail.
So I will paste bin the sync error with the hot spot. Also note before the fixes the JVM was not always loading.
I also noticed that you should use "#define SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON"
I would appreciate the SVN location of this stuff. The download page says it is in the SVN i.e., but I don't see it. I know it must be GPL since it uses GPL, but I would like to see that in the headers or a license file if your keeping it out of SVN.
Sync Error I get:
Sync warning: FPUCW 0x027F instead of 0x003A or 0x003F ("CGame::SimFrame")
Wow, nice! thanks for that! rightnow, i have no access to the code, but i will check some things when back home, especially about
Code:
#define SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON
there is no JAI source on the SVN, as i do not have write access to it, and it is also still not very stable, as you saw
i will check the class-path stuff as well. what i did not understand, is what you mean with commands 2, 4 and 7. you mean Commandwith id=7 eg?
i already changed this part of the code:
Code:
for (i = 0; i < vm_args.nOptions; i++) { delete vm_args.options[i].optionString; } delete vm_args.options;
cause itis not compatible with MinGW 4.
this leads us to the last thing, the sync error you get. which OS and compiler do you use? if you use MinGW 3 to compile JAI, and use spring from the buildbot (Which uses MinGW 4.2.1), this would explain the sync error.
we do not yet have a working description online of how to setup MinGW 4 on windows, to compile spring. on linux it is rather easy, to cross compile for windows (buildbot also cross-compiles on linux).
all these issues should vanish, once we have the new C AI interface working, as it should not matter anymore which compiler you use to compile JAI (or any other AI).
I was referring to the message commands to get the test AI to do something.
I am using MinGW 5.1.4 and, I also built Spring with it as well. Obviously. That could be a problem. I guess I should use MinGW 4.2.1. Were did you get the info on the auto build version. That should be on both build pages.
I usually only write Java now days, and I had steered away from MinGW and SCONS for a long time. I couldn't resist a Java AI link into Spring. Well anyways I used this for the build:
Vista and gcc version 3.4.5 (mingw-vista special r3)
Well you didn't say anything about the licensing. So I can't do anything until it is in SVN or a license file saying it is open.
The auto build of spring uses 4.2.1, there is no auto build of JAI, but my release was compiled with 3.4.5. So far, i always tested JAI with 3.4.5 (i also compiled spring with that) -> i did the same like you. if you compile JAI and spring with the same MinGW/gcc, it should not get sync errors.
About the licence: Sorry, am new to open source and did forget/not care about that so far. I though i would not put a licence until it is well usable, and then i would integrate it into spring main SVN. I could setup a project page with SVN, but i would prefer to port it to the C interface before doing big changes. i also don't really recommend doing an AI with it already, as it may change some after the port.
for small things: you can send them to me (by PM) also. is it ok like this? or any other suggestion?
When you get headers that have license info or a license file I could contribute. Until then I will wait. Getting it into the SVN would speed up the development.
Not yet, but i started working on the Java interface wrapper of the C interface a few days ago. As soon as I have something at least remotely testable, i will put it on SVN with a NullJavaAI for testing. I hope this to happen in the upcomming week. The first test will be witout callback (as this will be a lot of work to wrap).
I hope some of you will help with testing. if you are mainly interested in the Java interface, you may want to have a look at NullOOJavaAI (NullJavaAI will not be interesting for you). please do not start writing your AI yet, but give feedback about the interface in general:
the (class-)structure of/behind OOAICallback: what would you change, how, and why?
is this way of handling AIEvents ok? (AI Events are messages from the engine to the AI)
... what about AICommands? (messages from AI to engine that alter the engines state (in contrary to the methods reachable through OOAICallback))
ask here for help, if something is not working.
Last edited by hoijui on 10 Dec 2008, 16:55, edited 1 time in total.
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