This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

General Programing Question

I'm experiencing a problem that some of you may have seen. I have an application that executes without any problems. If I comment out a sprintf() or a printf(), however, the code executes to a point and hangs. The point where it stops is not always the same after I reset. Once I uncomment the line everything works as it should.

What causes this? Is there a solution?

Thanks and thanks to all who helped on the previous question.

  • It is impossible to state a single possible cause and, therefore, a single possible solution.

    Clearly your system has a bug (or bugs), and the symptoms happen to be masked when the (s)printfs are in.
    It is impossible to be more specific than that without detailed analysis of your system.

    There could be many possible causes; eg:

    Timing: the time consumed by the (s)printfs slows things down sufficiently that the bugs do not manifest;

    Memory fault: the memory consumed by the (s)printfs happens to keep something critical out of some dodgy memory area so that the bugs do not manifest;

    etc, etc,...