Re: Memory contents mysteriously changing
Mark wrote:
[..] Unfortunately, within the writesilo() method, the data in the
mesh object is being changed during the line that includes a call to
DBCreate(). I don't know why. Thanks for any insight.
Unfortunately I likely won't be able to provide much of insight, but
have you tried using a different library or simulate your SILO thing?
If you comment out all calls to the library (so that you don't even have
to link it in), does the corruption happen? If not, it's the library
and you need to look into getting a different one. If yes, then the
library has nothing to do with it and you need to start looking at other
places in your code.
Memory corruption is notoriously difficult to debug. It is quite
possible that when it happens, the execution already past the point
where the actual bug is. It can be a dangling pointer (you know what it
means, don't you?) or it can be that you're overshooting some dynamic
(or even automatic) arrays by just a bit (often writing into a single
element past the last one in the array is enough to corrupt the stack in
a way that won't show until too late).
I still would start by chucking the SILO library.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask