[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Swarm-Support] Segmentation Violation
From: |
Alex Olivas |
Subject: |
[Swarm-Support] Segmentation Violation |
Date: |
Mon, 25 Oct 2004 17:25:18 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 |
I modified bug slightly to "interact" with nearest neighbor bugs.
I would like for an individual bug's step to depend on the state
of the bugs around it. I defined a simple method called getRole,
- (int)getRole;
{
return role;
}
My code compiles just fine, but when I run it crashes in the
bug's step method at the line...
int neighborRole = [[world getObjectAtX: xPos+deltaX Y: yPos+deltaY]
getRole];
(I do check to see whether the cell is non-empty first)
I'm fairly new to swarm and am assuming I'm missing something obvious.
Any help would be greatly appreciated.
Thanks,
Alex.
- [Swarm-Support] Segmentation Violation,
Alex Olivas <=