[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error 5010



Ben,

> I got an error #5010 from an nf_create call (clobber was set).
> In the original f90 application (running on ncar babyblue), 
> nf_strerror was apparently blank. But when I run a tiny program
> that just calls nf_strerror(5010) I get:
> 
> Error 5010 occurred.

There is apparently no "error 5010" associated with any system calls
on babyblue, and it's not a netCDF error, since it's positive.

I would guess the global errno variable is getting overwritten,
perhaps because you haven't provided enough space for the data you are
trying to read into a location in memory.  The netCDF library has no
way of checking whether the address you've given it to read data into
points to enough space to hold the data, and if it's too small, you
will end up clobbering other locations, including perhaps errno.

Some platforms have tools to detect such memory access violations,
e.g. the Runtime Checking (RTC) in dbx on Solaris.

--Russ