Hello all,

On stress-testing the Risk ruleset (that's what bots are for, right?),
the server segfaults when adding lots (like, 3 or something) of
colonization orders. This is reproducible. I have a core file, the
backtrace is

#0  0x080db9a9 in boost::shared_ptr<ObjectInfoData>::operator-> (this=0x14)
    at /usr/include/boost/shared_ptr.hpp:315
#1  0x080da9c1 in IGObject::getName (this=0x0) at object.cpp:74
#2  0xb781093d in RiskRuleset::Colonize::getTopPlayerAndBid (this=0x81ba788,
    obj=0x81c71a0) at colonize.cpp:299
#3  0xb7810f6e in RiskRuleset::Colonize::doOrder (this=0x81ba788,
    obj=0x81a05d0) at colonize.cpp:158
#4  0xb781dc63 in RiskRuleset::RiskTurn::processOrdersOfGivenType (
    this=0x81824a8, [EMAIL PROTECTED]) at riskturn.cpp:270
#5  0xb781ec8e in RiskRuleset::RiskTurn::doTurn (this=0x81824a8)
    at riskturn.cpp:70
#6  0x080c941a in Game::doEndOfTurn (this=0x816aa20) at game.cpp:289
#7  0x081227fe in TurnTimer::timerFinished (this=0x81c6f58)
    at turntimer.cpp:183
#8  0x08123bad in TimerCallbackImpl<TurnTimer*, void (TurnTimer::*)()>::call (
    this=0x81baa88) at timercallback.h:54
#9  0x080d1754 in TimerCallback::call (this=0xbf831228) at timercallback.h:121
#10 0x080cf985 in Network::masterLoop (this=0x8160500) at net.cpp:266
#11 0x080c000d in main (argc=3, argv=0xbf8313f4) at main.cpp:135

The following daneel-ai file triggers it:
---------
[Modules]
basic
mod-risk

[Constraints]
myplanet(int,int)

[Rules]
whoami(Me) and owner(P,Me) \ planet(P) and armies(P,N) <=> myplanet(P,N)
planet(P) and owner(P,-1) ==> order_colonise(P,1)
myplanet(P,N) ==> print "Owning planet %i with %i troops" % (P,N)

[Functions]

---------
For clarity, the part between the ---'s should be put in a file and
ran as "daneel-ai -f <filename>". This essentially places a colonise
order on every neutral planet and prints out information about owned
planets. Let me know if you need more information.

Iwanowitch
_______________________________________________
tp-devel mailing list
[email protected]
http://www.thousandparsec.net/tp/mailman.php/listinfo/tp-devel

Reply via email to