Can you set a breakpoint in a public function that calls a static function? Then you can check the arguments and at least return the values. If the problem occurs only on the client’s site, and the tests of your device / integration do not show problems for the inputs that you expect from these functions, the problem is that these functions receive input data (or a sequence of inputs if the function is somehow restrained), you did not expect, which means that the actual problem may be outside the static functions that you are looking at.
If you already suspect that you know which static function contains this problem, and you know what data types you are calling, you can put a simple unit test function in the release build to check for a suspect error. Of course, this is complicated if this function directly controls, for example, a six-ton crane, in which case you may have to write two versions of this function, one with a layout for controlling the crane, and run tests on it.
Most likely, but not impossible, never rule out a compiler inconsistency between release and debug versions. We all love to think that compilers are infallible, including me, but everything happens. And I see in your answer to the track that providing the client with a debug build sometimes fixes the problems ...
Sam skuce
source share