I'm currently debugging a method which among other things, adds items
to a list. However, every so often the list size gets set to zero
"midstream". I've taken care not to clear the list, and I've tested
for a bad alloc exception, but there is none. (I'd post the code, but
it would take a lot of space.)
Has anyone ever experienced this sort of error? Barring a problem with
VS .NET 2003 STL implementation, I'm starting to suspect stack
corruption.
Alternatively, I'd appreciate some guidance on how to watch the size
of the list and halt the debugger when it gets resized.
Thanks,
- Olumide
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.8
By creating the minimal example that demonstrate the problem, you are
likely to find the solution.
> Has anyone ever experienced this sort of error? Barring a problem with
> VS .NET 2003 STL implementation, I'm starting to suspect stack
> corruption.
>
This kind of problems are solvable with valgrind (if the stack
corruption is really the problem).
> Alternatively, I'd appreciate some guidance on how to watch the size
> of the list and halt the debugger when it gets resized.
Go step by step, and see when it change the size.
--
Bolje je ziveti sto godina kao bogatun, nego jedan dan kao siromah!
As far as I can see, valgrind has not been ported to Windows (nor do I
know of any free alternative for Windows either).