{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/4140","repository_url":"https://api.github.com/repos/realm/realm-cocoa","labels_url":"https://api.github.com/repos/realm/realm-cocoa/issues/4140/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/4140/comments","events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/4140/events","html_url":"https://github.com/realm/realm-cocoa/issues/4140","id":179415566,"number":4140,"title":"Some one can help me?","user":{"login":"bawn","id":7238866,"avatar_url":"https://avatars.githubusercontent.com/u/7238866?v=3","gravatar_id":"","url":"https://api.github.com/users/bawn","html_url":"https://github.com/bawn","followers_url":"https://api.github.com/users/bawn/followers","following_url":"https://api.github.com/users/bawn/following{/other_user}","gists_url":"https://api.github.com/users/bawn/gists{/gist_id}","starred_url":"https://api.github.com/users/bawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bawn/subscriptions","organizations_url":"https://api.github.com/users/bawn/orgs","repos_url":"https://api.github.com/users/bawn/repos","events_url":"https://api.github.com/users/bawn/events{/privacy}","received_events_url":"https://api.github.com/users/bawn/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":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-27T07:23:02Z","updated_at":"2016-10-05T03:20:20Z","closed_at":null,"body":"Thread Backtrace\r\n```\r\nApplication received signal SIGSEGV\r\n(null)\r\n((\r\n\t0   CoreFoundation                      0x00000001861ee54c <redacted> + 160\r\n\t1   libobjc.A.dylib                     0x00000001971c40e4 objc_exception_throw + 60\r\n\t2   CoreFoundation                      0x00000001861ee470 <redacted> + 0\r\n\t3   XXXX                           0x10079a5f0 _ZNK5realm6ColumnIdE7averageEmmmPm + 1441728\r\n\t4   libsystem_platform.dylib            0x00000001979f094c _sigtramp + 52\r\n\t5   UIKit                               0x000000018acd3030 <redacted> + 72\r\n\t6   UIKit                               0x000000018aa18684 <redacted> + 500\r\n\t7   UIKit                               0x000000018aace64c <redacted> + 300\r\n\t8   UIKit                               0x000000018acd3d38 <redacted> + 864\r\n\t9   UIKit                               0x000000018aad4834 <redacted> + 400\r\n\t10  UIKit                               0x000000018aad465c <redacted> + 44\r\n\t11  UIKit                               0x000000018a9f9944 <redacted> + 448\r\n\t12  Foundation                          0x000000018706a4e8 <redacted> + 92\r\n\t13  CoreFoundation                      0x00000001860cd378 CFRelease + 524\r\n\t14  CoreFoundation                      0x00000001860d9938 <redacted> + 152\r\n\t15  libobjc.A.dylib                     0x00000001971dd724 <redacted> + 564\r\n\t16  CoreFoundation                      0x00000001860d0f94 _CFAutoreleasePoolPop + 28\r\n\t17  CoreFoundation                      0x00000001861a439c <redacted> + 1500\r\n\t18  CoreFoundation                      0x00000001860d11f4 CFRunLoopRunSpecific + 396\r\n\t19  GraphicsServices                    0x000000018f4f36fc GSEventRunModal + 168\r\n\t20  UIKit                               0x000000018aa6210c UIApplicationMain + 1488\r\n\t21  XXXX                           0x1000c12bc XXXX + 791228\r\n\t22  libdyld.dylib                       0x0000000197842a08 <redacted> + 4\r\n)\r\n\r\ndSYM UUID: 7D4C852F-FCE7-38D0-9BA8-527803C018C4\r\nCPU Type: arm64\r\nSlide Address: 0x0000000100000000\r\nBinary Image: XXXX\r\nBase Address: 0x00000001000c8000\r\n```\r\n\r\n\r\nRealm version: 1.0.2 or 1.1.0\r\n\r\nXcode version: Xcode 8\r\n\r\niOS/OSX version: 8.x\r\n\r\nLanguage: Object-C\r\n\r\n\r\n\r\nErrors like `_ZNK5realm6ColumnIdE7averageEmmmPm` 99% occur in iOS 8.x, I tried to locate the error by parsing the dSYM file, but it does not work.\r\n\r\n\r\n```\r\n➜  Desktop dwarfdump --lookup 0x10079a5f0 --arch arm64 XXXX.app.dSYM\r\n----------------------------------------------------------------------\r\n File: XXXX.app.dSYM/Contents/Resources/DWARF/XXXX (arm64)\r\n----------------------------------------------------------------------\r\nLooking up address: 0x000000010079a5f0 in .debug_info... not found.\r\nLooking up address: 0x000000010079a5f0 in .debug_frame... not found.\r\n```\r\n\r\nThe only analysis of the problem is\r\n\r\n```\r\n➜  Desktop dwarfdump --lookup  0x1000c12bc --arch arm64 XXXX.app.dSYM\r\n----------------------------------------------------------------------\r\n File: XXXX.app.dSYM/Contents/Resources/DWARF/XXXX (arm64)\r\n----------------------------------------------------------------------\r\nLooking up address: 0x00000001000c12bc in .debug_info... found!\r\n\r\n0x0011006f: Compile Unit: length = 0x00000090  version = 0x0002  abbr_offset = 0x00000000  addr_size = 0x08  (next CU at 0x00110103)\r\n\r\n0x0011007a: TAG_compile_unit [106] *\r\n             AT_producer( \"Apple LLVM version 8.0.0 (clang-800.0.38)\" )\r\n             AT_language( DW_LANG_ObjC )\r\n             AT_name( \"/Users/huoqiu/Documents/Project/XXXX/XXXX/main.m\" )\r\n             AT_stmt_list( 0x00064323 )\r\n             AT_comp_dir( \"/Users/huoqiu/Documents/Project/XXXX\" )\r\n             AT_APPLE_optimized( 0x01 )\r\n             AT_APPLE_major_runtime_vers( 0x02 )\r\n             AT_low_pc( 0x00000001000c1264 )\r\n             AT_high_pc( 0x00000001000c12e4 )\r\n\r\n0x001100aa:     TAG_subprogram [211] *\r\n                 AT_low_pc( 0x00000001000c1264 )\r\n                 AT_high_pc( 0x00000001000c12e4 )\r\n                 AT_frame_base( reg29 )\r\n                 AT_name( \"main\" )\r\n                 AT_decl_file( \"/Users/huoqiu/Documents/Project/XXXX/XXXX/main.m\" )\r\n                 AT_decl_line( 12 )\r\n                 AT_prototyped( 0x01 )\r\n                 AT_type( {0x001100ea} ( int ) )\r\n                 AT_external( 0x01 )\r\n                 AT_APPLE_optimized( 0x01 )\r\nLine table dir : '/Users/huoqiu/Documents/Project/XXXX/XXXX'\r\nLine table file: 'main.m' line 14, column 16 with start address 0x00000001000c12a8\r\n```\r\n\r\nI would like to know about what kind of behavior is causing this error\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments/251572355","html_url":"https://github.com/realm/realm-cocoa/issues/4140#issuecomment-251572355","issue_url":"https://api.github.com/repos/realm/realm-cocoa/issues/4140","id":251572355,"user":{"login":"bawn","id":7238866,"avatar_url":"https://avatars.githubusercontent.com/u/7238866?v=3","gravatar_id":"","url":"https://api.github.com/users/bawn","html_url":"https://github.com/bawn","followers_url":"https://api.github.com/users/bawn/followers","following_url":"https://api.github.com/users/bawn/following{/other_user}","gists_url":"https://api.github.com/users/bawn/gists{/gist_id}","starred_url":"https://api.github.com/users/bawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bawn/subscriptions","organizations_url":"https://api.github.com/users/bawn/orgs","repos_url":"https://api.github.com/users/bawn/repos","events_url":"https://api.github.com/users/bawn/events{/privacy}","received_events_url":"https://api.github.com/users/bawn/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T03:20:20Z","updated_at":"2016-10-05T03:20:20Z","body":"@austinzheng \r\n\r\nI am sure that I did not open a Realm before opening a Realm. \r\n\r\nA reproduction case:  My friend downloaded our app from AppStore and then crashed as soon as it was opened first time, and this problem can't be sloved until she redownload it. In general this problem sometimes occurs when the App starts\r\n\r\nMy code:\r\n\r\n```\r\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\r\n    // do somethings\r\n    [HQRLMRealmConfiguration migrationNewVersion];\r\n    // do somethings\r\n}\r\n```\r\n\r\n\r\n```\r\n+ (void)migrationNewVersion{\r\n    \r\n    RLMRealmConfiguration *config = [HQRLMRealmConfiguration configDefaultRealm];\r\n    config.schemaVersion = 1;\r\n    \r\n    config.migrationBlock = ^(RLMMigration *migration, uint64_t oldSchemaVersion) {\r\n        if (oldSchemaVersion < 1) {\r\n            // no code\r\n        }\r\n    };\r\n    [RLMRealmConfiguration setDefaultConfiguration:config];\r\n    [RLMRealm defaultRealm];\r\n    \r\n}\r\n```\r\n\r\n```\r\n+ (RLMRealmConfiguration *)configDefaultRealm{\r\n    RLMRealmConfiguration *config = [RLMRealmConfiguration defaultConfiguration];\r\n    config.fileURL = [[[config.fileURL URLByDeletingLastPathComponent] URLByAppendingPathComponent:@\"default\"] URLByAppendingPathExtension:@\"realm\"];\r\n    \r\n    [RLMRealmConfiguration setDefaultConfiguration:config];\r\n    return config;\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"bawn"}}