{"action":"created","issue":{"url":"https://api.github.com/repos/HDFGroup/HDF.PInvoke/issues/133","repository_url":"https://api.github.com/repos/HDFGroup/HDF.PInvoke","labels_url":"https://api.github.com/repos/HDFGroup/HDF.PInvoke/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/HDFGroup/HDF.PInvoke/issues/133/comments","events_url":"https://api.github.com/repos/HDFGroup/HDF.PInvoke/issues/133/events","html_url":"https://github.com/HDFGroup/HDF.PInvoke/issues/133","id":295561963,"number":133,"title":"Error in new version 1.10.1 when reading a dataset of integers","user":{"login":"reyntjesr","id":1846197,"avatar_url":"https://avatars0.githubusercontent.com/u/1846197?v=4","gravatar_id":"","url":"https://api.github.com/users/reyntjesr","html_url":"https://github.com/reyntjesr","followers_url":"https://api.github.com/users/reyntjesr/followers","following_url":"https://api.github.com/users/reyntjesr/following{/other_user}","gists_url":"https://api.github.com/users/reyntjesr/gists{/gist_id}","starred_url":"https://api.github.com/users/reyntjesr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reyntjesr/subscriptions","organizations_url":"https://api.github.com/users/reyntjesr/orgs","repos_url":"https://api.github.com/users/reyntjesr/repos","events_url":"https://api.github.com/users/reyntjesr/events{/privacy}","received_events_url":"https://api.github.com/users/reyntjesr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"gheber","id":6687038,"avatar_url":"https://avatars1.githubusercontent.com/u/6687038?v=4","gravatar_id":"","url":"https://api.github.com/users/gheber","html_url":"https://github.com/gheber","followers_url":"https://api.github.com/users/gheber/followers","following_url":"https://api.github.com/users/gheber/following{/other_user}","gists_url":"https://api.github.com/users/gheber/gists{/gist_id}","starred_url":"https://api.github.com/users/gheber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gheber/subscriptions","organizations_url":"https://api.github.com/users/gheber/orgs","repos_url":"https://api.github.com/users/gheber/repos","events_url":"https://api.github.com/users/gheber/events{/privacy}","received_events_url":"https://api.github.com/users/gheber/received_events","type":"User","site_admin":false},"assignees":[{"login":"gheber","id":6687038,"avatar_url":"https://avatars1.githubusercontent.com/u/6687038?v=4","gravatar_id":"","url":"https://api.github.com/users/gheber","html_url":"https://github.com/gheber","followers_url":"https://api.github.com/users/gheber/followers","following_url":"https://api.github.com/users/gheber/following{/other_user}","gists_url":"https://api.github.com/users/gheber/gists{/gist_id}","starred_url":"https://api.github.com/users/gheber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gheber/subscriptions","organizations_url":"https://api.github.com/users/gheber/orgs","repos_url":"https://api.github.com/users/gheber/repos","events_url":"https://api.github.com/users/gheber/events{/privacy}","received_events_url":"https://api.github.com/users/gheber/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/HDFGroup/HDF.PInvoke/milestones/4","html_url":"https://github.com/HDFGroup/HDF.PInvoke/milestone/4","labels_url":"https://api.github.com/repos/HDFGroup/HDF.PInvoke/milestones/4/labels","id":3284429,"number":4,"title":"HDF.PInvoke 1.10.2","description":"Bring the updates from HDF5 1.10.2 to HDF.PInvoke.","creator":{"login":"gheber","id":6687038,"avatar_url":"https://avatars1.githubusercontent.com/u/6687038?v=4","gravatar_id":"","url":"https://api.github.com/users/gheber","html_url":"https://github.com/gheber","followers_url":"https://api.github.com/users/gheber/followers","following_url":"https://api.github.com/users/gheber/following{/other_user}","gists_url":"https://api.github.com/users/gheber/gists{/gist_id}","starred_url":"https://api.github.com/users/gheber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gheber/subscriptions","organizations_url":"https://api.github.com/users/gheber/orgs","repos_url":"https://api.github.com/users/gheber/repos","events_url":"https://api.github.com/users/gheber/events{/privacy}","received_events_url":"https://api.github.com/users/gheber/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":3,"state":"open","created_at":"2018-04-20T13:58:48Z","updated_at":"2018-04-26T07:33:46Z","due_on":"2018-04-30T07:00:00Z","closed_at":null},"comments":1,"created_at":"2018-02-08T15:47:52Z","updated_at":"2018-04-26T07:33:46Z","closed_at":"2018-04-26T07:33:46Z","author_association":"NONE","body":"I have this method that works in the 1.10.0.4 version but gives an error when I update to 1.10.1.\r\n\r\nThe method is:\r\n\r\n```\r\n        /// <summary>\r\n        /// Reads an n-dimensional dataset.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">Generic parameter strings or primitive type</typeparam>\r\n        /// <param name=\"groupId\">id of the group. Can also be a file Id</param>\r\n        /// <param name=\"name\">name of the dataset</param>\r\n        /// <returns>The n-dimensional dataset</returns>\r\n        public static Array ReadDatasetToArray<T>(hid_t groupId, string name) //where T : struct\r\n        {\r\n            var datatype = GetDatatype(typeof(T));\r\n\r\n\r\n            var datasetId = H5D.open(groupId, name);\r\n            var spaceId = H5D.get_space(datasetId);\r\n            int rank = H5S.get_simple_extent_ndims(spaceId);\r\n            long count = H5S.get_simple_extent_npoints(spaceId);\r\n            Array dset;\r\n            Type type = typeof(T);\r\n            if (rank >= 0 && count >= 0)\r\n            {\r\n                int rankChunk;\r\n                ulong[] maxDims = new ulong[rank];\r\n                ulong[] dims = new ulong[rank];\r\n                ulong[] chunkDims = new ulong[rank];\r\n                hid_t memId = H5S.get_simple_extent_dims(spaceId, dims, maxDims);\r\n                long[] lengths = dims.Select(d => Convert.ToInt64(d)).ToArray();\r\n                dset = Array.CreateInstance(type, lengths);\r\n                var typeId = H5D.get_type(datasetId);\r\n                var mem_type = H5T.copy(datatype);\r\n                if (datatype == H5T.C_S1)\r\n                    H5T.set_size(datatype, new IntPtr(2));\r\n\r\n                var propId = H5D.get_create_plist(datasetId);\r\n\r\n                if (H5D.layout_t.CHUNKED == H5P.get_layout(propId))\r\n                    rankChunk = H5P.get_chunk(propId, rank, chunkDims);\r\n\r\n                memId = H5S.create_simple(rank, dims, maxDims);\r\n                GCHandle hnd = GCHandle.Alloc(dset, GCHandleType.Pinned);\r\n                H5D.read(datasetId, datatype, memId, spaceId,\r\n                    H5P.DEFAULT, hnd.AddrOfPinnedObject());\r\n                hnd.Free();\r\n            }\r\n            else\r\n                dset = Array.CreateInstance(type, new long[1] { 0 });\r\n            H5D.close(datasetId);\r\n            H5S.close(spaceId);\r\n            return dset;\r\n\r\n        }\r\n```\r\nWhen I use the new 1.10.1 version I get an error at the line:\r\n`  if (H5D.layout_t.CHUNKED == H5P.get_layout(propId))`\r\nThe error says that H5P_CLS_ROOT_ID_g doesn't exist."},"comment":{"url":"https://api.github.com/repos/HDFGroup/HDF.PInvoke/issues/comments/384542867","html_url":"https://github.com/HDFGroup/HDF.PInvoke/issues/133#issuecomment-384542867","issue_url":"https://api.github.com/repos/HDFGroup/HDF.PInvoke/issues/133","id":384542867,"user":{"login":"reyntjesr","id":1846197,"avatar_url":"https://avatars0.githubusercontent.com/u/1846197?v=4","gravatar_id":"","url":"https://api.github.com/users/reyntjesr","html_url":"https://github.com/reyntjesr","followers_url":"https://api.github.com/users/reyntjesr/followers","following_url":"https://api.github.com/users/reyntjesr/following{/other_user}","gists_url":"https://api.github.com/users/reyntjesr/gists{/gist_id}","starred_url":"https://api.github.com/users/reyntjesr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reyntjesr/subscriptions","organizations_url":"https://api.github.com/users/reyntjesr/orgs","repos_url":"https://api.github.com/users/reyntjesr/repos","events_url":"https://api.github.com/users/reyntjesr/events{/privacy}","received_events_url":"https://api.github.com/users/reyntjesr/received_events","type":"User","site_admin":false},"created_at":"2018-04-26T07:33:46Z","updated_at":"2018-04-26T07:33:46Z","author_association":"NONE","body":"I tried it with the new 1.10.2 version and it seems to work. Maybe I had used the wrong hdf5.dll library but everything seems to work fine now."}}
{"actor":{"display_login":"reyntjesr"}}