@Duino said:
I just meet a bug ghost in my code.That means if I try to find what happen inside,the code runs well.But if I don't, bugs happen.
It's not a ghost. It's a Heisenbug :)
How should I catch this bug ghost???
Simplify your program, do unit testing. and use a tool like Valgrind.