We have been seeing problems in devices where global variables have either been sporadically set to 0 or a random value. These same values are periodically written to information memory to be saved in case of power loss. Here is the strange issue, the values are correct in information memory, but the globals that are supposed to hold the same value are not. It seems to happen relatively infrequently, but when it does it obviously causes a lot of problems. Here is some more information on the issue:
1. It seems that these globals get corrupted right after they are written to information flash.
2. It is possible that the program on the devices was compiled in debug mode instead of release mode.
So my question, is there any common issue that can cause globals to be unreliable like this? And are these issues more common in debug mode v.s. release mode? I can provide any other information about the program or memory usage.