{"action":"created","issue":{"url":"https://api.github.com/repos/Unidata/netcdf-c/issues/264","repository_url":"https://api.github.com/repos/Unidata/netcdf-c","labels_url":"https://api.github.com/repos/Unidata/netcdf-c/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/Unidata/netcdf-c/issues/264/comments","events_url":"https://api.github.com/repos/Unidata/netcdf-c/issues/264/events","html_url":"https://github.com/Unidata/netcdf-c/issues/264","id":154917789,"number":264,"title":"Recent 4.4.1-RC changes cause crashes reading HDF4 and HDF5 files","user":{"login":"czender","id":5597049,"avatar_url":"https://avatars.githubusercontent.com/u/5597049?v=3","gravatar_id":"","url":"https://api.github.com/users/czender","html_url":"https://github.com/czender","followers_url":"https://api.github.com/users/czender/followers","following_url":"https://api.github.com/users/czender/following{/other_user}","gists_url":"https://api.github.com/users/czender/gists{/gist_id}","starred_url":"https://api.github.com/users/czender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czender/subscriptions","organizations_url":"https://api.github.com/users/czender/orgs","repos_url":"https://api.github.com/users/czender/repos","events_url":"https://api.github.com/users/czender/events{/privacy}","received_events_url":"https://api.github.com/users/czender/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Unidata/netcdf-c/labels/status/under%20review","name":"status/under review","color":"bfdadc"},{"url":"https://api.github.com/repos/Unidata/netcdf-c/labels/type/bug","name":"type/bug","color":"f7c6c7"}],"state":"open","locked":false,"assignee":{"login":"WardF","id":4324946,"avatar_url":"https://avatars.githubusercontent.com/u/4324946?v=3","gravatar_id":"","url":"https://api.github.com/users/WardF","html_url":"https://github.com/WardF","followers_url":"https://api.github.com/users/WardF/followers","following_url":"https://api.github.com/users/WardF/following{/other_user}","gists_url":"https://api.github.com/users/WardF/gists{/gist_id}","starred_url":"https://api.github.com/users/WardF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WardF/subscriptions","organizations_url":"https://api.github.com/users/WardF/orgs","repos_url":"https://api.github.com/users/WardF/repos","events_url":"https://api.github.com/users/WardF/events{/privacy}","received_events_url":"https://api.github.com/users/WardF/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Unidata/netcdf-c/milestones/6","html_url":"https://github.com/Unidata/netcdf-c/milestones/4.4.1","labels_url":"https://api.github.com/repos/Unidata/netcdf-c/milestones/6/labels","id":1483340,"number":6,"title":"4.4.1","description":"Assuming that the next release of netcdf-c following `v4.4.0` will be `v4.4.1`.","creator":{"login":"WardF","id":4324946,"avatar_url":"https://avatars.githubusercontent.com/u/4324946?v=3","gravatar_id":"","url":"https://api.github.com/users/WardF","html_url":"https://github.com/WardF","followers_url":"https://api.github.com/users/WardF/followers","following_url":"https://api.github.com/users/WardF/following{/other_user}","gists_url":"https://api.github.com/users/WardF/gists{/gist_id}","starred_url":"https://api.github.com/users/WardF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WardF/subscriptions","organizations_url":"https://api.github.com/users/WardF/orgs","repos_url":"https://api.github.com/users/WardF/repos","events_url":"https://api.github.com/users/WardF/events{/privacy}","received_events_url":"https://api.github.com/users/WardF/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":24,"state":"open","created_at":"2016-01-04T20:09:44Z","updated_at":"2016-05-31T23:40:48Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2016-05-15T16:45:34Z","updated_at":"2016-06-01T17:30:47Z","closed_at":null,"body":"> Please provide as much of the following information as you can, as applicable to the issue being reported.  Naturally, not all information is relevant to every issue, but the more information we have to start, the better!\r\n\r\n### Environment Information\r\n\r\n> Feel free to skip this if the issue is related to documentation, a feature request, or general discussion.\r\n\r\n* What platform are you using? (please provide specific distribution/version in summary)\r\n  * [ X] Linux\r\n  * [ ] Windows\r\n  * [ X] OSX\r\n  * [ ] Other\r\n  * [ ] NA\r\n* 32 and/or 64 bit?\r\n  * [ ] 32-bit\r\n  * [ X] 64-bit\r\n* What build system are you using?\r\n  * [ X] autotools (`configure`)\r\n  * [ ] cmake\r\n* Can you provide a sample netCDF file or `C` code to recreate the issue?\r\n  * [ ] Yes (please attach to this issue, thank you!)\r\n  * [ X] No\r\n  * [ ] Not at this time\r\n\r\n### Summary of Issue\r\nRecent 4.4.1-RC crashes with HDF4, HDF5 files\r\n### Steps to reproduce the behavior\r\n\r\nFirst let me say that things work more or less as expected/intended with NCO and RC2 on netCDF4 files. Second, I have not updated the underlying HDF4/5 libraries. That said:\r\n\r\nNCO fails in nc_inq_varid() when reading HDF4 files. The failures seemed to be caused by changes to 4.4.1 development between 20160212 and 20160514 (i.e., things were working fine until I installed RC2).\r\n\r\nIt seems to happen on all HDF4 files, and results in\r\n\r\nzender@frazil:~/nco/data$ ncks -m hdf.hdf\r\nERROR: nco_inq_varid() reports requested variable \"date_int\" is not defined in file\r\nnco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_inq_varid()\r\nnco_err_exit(): ERROR Error code is -49. Translation into English with nc_strerror(-49) is \"NetCDF: Variable not found\"\r\nnco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)\r\n\r\nncdump does not seem to have any problems with HDF4 files (NCO ncks -m does lots of calls that ncdump does not do). \r\n\r\nAlso, the (lack of) an _NCProperties attribute in HDF5 files seems to cause unhappiness when opening such files. ncdump also has problems opening HDF5 files. here's what ncdump used to do (before 4.4.1-RC2) on small HDF5 test file:\r\n\r\nzender@grele:~$ ncdump -h /home/zender/data/hdf/tdset.h5\r\nnetcdf tdset {\r\ndimensions:\r\n\tphony_dim_0 = 10 ;\r\n\tphony_dim_1 = 20 ;\r\n\tphony_dim_2 = 30 ;\r\nvariables:\r\n\tint dset1(phony_dim_0, phony_dim_1) ;\r\n\tdouble dset2(phony_dim_2, phony_dim_1) ;\r\n}\r\n\r\nNow it gives this:\r\n\r\nzender@frazil:~/nco/data$ ncdump -h /home/zender/data/hdf/tdset.h5\r\nnetcdf tdset {\r\ndimensions:\r\n\tphony_dim_0 = 10 ;\r\n\tphony_dim_1 = 20 ;\r\n\tphony_dim_2 = 30 ;\r\nvariables:\r\nNetCDF: Invalid dimension ID or name\r\nLocation: file ncdump.c; line 1697\r\n\tint dset1(\r\n\r\nncks on the same file, with RC2, implicates _NCProperties code:\r\n\r\nzender@frazil:~/nco/data$ ncks -m /home/zender/data/hdf/tdset.h5\r\nHDF5-DIAG: Error detected in HDF5 (1.8.15-patch1) thread 0:\r\n  #000: ../../src/H5Adeprec.c line 243 in H5Aopen_name(): can't open attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Can't open object\r\n  #001: ../../src/H5Aint.c line 451 in H5A_open_by_name(): unable to load attribute info from object header\r\n    major: Attribute\r\n    minor: Unable to initialize object\r\n  #002: ../../src/H5Oattribute.c line 537 in H5O_attr_open_by_name(): can't locate attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Object not found\r\nHDF5-DIAG: Error detected in HDF5 (1.8.15-patch1) thread 0:\r\n  #000: ../../src/H5Adeprec.c line 243 in H5Aopen_name(): can't open attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Can't open object\r\n  #001: ../../src/H5Aint.c line 451 in H5A_open_by_name(): unable to load attribute info from object header\r\n    major: Attribute\r\n    minor: Unable to initialize object\r\n  #002: ../../src/H5Oattribute.c line 537 in H5O_attr_open_by_name(): can't locate attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Object not found\r\nHDF5-DIAG: Error detected in HDF5 (1.8.15-patch1) thread 0:\r\n  #000: ../../src/H5Adeprec.c line 243 in H5Aopen_name(): can't open attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Can't open object\r\n  #001: ../../src/H5Aint.c line 451 in H5A_open_by_name(): unable to load attribute info from object header\r\n    major: Attribute\r\n    minor: Unable to initialize object\r\n  #002: ../../src/H5Oattribute.c line 537 in H5O_attr_open_by_name(): can't locate attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Object not found\r\nHDF5-DIAG: Error detected in HDF5 (1.8.15-patch1) thread 0:\r\n  #000: ../../src/H5Adeprec.c line 243 in H5Aopen_name(): can't open attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Can't open object\r\n  #001: ../../src/H5Aint.c line 451 in H5A_open_by_name(): unable to load attribute info from object header\r\n    major: Attribute\r\n    minor: Unable to initialize object\r\n  #002: ../../src/H5Oattribute.c line 537 in H5O_attr_open_by_name(): can't locate attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Object not found\r\ndset1: type NC_INT, 2 dimensions, 0 attributes, compressed? no, chunked? no, packed? no\r\ndset1 size (RAM) = 10*20*sizeof(NC_INT) = 200*4 = 800 bytes\r\ndset1 dimension 0: phony_dim_0, size = 10 (Non-coordinate dimension)\r\ndset1 dimension 1: phony_dim_1, size = 20 (Non-coordinate dimension)\r\n\r\nHDF5-DIAG: Error detected in HDF5 (1.8.15-patch1) thread 0:\r\n  #000: ../../src/H5Adeprec.c line 243 in H5Aopen_name(): can't open attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Can't open object\r\n  #001: ../../src/H5Aint.c line 451 in H5A_open_by_name(): unable to load attribute info from object header\r\n    major: Attribute\r\n    minor: Unable to initialize object\r\n  #002: ../../src/H5Oattribute.c line 537 in H5O_attr_open_by_name(): can't locate attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Object not found\r\nHDF5-DIAG: Error detected in HDF5 (1.8.15-patch1) thread 0:\r\n  #000: ../../src/H5Adeprec.c line 243 in H5Aopen_name(): can't open attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Can't open object\r\n  #001: ../../src/H5Aint.c line 451 in H5A_open_by_name(): unable to load attribute info from object header\r\n    major: Attribute\r\n    minor: Unable to initialize object\r\n  #002: ../../src/H5Oattribute.c line 537 in H5O_attr_open_by_name(): can't locate attribute: '_NCProperties'\r\n    major: Attribute\r\n    minor: Object not found\r\ndset2: type NC_DOUBLE, 2 dimensions, 0 attributes, compressed? no, chunked? no, packed? no\r\ndset2 size (RAM) = 30*20*sizeof(NC_DOUBLE) = 600*8 = 4800 bytes\r\ndset2 dimension 0: phony_dim_2, size = 30 (Non-coordinate dimension)\r\ndset2 dimension 1: phony_dim_1, size = 20 (Non-coordinate dimension)\r\n"},"comment":{"url":"https://api.github.com/repos/Unidata/netcdf-c/issues/comments/223066440","html_url":"https://github.com/Unidata/netcdf-c/issues/264#issuecomment-223066440","issue_url":"https://api.github.com/repos/Unidata/netcdf-c/issues/264","id":223066440,"user":{"login":"czender","id":5597049,"avatar_url":"https://avatars.githubusercontent.com/u/5597049?v=3","gravatar_id":"","url":"https://api.github.com/users/czender","html_url":"https://github.com/czender","followers_url":"https://api.github.com/users/czender/followers","following_url":"https://api.github.com/users/czender/following{/other_user}","gists_url":"https://api.github.com/users/czender/gists{/gist_id}","starred_url":"https://api.github.com/users/czender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czender/subscriptions","organizations_url":"https://api.github.com/users/czender/orgs","repos_url":"https://api.github.com/users/czender/repos","events_url":"https://api.github.com/users/czender/events{/privacy}","received_events_url":"https://api.github.com/users/czender/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T17:30:47Z","updated_at":"2016-06-01T17:30:47Z","body":"same file hdf.hdf in following three examples.get it at\r\nhttp://dust.ess.uci.edu/tmp/hdf.hdf\r\nthis file contains many variables, including a variable named \"one\":\r\n\r\nNCO with pre-RC2 libnetcdf\r\n```\r\nzender@grele:~$ ncks -v one hdf.hdf\r\none: type NC_FLOAT, 0 dimensions, 1 attribute, compressed? no, chunked? no, packed? no\r\none size (RAM) = 1*sizeof(NC_FLOAT) = 1*4 = 4 bytes\r\none attribute 0: long_name, size = 3 NC_CHAR, value = one\r\n\r\none = 1 \r\n```\r\n\r\n NCO with RC2 libnetcdf\r\n```\r\nzender@frazil:~/nco/data$ ncks -v one hdf.hdf\r\nERROR: nco_inq_varid() reports requested variable \"one\" is not defined in file\r\nnco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_inq_varid()\r\nnco_err_exit(): ERROR Error code is -49. Translation into English with nc_strerror(-49) is \"NetCDF: Variable not found\"\r\nnco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)\r\n```\r\n ncdump with RC2 libnetcdf\r\n```\r\nzender@frazil:~/nco/data$ ncdump -v one hdf.hdf\r\nncdump: one: No such variable\r\n\r\n```"}}
{"actor":{"display_login":"czender"}}