NTai XE10.1b - Page 84

NTai XE10.1b

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

Moderators: hoijui, Moderators

User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: NTai XE9.8 experimental for 0.76b1

Post by AF »

hmm that assertion is there because you should never call GetNextTask if there are no tasks left, and I cant find any calls not already encased in a HasTasks() if statement, is there any way of getting a stack trace?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: NTai XE9.8 experimental for 0.76b1

Post by hoijui »

hpw is it with NTai AF? is the code in spring trunk your latest?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: NTai XE9.8 experimental for 0.76b1

Post by AF »

It seems so. That code would crash the next line if there were no assertion anyway
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Re: NTai XE9.8 experimental for 0.76b1

Post by DJ »

it seems to be as soon as the first unit is destroyed, although that's from obsvervation, i only have the stack trace from info log which i imagine won't work with the stack trace translator for AI's. None the less:-

Code: Select all

[   9189] (0) D:\spring0_77b2\Spring\AI\Bot-libs\NTai.dll [0x6B699ACF]
[   9189] (1) D:\spring0_77b2\Spring\AI\Bot-libs\NTai.dll [0x6B7678B0]
[   9189] (2) D:\spring0_77b2\Spring\AI\Bot-libs\NTai.dll [0x6B6A6C14]
[   9189] (3) D:\spring0_77b2\Spring\AI\Bot-libs\NTai.dll [0x6B6849C1]
[   9189] (4) D:\spring0_77b2\Spring\spring.exe [0x007D26FF]
[   9189] (5) D:\spring0_77b2\Spring\spring.exe [0x0081F1D7]
[   9189] (6) D:\spring0_77b2\Spring\spring.exe [0x0084B27C]
[   9189] (7) D:\spring0_77b2\Spring\spring.exe [0x0085059D]
[   9189] (8) D:\spring0_77b2\Spring\spring.exe [0x005B9C7B]
[   9189] (9) D:\spring0_77b2\Spring\spring.exe [0x005C5FC8]
[   9189] (10) D:\spring0_77b2\Spring\spring.exe [0x005B8B6D]
[   9189] (11) D:\spring0_77b2\Spring\spring.exe [0x005B8D69]
[   9189] (12) D:\spring0_77b2\Spring\spring.exe [0x00A32C01]
[   9189] (13) D:\spring0_77b2\Spring\spring.exe [0x004010A7]
[   9189] (14) D:\spring0_77b2\Spring\spring.exe [0x00401123]
[   9189] (15) C:\WINDOWS\system32\kernel32.dll(RegisterWaitForInputIdle+0x49) [0x7C816FD7]
-- edit --

Tested a further three times, its definitely when a unit gets destroyed. in each test an assault unit was destroyed and the crash occured

i'd guess it was this remove tasks call in the unit destroyed handler causing the problem.

Code: Select all

G->RemoveHandler(currentTask);
taskManager->RemoveAllTasks();
G->RemoveHandler(taskManager);
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: NTai XE9.8 experimental for 0.76b1

Post by AF »

Indeed I don't know how to use that stack trace I need function/method names.

The fact it does it for assault units though is curious I'll have to look into it.
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Re: NTai XE9.8 experimental for 0.76b1

Post by DJ »

any joy finding this problem?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: NTai XE9.8 experimental for 0.76b1

Post by AF »

remove the assertion, and instead change it to an if statement. If there are no tasks then return a shared_ptr to 0 or null and check for this in the CUnit.cpp file. This will not fix the issue but it should prevent the crash and allow NTai to carry on running. More of a hack around than a bugfix
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Re: NTai XE9.8 experimental for 0.76b1

Post by DJ »

had a bit of time today so i've installed a build environment and sorted this error. If anyone wants a binary just post here

Solobuild doesn't seem to work anymore which hampers NTai alot
chadj
Posts: 1
Joined: 15 Nov 2008, 20:12

Re: NTai XE9.8 experimental for 0.76b1

Post by chadj »

If anyone has a 0.77b5 build of NTAII.dll let me know, I'd like to get my hands on it!

-Chad Johnson

chad.j.johnson@gmail.com
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: NTai XE9.8 experimental for 0.76b1

Post by Satirik »

chadj wrote:If anyone has a 0.77b5 build of NTAII.dll let me know, I'd like to get my hands on it!

-Chad Johnson

chad.j.johnson@gmail.com
viewtopic.php?f=15&t=16503
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: NTai XE9.8 experimental for 0.76b1

