Variable not saving correct value

Hey Y’all.

I’m having an issue that I really don’t know how to debug. A working application started to throw a division by zero exception all of a sudden. After looking into it, I found that I had a const int being saved as 0 even though it was being assigned a non-zero integer.

You can see that Xcode is showing that the variable has a value of 0 but being assigned 5. This would make sense because I’m using that variable in the modulo operation that’s throwing the exception.

bool ofApp::isFlippingGravity() {

return ofGetFrameNum() % (GRAVITY_FLIPRATE_SECONDS * FRAME_RATE) == 0;


It should be noted that other variables are not being assigned the correct values but they aren’t throwing exceptions. Has anyone had seen this issue before?

High Sierra 10.13.6
Xcode 10.0
OpenFrameworks 0.10.0