cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected changes on variables stored in model class.

Tuna Bicim
Associate II

Hello Everyone,

I am storing some variables in the model and access them from different screens. When the values are initialized they have the correct value however after a while they get random values that are outside the ranges that I store in them. I use a member function on both presenter to get the value from a get function on model. The corrupted values are quite large which makes me suspect the values get overwritten with different data.

I also setup breakpoints on the tick function inside model and the values are fine but it might be something else that makes the change after a while or on a screen change.

0693W000000VxNQQA0.png

1 ACCEPTED SOLUTION

Accepted Solutions
Tuna Bicim
Associate II

I figured out the problem. I was calling the function from the presenter on my view file on the constructor. When I moved the code after the setup screen it worked fine. I was probably trying read from an uninitialized or not updated presenter pointer.

View solution in original post

2 REPLIES 2
Tuna Bicim
Associate II

I figured out the problem. I was calling the function from the presenter on my view file on the constructor. When I moved the code after the setup screen it worked fine. I was probably trying read from an uninitialized or not updated presenter pointer.

Glad you solved it ! 🙂