I have a variable int _width;
being set in a constructor of a class Stage
as follows:
Stage::Stage():_width(33), _height(23)
{
...
}
And later I am using it in a pathfinding method, where I call:
ex = fminf(_width - 1, current->x + 1);
which is just setting an end X point for something else. The problem is I get a Thread 1: EXC_BAD_ACCESS (code=1, address=0x8)
error. When I try to log it out with p _width
I get:
(lldb) p _width
error: Couldn't apply expression side effects : Couldn't dematerialize a result variable: couldn't read its memory
I'm not sure what's going on here. I'm not resetting the variable anywhere.