This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>To: address@hidden >From: "Misha Krassovski" <address@hidden> >Subject: netCDF General - Segmentation fault >Organization: ORNL >Keywords: 200507132007.j6DK7Fwl022233, ncgen bug Hi Misha, > I ran in to the following problem and couldn't find any info about. > > I extract data from a database (mySQL based) and have to create a > netcdf file and make it available for download. Everything is done > though the web. I have no problem to extract data from the database > and form a cdl file (I use php). But when I try to generate nc file > using ncgen, then I recieve the following error: Segmentation fault. > > As an example of cdl files that I generate based on extracted data I > attach results.cdl file. In CDL, you need to use a separate declaration for each variable. It doesn't allow factoring out the type for a list of variables. So the declarations need to look like this: variables: int Station; int Month; int Day; int Year; int BottomDepth; int BottleNumber; int Cast; int Depth(Depth); etc. Nevertheless, ncgen shouldn't have gotten a segmentation fault when parsing the CDL you provided, but should have produced an error message instead. Thanks for reporting this bug in ncgen. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu