NTai XE10.1b
Moderators: hoijui, Moderators
I've done some experimenting and with some much needed help from brain damage in the lobby I now have an svn client and a compiled svn folder with an debug build of NTai.so.
He also told me how to debug it but I havent been able to as the svn copy of spring doesn't list ntai in the starting menu and I have to sort out a lua error.
So I'm going to try it again only with 0.75b2 source and copy paste svn NTai into the current build and test it out
He also told me how to debug it but I havent been able to as the svn copy of spring doesn't list ntai in the starting menu and I have to sort out a lua error.
So I'm going to try it again only with 0.75b2 source and copy paste svn NTai into the current build and test it out
Progress!
First run with a stacktrace, not quite sure what the crash is saying, but progress nonetheless:
First run with a stacktrace, not quite sure what the crash is saying, but progress nonetheless:
Code: Select all
bool CUnit::LoadBehaviours(){
string d = G->Get_mod_tdf()->SGetValueDef("auto","AI\\behaviours\\"+ud->name);
vector<string> v;
CTokenizer<CIsComma>::Tokenize(v, d, CIsComma());
if(!v.empty()){
for(vector<string>::iterator vi = v.begin(); vi != v.end(); ++vi){
string s = *vi;
trim(s);
tolowercase(s);
if(s == "none"){
return true;
} else if(s == "metalmaker"){
boost::shared_ptr<IBehaviour> t = boost::shared_ptr<IBehaviour>(new CMetalMakerBehaviour(G, *me));
behaviours.push_back(t);
t->Init(t);
} else if(s == "attacker"){
boost::shared_ptr<IBehaviour> t = boost::shared_ptr<IBehaviour>(new CAttackBehaviour(G, *me));
behaviours.push_back(t);
t->Init(t);
} else if(s == "auto"){
if(G->UnitDefHelper->IsAttacker(ud)){
// THIS LINE BELOW CRASHPOINT
boost::shared_ptr<IBehaviour> t = boost::shared_ptr<IBehaviour>(new CAttackBehaviour(G, *me));
behaviours.push_back(t);
t->Init(t);
}
if(G->UnitDefHelper->IsMetalMaker(ud)||(G->UnitDefHelper->IsMex(ud) && ud->onoffable ) ){
boost::shared_ptr<IBehaviour> t = boost::shared_ptr<IBehaviour>(new CMetalMakerBehaviour(G, *me));
behaviours.push_back(t);
t->Init(t);
}
}
}
}
return true;
}
Code: Select all
#0 0x00002aaab188f5ae in boost::detail::atomic_increment (pw=0x484962)
at /usr/include/boost/detail/sp_counted_base_gcc_x86.hpp:66
#1 0x00002aaab188f629 in boost::detail::sp_counted_base::add_ref_copy (this=0x48495a)
at /usr/include/boost/detail/sp_counted_base_gcc_x86.hpp:133
#2 0x00002aaab188f70e in shared_count (this=0x7fff2f42aa98, r=@0x7fff2f42ad98)
at /usr/include/boost/detail/shared_count.hpp:170
#3 0x00002aaab188f8eb in shared_ptr (this=0x7fff2f42aa90)
at /usr/include/boost/shared_ptr.hpp:106
#4 0x00002aaab188c06c in CUnit::LoadBehaviours (this=0xb0a4740)
at AI/Global/NTai/AI/NTai/Units/CUnit.cpp:291
#5 0x00002aaab188e9a6 in CUnit::RecieveMessage (this=0xb0a4740, message=@0x7fff2f42ad20)
at AI/Global/NTai/AI/NTai/Units/CUnit.cpp:88
#6 0x00002aaab1919619 in Global::FireEvent (this=0x8ef78b0, message=@0x7fff2f42ad20)
at AI/Global/NTai/AI/NTai/Core/helper.cpp:1544
#7 0x00002aaab1927ec9 in Global::UnitFinished (this=0x8ef78b0, unit=2)
at AI/Global/NTai/AI/NTai/Core/helper.cpp:476
#8 0x00002aaab1918365 in CNTai::UnitFinished (this=0x18e30a0, unit=2)
at AI/Global/NTai/AI/NTai/Core/GlobalAI.cpp:113
#9 0x000000000057a647 in CGlobalAIHandler::UnitFinished (this=0x9acde00, unit=0xaf6e200)
at rts/ExternalAI/GlobalAIHandler.cpp:201
#10 0x00000000007dfcb5 in CUnit::FinishedBuilding (this=0xaf6e200)
at rts/Sim/Units/Unit.cpp:1699
#11 0x00000000007f1bc7 in CUnitLoader::LoadUnit (this=0xef4910, name=@0x7fff2f42b340,
pos=@0x7fff2f42b330, side=1, build=false, facing=0, builder=0x0)
at rts/Sim/Units/UnitLoader.cpp:321
#12 0x000000000079a688 in CGlobalAITestScript::Update (this=0xf51ce0)
at rts/Game/StartScripts/GlobalAITestScript.cpp:57
#13 0x00000000006d97a5 in CGame::SimFrame (this=0x1800f50) at rts/Game/Game.cpp:2322
#14 0x00000000006dff94 in CGame::ClientReadNet (this=0x1800f50) at rts/Game/Game.cpp:2734
#15 0x00000000006e426a in CGame::Update (this=0x1800f50) at rts/Game/Game.cpp:1776
#16 0x00000000006250f9 in SpringApp::Update (this=0x7fff2f42ba10) at rts/System/Main.cpp:838
#17 0x0000000000628e9c in SpringApp::Run (this=0x7fff2f42ba10, argc=1, argv=0x7fff2f42bb88)
at rts/System/Main.cpp:1023
#18 0x0000000000629024 in Run (argc=1, argv=0x7fff2f42bb88) at rts/System/Main.cpp:1083
#19 0x000000000062924d in main (argc=1, argv=0x7fff2f42bb88, envp=0x7fff2f42bb98)
at rts/System/Main.cpp:1136
got codeblocks working and I have this strange error =s anyone know anything that could help?
/usr/bin/ld: .objs/NTai/Agents/CManufacturer.o: relocation R_X86_64_32 against `vtable for SkyWrite' can not be used when making a shared object; recompile with -fPIC
.objs/NTai/Agents/CManufacturer.o: could not read symbols: Bad value
ahk I have a major flawed event system.
I sue Boost::hared_ptr<IModule> for everything. My main event loop iterates voer a set<boost::shared_ptr<IModule> > array firing events, clss are passed pointers to their boost::shared_ptr<IModule> objects in their Init() function so they can register themselves with the event manager. This in combination with various STL containers is leading to the objects beign deleted so when I call that shared_ptr the AI crashes as soon as any reference to the 'me' variable is made or any other object dependant stuff that would be deleted.
I'm currently removing the me reference and its passing to Init and changign vector containers to set cotnainers but I dunno what good that'll do beyond cleaning up.
I sue Boost::hared_ptr<IModule> for everything. My main event loop iterates voer a set<boost::shared_ptr<IModule> > array firing events, clss are passed pointers to their boost::shared_ptr<IModule> objects in their Init() function so they can register themselves with the event manager. This in combination with various STL containers is leading to the objects beign deleted so when I call that shared_ptr the AI crashes as soon as any reference to the 'me' variable is made or any other object dependant stuff that would be deleted.
I'm currently removing the me reference and its passing to Init and changign vector containers to set cotnainers but I dunno what good that'll do beyond cleaning up.
OK I built it, had to but the #include assigner.h back into include.h to make it build.
The mex bug is fixed but there is still a crash bug which occurs randomly. Haven't had it occur since I turned uber logging on so can't give more detail than that yet.
the build with logging enabled is available here

if anyone does get a crash then the last portion of the log may help
The mex bug is fixed but there is still a crash bug which occurs randomly. Haven't had it occur since I turned uber logging on so can't give more detail than that yet.
the build with logging enabled is available here

if anyone does get a crash then the last portion of the log may help
Last edited by DJ on 17 Oct 2007, 00:20, edited 1 time in total.