1. According to the picture the state_var is unit16. so the value is not negative, just very big ( which is a bit strange)
2.Can you upload the project, so people can have a look.
3. You can using the creator 2.2, Can you change to creator 3 and does it still have the problem.- but you need to change to a different chip as psoc5 is not support under creator 3.
4. Did you tried to change the optimization and see that makes any difference.
If you think that the variable is affected by an interrupt, you can try to disable the interrupt before the operation and re-enable interupt again to check.
I found, that table was overwritten by few bytes, and there was state_var.
I also noticed that on line 190 and 191 which was covered by the pop up scrren
on line 190, it shows
"state_var_" -------- with a underscore
on line 191, it shows
"state_var " --------- with a space
The one on line 190 has a "_".
Are those two different variable?
Which one were you checking?