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

Re: strange ncdump error in 3.6.1



Hi John,

> I've been playing with the 3.6.1 release and have run into a strange error 
> with the ncdump utility.  The attachment is a CDL file, "fails.cdl", that 
> has been cut down as far as I can and still get the error.  Anyway, if one 
> generates a netcdf file as so...
>
>       ncgen -o test.nc fails.cdl
>
> ... a subsequent ncdump will result in the error message 
>
>       ncdump: v1hpg.c:617: v1h_get_NC_attrV: Assertion `gsp->extent % 4 == 0' 
> failed.
>       Aborted

Thanks for reporting this and isolating a test case that demonstrated
the bug.  Ed Hartnett dug into this and diagnosed it.  I've appended a
proposed one-line modification to the file libsrc/v1hpg.c that looks
like it fixes the bug, according to the new test that Ed constructed.
If it's convenient, I'd appreciate it if you could make this change,
rebuild the library, and test against the original files that led you
to notice the bug.  We'll be issuing a new release containing this fix
soon unless we find other problems with it or you report it doesn't
work.

--Russ

$ cvs diff -r 1.63 v1hpg.c
Index: v1hpg.c
===================================================================
RCS file: /upc/share/CVS/netcdf-3/libsrc/v1hpg.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -r1.63 -r1.64
5c5
< /* $Id: v1hpg.c,v 1.63 2006/01/03 04:59:28 russ Exp $ */
---
> /* $Id: v1hpg.c,v 1.64 2006/03/19 21:20:28 russ Exp $ */
1309c1309
<                               extent = filesize;
---
>                               extent = _RNDUP(filesize, X_ALIGN);