Closed spriggyjeff closed 6 years ago
From the stack trace I can guess that it's calling an objc runtime function on RealmSwift.Object
which returns a string and is getting a null string when it's not expecting one, but there aren't really any hints about what the problematic thing is. We don't do any weird runtime things to RealmSwift.Object
, so I don't think it's our bug. Maybe they don't handle @objc(RealmSwiftObject)
making the obj-c name different from the Swift name correctly?
Facebook have assigned this to one of their teams. Thanks for the additional info!
This has been fixed in Facebook SDK 4.36.0.
Hey - looks like you forgot to add a T:* label - could you please add one?
Goals
Use both Realm and Facebook pods in my app.
Note: Probably not an issue with Realm, but posting here just in case.
Previous versions up to Facebook SDK 4.33 worked fine. As of Facebook SDK 4.35 things are broken. The problem is probably in Facebook's SDK and a bug has been filed here:
https://developers.facebook.com/support/bugs/1897743506960308/?disable_redirect=0
Expected Results
App does not crash.
Actual Results
Crash on startup in Facebook SDK: 2018-08-28 02:53:07.852242+1000 Facebook Crash Example[4086:1158284] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' +[NSString stringWithUTF8String:]: NULL cString' *** First throw call stack: (0x18391ed8c 0x182ad85ec 0x18391ec6c 0x1842580a0 0x104ac46c0 0x104ac4384 0x104ac4190 0x104ac4c40 0x104ac1134 0x182ada9f0 0x182adbb58 0x1055020c8 0x10551212c 0x1055111cc 0x105511288 0x105502498 0x1055070fc 0x10550121c) libc++abi.dylib: terminating with uncaught exception of type NSException
Facebook Crash Example was compiled with optimization - stepping may behave oddly; variables may not be available.
__pthread_kill + 8 frame #1: 0x000000018354a6a8 libsystem_pthread.dylib
pthread_kill$VARIANT$armv81 + 360 frame #2: 0x0000000183313d0c libsystem_c.dylibabort + 140 frame #3: 0x0000000182aaf2c8 libc++abi.dylib
abort_message + 132 frame #4: 0x0000000182aaf470 libc++abi.dylibdefault_terminate_handler() + 304 frame #5: 0x0000000182ad88d4 libobjc.A.dylib
_objc_terminate() + 124 frame #6: 0x0000000182ac937c libc++abi.dylibstd::__terminate(void (*)()) + 16 frame #7: 0x0000000182ac8ccc libc++abi.dylib
__cxa_throw + 132 frame #8: 0x0000000182ad8720 libobjc.A.dylibobjc_exception_throw + 364 frame #9: 0x000000018391ec6c CoreFoundation
+[NSException raise:format:] + 116 frame #10: 0x00000001842580a0 Foundation`+[NSString stringWithUTF8String:] + 92+[FBSDKCodelessIndexer getFunctionList:](self=<unavailable>, _cmd=<unavailable>, class=RealmSwiftObject) at FBSDKCodelessIndexer.m:544 [opt] frame #12: 0x0000000104ac4384 Facebook Crash Example
+[FBSDKCodelessIndexer getClassList](self=FBSDKCodelessIndexer, _cmd=+[FBSDKCodelessIndexer getFullAppIndexingInfo](self=<unavailable>, _cmd=<unavailable>) at FBSDKCodelessIndexer.m:486 [opt] frame #14: 0x0000000104ac4c40 Facebook Crash Example
-[FBSDKCodelessIndexer uploadFullAppInfo](self=0x00000001d0464740, _cmd=+[FBSDKDemoAppFunctionEventBindingHelper load](self=FBSDKDemoAppFunctionEventBindingHelper, _cmd=<unavailable>) at FBSDKDemoAppFunctionEventBindingHelper.m:163 [opt] frame #16: 0x0000000182ada9f0 libobjc.A.dylib
call_load_methods + 184 frame #17: 0x0000000182adbb58 libobjc.A.dylibload_images + 76 frame #18: 0x00000001055020c8 dyld
dyld::notifySingle(dyld_image_states, ImageLoader const, ImageLoader::InitializerTimingList) + 384 frame #19: 0x000000010551212c dyldImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 440 frame #20: 0x00000001055111cc dyld
ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 136 frame #21: 0x0000000105511288 dyldImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 84 frame #22: 0x0000000105502498 dyld
dyld::initializeMainExecutable() + 220 frame #23: 0x00000001055070fc dylddyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 6176 frame #24: 0x000000010550121c dyld
_dyld_start + 68Steps to Reproduce
Build and run the sample project.
Code Sample
https://github.com/spriggyjeff/facebook-crash-example
Version of Realm and Tooling