Page 79 of 95
Posted: 11 Nov 2007, 15:40
by AF
A single line of a log only goes so far in explaining things, what do the surrounding lines say?
Is this for all units or have you only tried the commander?
The next commit adds more logging messages which should help, however they're unlikely to ever be the last line in the log, so Ill need more information.
If you build things yourself does it use them? Is building and construction the only thing that won't work?
Posted: 17 Nov 2007, 22:36
by AF
A little digging with a debugger turned up some alarming flaws, such as wind turbine with a unitdata object saying it was a zepellin lvl 2 transport, and a radar tower claiming it was the 'enterprise'.
So I'm removing all the shared_ptr and weak_ptr crap from the CUnitData stuff for now, which is a big refactor in terms fo copy pste delete work but not as big as it was to setup in the first place.
Posted: 18 Nov 2007, 00:45
by AF
refactor comleted, also fixed a crashbug.
My NTai now builds mexes metalmakers solars llts and radar towers on comet catcher. I dunno why its not building factories though.
Posted: 19 Nov 2007, 02:40
by AF
My build has started making vehicle plants and stuff again. It sent out instigators and stuff and built minelayers as the config said.
btw IK your config needs to remove the arm and core commanders from the lists of attackers as it totally foobars NTai when 2 instigators and a commander walk across comet catcher 2 mins in.
Posted: 19 Nov 2007, 21:41
by DJ
I get crashes really early on in the game. Always the last line in the log file is:-
Code: Select all
[02:28]|20:40:1| < Frame: 4458 ><0>function :: CManufacturer::WipePlansForBuilder
although obv not the same frame time.
Posted: 19 Nov 2007, 22:23
by AF
hmmm, if you can compile and run NTai, how come you can't debug at the same time?
Anyways I don't have a clue what that is unless its an issue with a null CUnitTypeData object. You'll just have to hope I run into it myself while testing newer revisions.
btw whats the status on the lag spikes? Have the latest builds improved, gotten worse, or stayed the same?
Posted: 19 Nov 2007, 22:56
by DJ
I build NTai using Net Beans, debugging is never gunna happen.
I can't test the status of lag spikes as there hasn't been a build that plays long enough to lag since september, this is the build I use to work on my config which is pretty damn good now. Problem is the other builds play slightly differently and have improved attacking etc so there's no point releasing a config till a new build proves to be reliable.
I reckon any config will get this crash bug if you test for more than five minutes at a time. I'll try make a simple core one so you can run it through your debugger.
Posted: 19 Nov 2007, 23:18
by AF
netbeans?! Are you in linux/mac?
Built SVN NTai
Posted: 20 Nov 2007, 04:43
by waveclaw
On my opnSuSE Linux 10.3 x86_64 system I used gcc to compile a libntai.so using the SVN trunk of Spring and some work.
Several files were missing in the trunk so I had to get them from an older tag (taspring_0.72b1). In particular, /AI/Global/NTAI/Agents/ was missing
- Assigner.cpp and .h
Factor.cpp and .h
Scooter.cpp and .h
which without the library won't compile.
Also, I had to hand edit the Makefile-Imp.mk and the Makefile-Release.mk in /AI/Global/NTAI/nbproject/. Makefile-Imp.mk needed to be changed to write a libntai.so file instead of NTai.dll file. I added flags and changed the options such that:
Code: Select all
CXXFLAGS=-fPIC
LDLIBSOPTIONS=-L/usr/lib64
and altered the Build targets to match the libntai.so that was being built. There was a lot of junk references to mingw includes that, while harmless, probably could have been pruned.
For the time being you can get an file of my work at my website (note that my account here is not old enough to post URLs - longtime reader, firsttime poster.). Note that the port number on that server is subject to change.
Now I can at least start the Spring Kernel Panic mod on linux using custom mod script that references /usr/lib64/spring/AI/Bot-libs/libntai.so instead of AI/Bot-libs/NTai.dll.
Posted: 20 Nov 2007, 14:04
by DJ
netbeans?! Are you in linux/mac?
nope, but visual studio just wouldn't work for NTai debugging for some reason and I never spent the time to look into why. I know the square root of fuck all about C++ development remember and don't have time to learn.
Posted: 20 Nov 2007, 16:26
by AF
With vs2005 both spring and ntai need to be compiled with the same debugging data. Compiling with the same headers isnt enough.
For spring you'll need the vclibs package in your source folder and the directx sdk installed.
Then you can debug NTai by telling it in project properties to execute the spring.exe you built, and then setting the working directory to that folder. aka /trunk/game/.
As for the ancient NTai compilation:
Factor.cpp/h was replaced by the CManufacturer class about a year and a half ago. The file remained in the svn for reference however the linux compilation doesnt know this and tries to compile it anyway. You should remove all references to factor.h/cpp.
However you're also complaining about scouter.h/cpp and assigner.h/cpp whcih were only removed in the last 3 weeks. Whatever your doing thats managed to muddle all these up, your headed for a horrific disaster.
The ancient svn source code your trying to use is not compatible with the new post july 10th source code. For one, entire systems where torn out and replaced, new systems added and so on. For example the command caching class, the task and behaviour systems that replaced CManufacturer which in turn replaced Factor.
Basically your trying to retrofit Word 2007 with word for windows 2.0 code. It just wont work.
Then there're incompatibilities in the engine API since unitdef has changed sicne then and some variables don't exist any more, and some callbacks have changed too.
Also kernel panic should not be runnable using the old NTai. Anything prior to me adding NTai on july 10th 2007 is unsupported and I can guarantee will not work without a lot of effort. And when it does compile it will be buggy and unstable, and will not follow the configs to the letter. That's supposing you manage to write a new config using the older format. That code pre-dates toolkit and the new config format so you'll need to move your tasklists into individual textfiles. That and there'll be no support for placing geothermals etc so kernel panic will simply not work at all.
Posted: 21 Nov 2007, 23:52
by AF
I've updated svn a little, and while I was typing the first 5 words of this post my debugger threw up a crashbug I've just fixed. I believe there's another crashbug but I couldnt debug it because by then it was too far in so there's an assertion in that svn commit which should catch it.
Also my debug build of NTai grinds to a halt when units fire at each other. So I've removed some code from there that isnt terribly important.
Both solo and singlebuild are now moved into the CUnitTypeData class.
Posted: 22 Nov 2007, 01:10
by AF
reminder to self:
move dgunning into a behaviour class as a finite state machine so that it reduces the number of move commands spammed.
Posted: 22 Nov 2007, 13:48
by 1v0ry_k1ng
I saw NTAI sucsessfuly dgun a hawk flying a direct beeline at its com the other day
got a latest working version? Im in a configging kinda mood
Posted: 22 Nov 2007, 15:47
by AF
I don't have mignw32 installed on any of my computers atm so you're out of luck.
I have also developed a theory on a possible slowdown cause. NTai could be sending too many commands whcih then cause springs simulation code to get overloaded. One example of this being the dgunning code which is doing more work and checks, resulting in too many commands. Imagine making a decision then remakign the decision every second needlessly.
Anyways running through the debugger I took a look at the order caching system and saw lots of commands queued for the same units.
btw I thought I told NTai not to dgun aircraft... Must be an older build.
Posted: 22 Nov 2007, 15:55
by DJ
I'll build this version and release it if you want, will have to wait till i get home though...
Posted: 22 Nov 2007, 19:02
by DJ
OK this build just builds a mex then does nothing with my config. Think something is amiss. Easy to reproduce though

Posted: 25 Nov 2007, 01:32
by smartie
Do you think you could look at ntai for nota? It seems to have a problem with attacking. It builds everything like it should, and con units go out to build mexes, but all of the fighting units just sortof sit around at the home base. Is there any way you can make it so it's more aggressive, or sends guys out to try defending its metal spots. I don't think it's completely broken. I did manage to some piss it off somehow one game when i was raiding the outskirts of its base and it ended up attacking me in force. \
I was using a custom build but this one should be simular enough.
http://www.unknown-files.net/spring/329 ... _NTAI_V03/
I believe that config is only for arm BTW
Build was 9.79B
Posted: 25 Nov 2007, 02:03
by AF
tbh as soon as I move to a new version the old one goes out the window. I need to know if the issue still applies to the very latest version in svn to be able to use it, which isn't really possible at the moment.
Posted: 25 Nov 2007, 03:02
by smartie
you can't try it in 75b2? I don't think it's a bug in the spring engine or anything like that it seems like it's definately an ai thing.