Loading ...
Sorry, an error occurred while loading the content.

Re: Segmenation Fault errors after change to game.in file.

Expand Messages
  • Valeroth Kyarmentari
    Thank you a ton! That was extremely helpful. The problem was not with a unit like I initally suspected but with some regions. I had about a dozen regions
    Message 1 of 7 , Apr 14, 2004
    • 0 Attachment
      Thank you a ton! That was extremely helpful. The problem was not
      with a unit like I initally suspected but with some regions. I had
      about a dozen regions where I had improperly setup the entertainment
      and/or the wages max silver.

      Your cout command was extermely helpful in tracking them down. The
      problem was always with the region just after the one that was listed.

      Thanks again...

      --- In atlantisdev@yahoogroups.com, "starstrike99"
      <starstrike99@y...> wrote:
      > > void Game::PostProcessUnit(ARegion *r,Unit *u)
      > > {
      > > printf ("R is %d and U is %d\n",r,u);
      > > PostProcessUnitExtra(r, u);
      > > }
      >
      > > When I run the turn now it gives me all the normal stuff then
      > this...
      > >
      > > Post-Turn Processing...
      > > R is 168054032 and U is 168054408
      > > R is 168054032 and U is 168054976
      > > R is 168060896 and U is 168070472
      > > R is 168067968 and U is 168079288
      > > R is 168070896 and U is 168061704
      > > R is 168074400 and U is 168074920
      > > R is 168084752 and U is 168086648
      > > R is 168091504 and U is 168092040
      > > R is 168093024 and U is 168080968
      > > R is 168095144 and U is 168095664
      > > R is 168104016 and U is 168118688
      > > R is 168106864 and U is 168107624
      > > R is 168108048 and U is 168110032
      > > R is 168108048 and U is 168110624
      > > R is 168111864 and U is 168112624
      > > R is 168113864 and U is 168126272
      > > R is 168113864 and U is 168114360
      > > R is 168114784 and U is 168127104
      > > R is 168116504 and U is 168117024
      > > R is 168135568 and U is 168136216
      > > R is 168138936 and U is 168139456
      > > R is 168148640 and U is 168150344
      > > R is 168150864 and U is 168151384
      > > R is 168156872 and U is 168184512
      > > Segmentation fault (core dumped)
      > >
      > > Its the same numbers every time, so I'm trying to track it down
      in
      > > the game.in file and see if I just hit on the write one... But
      if
      > > anyone can tell me exactly with PostProcessTurn and
      PostProcessUnit
      > > do or give me any advice that would be appreciated. Or if I
      could
      > > figure out how to conver those numbers to something useful.
      >
      > I'm not a programmer either, but it looks to me like you're
      printing
      > the addresses of the pointers r, u (I've never used the printf
      > command, but that's what cout << would do). Try instead printing r-
      > >num and u->num, or r->xloc, r->yloc and r->zloc.
      >
      > eg cout << "region " << r->xloc << ", " << r->yloc << ", " << r-
      >zloc
      > << ", unit " << u->num << endl;
      >
      > That gives you a location to start looking.
      >
      > Bradley
    Your message has been successfully submitted and would be delivered to recipients shortly.