kindly tell me that is it possible that i run a program at an intervel of 30 sec ,run for some time and give error which was previously not given ? thanks how to stop this
if my question is wrong kindly dont vote me down just tell me my intention is not to hurt any one nor ask 开发者_C百科stupid question as i really appreciate you guys thanks
Yes, it is possible for a program to work for a period of time and then fail.
Have you tried Valgrind?
Yes, it's possible. Just because your program appears to "work" doesn't mean that it does not have bugs.
There are many types of mistakes that you can make, especially when working with memory (pointers, arrays, and the like), that may sometimes silently work anyway, and at other times may completely crash. It's largely arbitrary, based on whatever values happen to be present in memory at the addresses that you are erroneously accessing.
Use a tool like Valgrind and/or GDB to debug these sorts of issues.
It's not specific enough to answer without more details. However, the best thing for you to do would be to use a debugger to run your program in so you can examine what it's doing when it dies, a problem occurs, or to just help you walk through it. GDB is a popular free debugger.
精彩评论