{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/1482","labels_url":"https://api.github.com/repos/realm/realm-java/issues/1482/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/1482/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/1482/events","html_url":"https://github.com/realm/realm-java/issues/1482","id":107321521,"number":1482,"title":"Was it deleted by another thead?","user":{"login":"slidenerd","id":5139030,"avatar_url":"https://avatars.githubusercontent.com/u/5139030?v=3","gravatar_id":"","url":"https://api.github.com/users/slidenerd","html_url":"https://github.com/slidenerd","followers_url":"https://api.github.com/users/slidenerd/followers","following_url":"https://api.github.com/users/slidenerd/following{/other_user}","gists_url":"https://api.github.com/users/slidenerd/gists{/gist_id}","starred_url":"https://api.github.com/users/slidenerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slidenerd/subscriptions","organizations_url":"https://api.github.com/users/slidenerd/orgs","repos_url":"https://api.github.com/users/slidenerd/repos","events_url":"https://api.github.com/users/slidenerd/events{/privacy}","received_events_url":"https://api.github.com/users/slidenerd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-java/labels/Help","name":"Help","color":"cc317c"},{"url":"https://api.github.com/repos/realm/realm-java/labels/Pending","name":"Pending","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-09-19T09:27:11Z","updated_at":"2015-09-23T19:33:48Z","closed_at":null,"body":"Hello guys, before making this post, I referred to  #1047 #1206 but did not find it helpful\r\n\r\nI have a JSON feed that looks like this\r\n\r\n![snap 2015-09-19 at 14 47 48](https://cloud.githubusercontent.com/assets/5139030/9975557/72b9e854-5edd-11e5-9253-ef78e153c2ac.png)\r\n\r\nMy model classes to fetch and store data from JSON with RealmObject look like this\r\nAdmin.java\r\n![snap 2015-09-19 at 14 50 35](https://cloud.githubusercontent.com/assets/5139030/9975595/c94bb764-5ede-11e5-8e71-2e7326b5d79a.png)\r\n\r\n\r\nPicture.java\r\n![snap 2015-09-19 at 14 51 30](https://cloud.githubusercontent.com/assets/5139030/9975572/f9bc22cc-5edd-11e5-979b-8b9e36f5f050.png)\r\n\r\nPictureData.java\r\n![snap 2015-09-19 at 14 52 33](https://cloud.githubusercontent.com/assets/5139030/9975574/154b8d84-5ede-11e5-933a-0ffd7416a059.png)\r\n\r\nthe first time my activity runs, I load it from JSON and store it in Realm, after rotation I try to get data from a Parcelable with the Parceler library but a subsequent time I am getting a crash that looks like this\r\n![testgif](https://cloud.githubusercontent.com/assets/5139030/9975591/85ca121a-5ede-11e5-849f-c3573e3e48b2.gif)\r\n\r\nI am not deleting anything any part of the admin data anywhere, however I get an exception stating null in my debug as shown above. Am I missing something? Thanks for your response in advance, I ll work in the meanwhile on my end to see if I can fix this\r\n\r\nThis is all the code I am using to store my JSON object that looks exactly like what you see in the 1st screenshot\r\npublic static void storeAdmin(Context context, Realm realm, JSONObject jsonObject) {\r\n        realm.beginTransaction();\r\n        realm.createOrUpdateObjectFromJson(Admin.class, jsonObject);\r\n        realm.commitTransaction();\r\n    }\r\n\r\nand this is how I load it from Realm\r\n![snap 2015-09-19 at 15 01 25](https://cloud.githubusercontent.com/assets/5139030/9975608/5b6bf17c-5edf-11e5-9989-2edf2c7a48d2.png)\r\n\r\nI do see the data after exporting the file to RealmBrowser\r\n![testgif](https://cloud.githubusercontent.com/assets/5139030/9975629/194d4452-5ee0-11e5-9e7d-5ae37c2dfe32.gif)\r\n\r\nUPDATE 1\r\nThe problem seems to be with the Picture class and its data, I commented out the whole part of having a picture, and there were no issues whatsoever\r\n\r\nUPDATE 2\r\nI think I have narrowed down the problem, parceler seems to load an invalid object, does this have something to do with Realm?\r\nPicture object is invalid when loading from Parceler, am I missing something?\r\n![snap 2015-09-19 at 21 02 28](https://cloud.githubusercontent.com/assets/5139030/9976920/d5b4c3f0-5f11-11e5-9403-b0befbd5617a.png)\r\n\r\nThis is how I save things prior to rotation\r\n![snap 2015-09-19 at 21 07 21](https://cloud.githubusercontent.com/assets/5139030/9976932/7963c79e-5f12-11e5-8350-45d9ed98e562.png)\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/142705956","html_url":"https://github.com/realm/realm-java/issues/1482#issuecomment-142705956","issue_url":"https://api.github.com/repos/realm/realm-java/issues/1482","id":142705956,"user":{"login":"cmelchior","id":406066,"avatar_url":"https://avatars.githubusercontent.com/u/406066?v=3","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T19:33:48Z","updated_at":"2015-09-23T19:33:48Z","body":"I don't think this is something that Parceler can fix. If all classes are annotated correctly Parceler is able to serialize the entire object graph just fine. The problem here is that even though the Bundle takes an Parcelable as argument, it doesn't actually turn it into a Parcel (Doing that will do a copy of all data from Realm, effectively creating a stand-alone copy). If that doesn't happen, the wrapper provided by Parceler still just reference the original object, which is scoped by the lifetime of the Realm instance. \r\n\r\nSo really it is a \"problem\" with the Bundle not turning the input into a Parcel. That is however totally understandable from a performance standpoint, when you think about it.\r\n\r\nIn any case, this is really a Realm problem and we need to provide better support for using Parcelable in general."}}