{"action":"closed","issue":{"url":"https://api.github.com/repos/ibarysevich/FITtoGIT/issues/192","labels_url":"https://api.github.com/repos/ibarysevich/FITtoGIT/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/ibarysevich/FITtoGIT/issues/192/comments","events_url":"https://api.github.com/repos/ibarysevich/FITtoGIT/issues/192/events","html_url":"https://github.com/ibarysevich/FITtoGIT/issues/192","id":64874986,"number":192,"title":"Collector doesn't handle a slightly corrupted registry file","user":{"login":"ibarysevich","id":11526993,"avatar_url":"https://avatars.githubusercontent.com/u/11526993?v=3","gravatar_id":"","url":"https://api.github.com/users/ibarysevich","html_url":"https://github.com/ibarysevich","followers_url":"https://api.github.com/users/ibarysevich/followers","following_url":"https://api.github.com/users/ibarysevich/following{/other_user}","gists_url":"https://api.github.com/users/ibarysevich/gists{/gist_id}","starred_url":"https://api.github.com/users/ibarysevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibarysevich/subscriptions","organizations_url":"https://api.github.com/users/ibarysevich/orgs","repos_url":"https://api.github.com/users/ibarysevich/repos","events_url":"https://api.github.com/users/ibarysevich/events{/privacy}","received_events_url":"https://api.github.com/users/ibarysevich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ibarysevich/FITtoGIT/labels/prj:Collector","name":"prj:Collector","color":"ededed"},{"url":"https://api.github.com/repos/ibarysevich/FITtoGIT/labels/sev:3_high_workaround","name":"sev:3_high_workaround","color":"ededed"},{"url":"https://api.github.com/repos/ibarysevich/FITtoGIT/labels/type:bug","name":"type:bug","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-27T23:59:13Z","updated_at":"2015-03-28T01:05:11Z","closed_at":"2015-03-28T01:05:11Z","body":"Found in: 3.7.8; Date Entered: Nov 16 2011; Entered By: jhartley; [1]During a large configuration project we had two users configuring the same PCDG. It appears this caused a corrupted entry in the registry file that looked like this: /LocalCollector/ObjectAdapters/null.objectClass=ObjectAdapter /LocalCollector/ObjectAdapters/null.gateway=57F551E1-B373-4A57-B420-E4DD27F980E8  My guess is that one user did something to flush the registry just as another user was deleting a device or in the middle of adding an as-yet-unsaved device. So there was a null value for the device GUID.  When reading this back in the string null which is the registry node name is converted into a GUID without properly catching any formatting errors.  This causes a problem both in the UI which scans the registry in order to view the devices and upon restart which fails.  The workaround is to simply delete the null node entries. A better solution would be to catch the error log it and process the rest of the file. We might consider also actively deleting the node entries.   NOTE: I've discovered that even just reading the registry file might cause it to flush(). This could result in timing corruption even if somebody is logging in while someone else is saving the file. Should re-visit this seriously. [2]BTW the error on read-in for a bad registry entry is happening in ObjectAdapterManager.scanRegistry(). First it calls getObjectAdapterNodes() searching for all nodes with objectClass=ObjectAdapter. Then it loops through and calls Guid guid = new Guid(rn[i].getNodeName()) and doesn't catch the error when the string is an invalid GUID."}}