I ran into a problem that is so mysterious that I donโt even know how to formulate this question ... I canโt even post any piece of code.
I myself am developing a large project, starting from scratch. It almost frees up time, but I canโt get rid of some annoying mistake. My program writes an output file from time to time, and during this I get either:
- std :: string error out_of_range
- std :: string length_error
- just a lot of nonsense on the way out
It is worth noting that these errors appear very rarely and can never be reproduced even with the same input. Memcheck does not detect a memory violation, even in cases where errors have been previously noted. Cppcheck also does not complain. I use STL and pthreads intensively, but without the last error also occur.
I tried both the latest g ++ and icpc. I am running some version of Ubuntu, but I donโt think that is the reason.
I would be grateful for any help from you guys in how to solve such problems. Thanks in advance.
Julian
source share