Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility between Facebook SDK 4.35.0 and Realm 3.7.6 #5895

Closed
spriggyjeff opened this issue Aug 27, 2018 · 4 comments
Closed

Incompatibility between Facebook SDK 4.35.0 and Realm 3.7.6 #5895

spriggyjeff opened this issue Aug 27, 2018 · 4 comments

Comments

@spriggyjeff
Copy link

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.

  • thread Column type rename #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001833a52e0 libsystem_kernel.dylib__pthread_kill + 8 frame #1: 0x000000018354a6a8 libsystem_pthread.dylibpthread_kill$VARIANT$armv81 + 360
    frame Support for 'float' and 'double' column types and a lot of other fixes #2: 0x0000000183313d0c libsystem_c.dylibabort + 140 frame #3: 0x0000000182aaf2c8 libc++abi.dylibabort_message + 132
    frame Explicit string size - Obj-C #4: 0x0000000182aaf470 libc++abi.dylibdefault_terminate_handler() + 304 frame #5: 0x0000000182ad88d4 libobjc.A.dylib_objc_terminate() + 124
    frame Tutorial (./examples/tutorial.m) ready for inspection and upload if found ok. #6: 0x0000000182ac937c libc++abi.dylibstd::__terminate(void (*)()) + 16 frame #7: 0x0000000182ac8ccc libc++abi.dylib__cxa_throw + 132
    frame Fix for memory leakage when typed tables are created in a group. #8: 0x0000000182ad8720 libobjc.A.dylibobjc_exception_throw + 364 frame #9: 0x000000018391ec6c CoreFoundation+[NSException raise:format:] + 116
    frame Adds new unit test for cursors. #10: 0x00000001842580a0 Foundation`+[NSString stringWithUTF8String:] + 92
    • frame Subtable assigment issue fixed. #11: 0x0000000104ac46c0 Facebook Crash Example+[FBSDKCodelessIndexer getFunctionList:](self=<unavailable>, _cmd=<unavailable>, class=RealmSwiftObject) at FBSDKCodelessIndexer.m:544 [opt] frame #12: 0x0000000104ac4384 Facebook Crash Example+[FBSDKCodelessIndexer getClassList](self=FBSDKCodelessIndexer, _cmd=) at FBSDKCodelessIndexer.m:509 [opt]
      frame addRow rename to addEmptyRow #13: 0x0000000104ac4190 Facebook Crash Example+[FBSDKCodelessIndexer getFullAppIndexingInfo](self=<unavailable>, _cmd=<unavailable>) at FBSDKCodelessIndexer.m:486 [opt] frame #14: 0x0000000104ac4c40 Facebook Crash Example-[FBSDKCodelessIndexer uploadFullAppInfo](self=0x00000001d0464740, _cmd=) at FBSDKCodelessIndexer.m:599 [opt]
      frame v.0.1.5 #15: 0x0000000104ac1134 Facebook Crash Example+[FBSDKDemoAppFunctionEventBindingHelper load](self=FBSDKDemoAppFunctionEventBindingHelper, _cmd=<unavailable>) at FBSDKDemoAppFunctionEventBindingHelper.m:163 [opt] frame #16: 0x0000000182ada9f0 libobjc.A.dylibcall_load_methods + 184
      frame Renaming optimize references. #17: 0x0000000182adbb58 libobjc.A.dylibload_images + 76 frame #18: 0x00000001055020c8 dylddyld::notifySingle(dyld_image_states, ImageLoader const*, ImageLoader::InitializerTimingList*) + 384
      frame Xcode project #19: 0x000000010551212c dyldImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 440 frame #20: 0x00000001055111cc dyldImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 136
      frame Check that $CONFIG_MK is writable. #21: 0x0000000105511288 dyldImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 84 frame #22: 0x0000000105502498 dylddyld::initializeMainExecutable() + 220
      frame Mini tutorial #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 + 68

Steps to Reproduce

Build and run the sample project.

Code Sample

https://github.com/spriggyjeff/facebook-crash-example

Version of Realm and Tooling

ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G65

/Applications/_Xcode_9.4.app/Contents/Developer
Xcode 9.4
Build version 9F1027a

/Users/jeff/homebrew/bin/pod
1.6.0.beta.1
Realm (3.7.6)
RealmSwift (3.7.6)

/bin/bash
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)

/Users/jeff/homebrew/bin/carthage
0.25.0
(not in use here)

/usr/bin/git
git version 2.15.1 (Apple Git-101)
@tgoyne
Copy link
Member

tgoyne commented Aug 28, 2018

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?

@spriggyjeff
Copy link
Author

Facebook have assigned this to one of their teams. Thanks for the additional info!

@spriggyjeff
Copy link
Author

This has been fixed in Facebook SDK 4.36.0.

@realm-probot
Copy link

realm-probot bot commented Sep 13, 2018

Hey - looks like you forgot to add a T:* label - could you please add one?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants