{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/3391","repository_url":"https://api.github.com/repos/realm/realm-cocoa","labels_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3391/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3391/comments","events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3391/events","html_url":"https://github.com/realm/realm-cocoa/issues/3391","id":144231534,"number":3391,"title":"EXC_BAD_ACCESS KERN_INVALID_ADDRESS for user updated from old schema to new sechama","user":{"login":"kokhong20","id":3205289,"avatar_url":"https://avatars.githubusercontent.com/u/3205289?v=3","gravatar_id":"","url":"https://api.github.com/users/kokhong20","html_url":"https://github.com/kokhong20","followers_url":"https://api.github.com/users/kokhong20/followers","following_url":"https://api.github.com/users/kokhong20/following{/other_user}","gists_url":"https://api.github.com/users/kokhong20/gists{/gist_id}","starred_url":"https://api.github.com/users/kokhong20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokhong20/subscriptions","organizations_url":"https://api.github.com/users/kokhong20/orgs","repos_url":"https://api.github.com/users/kokhong20/repos","events_url":"https://api.github.com/users/kokhong20/events{/privacy}","received_events_url":"https://api.github.com/users/kokhong20/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-cocoa/labels/T:Help","name":"T:Help","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"jpsim","id":474794,"avatar_url":"https://avatars.githubusercontent.com/u/474794?v=3","gravatar_id":"","url":"https://api.github.com/users/jpsim","html_url":"https://github.com/jpsim","followers_url":"https://api.github.com/users/jpsim/followers","following_url":"https://api.github.com/users/jpsim/following{/other_user}","gists_url":"https://api.github.com/users/jpsim/gists{/gist_id}","starred_url":"https://api.github.com/users/jpsim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpsim/subscriptions","organizations_url":"https://api.github.com/users/jpsim/orgs","repos_url":"https://api.github.com/users/jpsim/repos","events_url":"https://api.github.com/users/jpsim/events{/privacy}","received_events_url":"https://api.github.com/users/jpsim/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2016-03-29T11:14:15Z","updated_at":"2016-05-03T13:42:45Z","closed_at":"2016-05-03T13:42:45Z","body":"This morning i have release a new version to app store and **every** existing users who updated to the latest version facing this crash. \r\n\r\nInformation: \r\nXcode: 7.3\r\nRealm: 0.96.2\r\nPrevious schema version: 16.\r\n\r\nI have included the migration block as below. \r\n```\r\n RLMRealmConfiguration *config = [RLMRealmConfiguration defaultConfiguration];\r\n    config.schemaVersion = 17;\r\n    config.migrationBlock = ^(RLMMigration *migration, uint64_t oldSchemaVersion) {\r\n        if (oldSchemaVersion < 17) {\r\n//            self.isDatabaseVersionChanged = YES;\r\n        }\r\n```\r\n\r\nBelow is the Crashlytics report.\r\n```\r\n> Thread : Crashed: com.apple.main-thread\r\n> 0  libobjc.A.dylib                0x1800b9bdc objc_msgSend + 28\r\n> 1  Register                       0x1002b3960 -[RLMSchema setObjectSchema:] (RLMSchema.mm:100)\r\n> 2  Register                       0x1002b41b0 +[RLMSchema dynamicSchemaFromRealm:] (RLMSchema.mm:210)\r\n> 3  Register                       0x100247478 -[RLMMigration initWithRealm:key:error:] (RLMMigration.mm:62)\r\n> 4  Register                       0x1002a7d9c __31-[RLMRealm migrationBlock:key:]_block_invoke (RLMRealm.mm:465)\r\n> 5  Register                       0x100252ad0 std::__1::__function::__func<RLMUpdateRealmToSchemaVersion::$_0, std::__1::allocator<RLMUpdateRealmToSchemaVersion::$_0>, void (realm::Group*, std::__1::vector<realm::ObjectSchema, std::__1::allocator<realm::ObjectSchema> >&)>::operator()(realm::Group*&&, std::__1::vector<realm::ObjectSchema, std::__1::allocator<realm::ObjectSchema> >&) (RLMObjectStore.mm:164)\r\n> 6  Register                       0x100232310 std::__1::function<void (realm::Group*, std::__1::vector<realm::ObjectSchema, std::__1::allocator<realm::ObjectSchema> >&)>::operator()(realm::Group*, std::__1::vector<realm::ObjectSchema, std::__1::allocator<realm::ObjectSchema> >&) const (functional:1817)\r\n> 7  Register                       0x10022ecd4 realm::ObjectStore::update_realm_with_schema(realm::Group*, unsigned long long, std::__1::vector<realm::ObjectSchema, std::__1::allocator<realm::ObjectSchema> >&, std::__1::function<void (realm::Group*, std::__1::vector<realm::ObjectSchema, std::__1::allocator<realm::ObjectSchema> >&)>) (object_store.cpp:372)\r\n> 8  Register                       0x10024fdc8 RLMUpdateRealmToSchemaVersion (RLMObjectStore.mm:161)\r\n> 9  Register                       0x1002a7754 +[RLMRealm realmWithConfiguration:error:] (RLMRealm.mm:431)\r\n> 10 Register                       0x1002a6d38 +[RLMRealm defaultRealm] (RLMRealm.mm:306)\r\n> 11 Register                       0x100248b4c +[RLMObject objectsWithPredicate:] (RLMObject.mm:127)\r\n> 12 Register                       0x100248908 +[RLMObject objectsWhere:args:] (RLMObject.mm:113)\r\n> 13 Register                       0x100248884 +[RLMObject objectsWhere:] (RLMObject.mm:109)\r\n> 14 Register                       0x1000fc8e8 -[OFModelManager(Store) fetchAllStoresInContextThatBelongsToUser] (OFModelManager+Store.m:118)\r\n> 15 Register                       0x10010bc00 -[OFAppDelegate getRequest] (OFAppDelegate.m:162)\r\n> 16 Register                       0x10010d620 -[OFAppDelegate startFetch] (OFAppDelegate.m:430)\r\n> 17 Register                       0x10010c8bc -[OFAppDelegate application:didFinishLaunchingWithOptions:] (OFAppDelegate.m:290)\r\n> 18 UIKit                          0x1857a1704 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 400\r\n> 19 UIKit                          0x1859d0130 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2904\r\n> 20 UIKit                          0x1859d44b8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1672\r\n> 21 UIKit                          0x1859d15c0 -[UIApplication workspaceDidEndTransaction:] + 168\r\n> 22 FrontBoardServices             0x181fef790 -[FBSSerialQueue _performNext] + 184\r\n> 23 FrontBoardServices             0x181fefb10 -[FBSSerialQueue _performNextFromRunLoopSource] + 56\r\n> 24 CoreFoundation                 0x1809f0efc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24\r\n> 25 CoreFoundation                 0x1809f0990 __CFRunLoopDoSources0 + 540\r\n> 26 CoreFoundation                 0x1809ee690 __CFRunLoopRun + 724\r\n> 27 CoreFoundation                 0x18091d680 CFRunLoopRunSpecific + 384\r\n> 28 UIKit                          0x18579a580 -[UIApplication _run] + 460\r\n> 29 UIKit                          0x185794d90 UIApplicationMain + 204\r\n> 30 Register                       0x10013ce00 main (main.m:17)\r\n> 31 libdispatch.dylib              0x1804be8b8 (Missing)\r\n```\r\n\r\nDoes it has any issue regarding using the latest Xcode 7.3 to build and submit? Previously doesn't have these crashes. User need to delete app and reinstall to solve this issue. "},"comment":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments/216531046","html_url":"https://github.com/realm/realm-cocoa/issues/3391#issuecomment-216531046","issue_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3391","id":216531046,"user":{"login":"jpsim","id":474794,"avatar_url":"https://avatars.githubusercontent.com/u/474794?v=3","gravatar_id":"","url":"https://api.github.com/users/jpsim","html_url":"https://github.com/jpsim","followers_url":"https://api.github.com/users/jpsim/followers","following_url":"https://api.github.com/users/jpsim/following{/other_user}","gists_url":"https://api.github.com/users/jpsim/gists{/gist_id}","starred_url":"https://api.github.com/users/jpsim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpsim/subscriptions","organizations_url":"https://api.github.com/users/jpsim/orgs","repos_url":"https://api.github.com/users/jpsim/repos","events_url":"https://api.github.com/users/jpsim/events{/privacy}","received_events_url":"https://api.github.com/users/jpsim/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T13:42:45Z","updated_at":"2016-05-03T13:42:45Z","body":"Make sure to set `Weak References in Manual Retain Release` to `YES` in your Xcode project's configuration, and if you're still seeing this crash, we'll reopen this issue."}}