Post by bibim »

Here is the BuildServ's build of NTai for 0.77b5. This binary has been built during the Spring 0.77b5 installer generation, so it should be possible to translate the stacktraces using the !translate command.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: NTai XE9.8 experimental for 0.76b1

Post by AF »

A: I did not commit a bug fix for the issue DJ had although I describe the necessary steps. I do not have any machines with an svn client and repo set up to apply the fix at the moment.
B: Satirik, please do not post in my threads, remember, you've been warned by moderators, and I have abided by the same rule that applies to you.
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Re: NTai XE9.8 experimental for 0.76b1

Post by DJ »

There are a number of problems with NTai at the moment.

1) A crash bug that occurs some 25 minutes into the game or so, I've tried building a version with logging enabled but it doesn't give any information at all on the crash location. This can only really be fixed with someone who has either a working debugging environment or alot of time to insert insane amounts of logging code.

2) NTai now seems to have a problem reading its config files from any class other than Global. I've confirmed this bug but i've yet to find a reason for it, doesn't help that I suck at C++

3) Singlebuild/Solobuild no longer work, now this could easily be linked to bug 2 but considering bugs 1 and 2 this isn't the major show stopper.

Without these bugs being fixed (by someone who knows what they're doing I might add) you can pretty much consider this AI dead.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: NTai XE9.8 experimental for 0.76b1

Post by hoijui »

i do have a working debug environment.
..well: spring set up to build in debug mode, plus i a debugger :D
if it is a simpe task, i could try ot find the location of the crashes, but i do not want to spend more then 30 mins on this.
if you give me the NTai config files plus other stuff i may need, plus some instructions, i may help.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: NTai XE9.8 experimental for 0.76b1

Post by AF »

hmm can you describe #2 but rephrase, I'm not quite sure what you mean, though my interpretation is that the config loading class only works when called from CGlobal which seems odd. I'll have to see what I can do tonight, but I will have to setup spring in visual studio and it will take a while as I have to sort out my svn and do a whole checkout and dependencies etc etc.

#3 can easily be attributed to #2 though.

Is #1 related to the issue which you reported the other day? I have yet to get around to applying a fix for that.



Hoijui, one thought that would eb very useful is that currently AIs only have the console to route messages through. If NTai has no configs because the user mistakenly thinks they only need a DLL I want a warning box to appear that says so very clearly, but chat console messages are ignored or they get pushed out of view by more messages....
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Re: NTai XE9.8 experimental for 0.76b1

Post by DJ »

AF I fixed the unit destroyed crash bug before I started testing the rest, this is a different problem.

#2 you're assumption as to what I mean by this is correct, to show it in code

Code: Select all

string sb = G->Get_mod_tdf()->SGetValueMSG("AI\\attackers");
gives an empty string. There is also a subtle problem that maybe linked to this; the config names that ntai creates have changed. The ba config is now BAXX.sd7.tdf whereas it used to be BA.tdf for all versions of BA....
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: NTai XE9.8 experimental for 0.76b1

Post by AF »

hmm how does this relate to the modinfo.tdf in the BA SDZ?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: NTai XE9.8 experimental for 0.76b1

Post by hoijui »

AF wrote:Hoijui, one thought that would eb very useful is that currently AIs only have the console to route messages through. If NTai has no configs because the user mistakenly thinks they only need a DLL I want a warning box to appear that says so very clearly, but chat console messages are ignored or they get pushed out of view by more messages....
in other words, you want a callback function like this:

Code: Select all

class IAICallback {
   void spwnErrorMessage(std::string title, std::string msg);
}
?
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Re: NTai XE9.8 experimental for 0.76b1

Post by DJ »

hmm how does this relate to the modinfo.tdf in the BA SDZ?
I don't think the modinfo is the deciding factor. I tested with BA 4.7 which is the exact same file i used in previous spring versions. Previously I got the BA.tdf file created as usual, in the latest version i get BA47.sd7.tdf

It's not a problem aside from each version needing a new config i just thought it might be related.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: NTai XE9.8 experimental for 0.76b1

Post by AF »

Some means of notifying the user and making them aware that things are seriously wrong. My thoughts are it would likely require a lua widget bundled with spring.

So basically its using <archivename>.tdf ? On the offchance, is it using a modinfo.tdf or a modinfo.lua?
Post Reply

Return to “AI”