{"action":"created","issue":{"url":"https://api.github.com/repos/SilverIce/JContainers/issues/50","labels_url":"https://api.github.com/repos/SilverIce/JContainers/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/SilverIce/JContainers/issues/50/comments","events_url":"https://api.github.com/repos/SilverIce/JContainers/issues/50/events","html_url":"https://github.com/SilverIce/JContainers/issues/50","id":107610037,"number":50,"title":"Unloaded ObjectReferences return None with getForm, nextKey, etc","user":{"login":"Verteiron","id":4465019,"avatar_url":"https://avatars.githubusercontent.com/u/4465019?v=3","gravatar_id":"","url":"https://api.github.com/users/Verteiron","html_url":"https://github.com/Verteiron","followers_url":"https://api.github.com/users/Verteiron/followers","following_url":"https://api.github.com/users/Verteiron/following{/other_user}","gists_url":"https://api.github.com/users/Verteiron/gists{/gist_id}","starred_url":"https://api.github.com/users/Verteiron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Verteiron/subscriptions","organizations_url":"https://api.github.com/users/Verteiron/orgs","repos_url":"https://api.github.com/users/Verteiron/repos","events_url":"https://api.github.com/users/Verteiron/events{/privacy}","received_events_url":"https://api.github.com/users/Verteiron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-21T22:19:42Z","updated_at":"2015-09-21T23:05:17Z","closed_at":null,"body":"In the new Alpha release there are some serious issues when using ObjectReferences in FormMaps.\r\n\r\nTo reproduce FormMap glitches: \r\n 1. Create a JFormMap, add some ObjectReference keys to it.\r\n 2. Write JFormMap using writeToFile.\r\n 3. Start a new game, coc elsweyr from main menu.\r\n 4. Load up JFormMap using readFromFile.\r\n 5. Attempt to read data from the ObjectReference keys.\r\n\r\nJFormMap.nextKey() will return None. If the FormMap data is retrieved using AllValues, most of the keys will simply disappear, taking their associated data with them.\r\n\r\nTo reproduce GetForm glitches:\r\n 1. Create any JContainer object, add ObjectReference forms to it via JMap.SetForm or JArray.AddForm.\r\n 2. Write JContainer object using writeToFile.\r\n 3. Start a new game, coc elsweyr from main menu.\r\n 4. Load up object using readFromFile.\r\n 5. Attempt to read the ObjectReferences with GetForm.\r\n\r\nGetForm will return None, and the value for the key will be set to Null in the JContainer object.\r\n\r\n----\r\n\r\nIn previous releases (including the current 3.2.4) Form-related functions will return None for unloaded ObjectReferences, but the original object's data will not be altered; FormMaps retained their data (and could be iterated through with AllValues) and Form values remain unchanged.\r\n\r\nIf the ObjectReferences in question are loaded (player is in the cell with them, they are script properties, etc) then none of the above occurs and Get/SetForm perform as exactly as expected.\r\n\r\nIdeally it would be nice to be able to retrieve ObjectReference handles even if they're not loaded by the game yet. If this is impossible, the data still should not be lost when retrieval is attempted.\r\n\r\nEdit for clarity: these are not temp objects like those dropped by the player, these are permanent ObjectReferences like furniture and Containers, placed by the ESM or ESP file."},"comment":{"url":"https://api.github.com/repos/SilverIce/JContainers/issues/comments/142133646","html_url":"https://github.com/SilverIce/JContainers/issues/50#issuecomment-142133646","issue_url":"https://api.github.com/repos/SilverIce/JContainers/issues/50","id":142133646,"user":{"login":"Verteiron","id":4465019,"avatar_url":"https://avatars.githubusercontent.com/u/4465019?v=3","gravatar_id":"","url":"https://api.github.com/users/Verteiron","html_url":"https://github.com/Verteiron","followers_url":"https://api.github.com/users/Verteiron/followers","following_url":"https://api.github.com/users/Verteiron/following{/other_user}","gists_url":"https://api.github.com/users/Verteiron/gists{/gist_id}","starred_url":"https://api.github.com/users/Verteiron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Verteiron/subscriptions","organizations_url":"https://api.github.com/users/Verteiron/orgs","repos_url":"https://api.github.com/users/Verteiron/repos","events_url":"https://api.github.com/users/Verteiron/events{/privacy}","received_events_url":"https://api.github.com/users/Verteiron/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T23:05:17Z","updated_at":"2015-09-21T23:05:17Z","body":"I tried out the alpha to see if the new form handling would resolve the None issue from previous versions, but now JObjects that rely on unloaded ObjectRefs get their data deleted on access. Unfortunately that means my workaround for getting a complete list of the FormMap data (iterating through the FormMap with AllValues now) no longer works, either. :( "}}