Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by savantedroid · Dec 12, 2016 at 08:09 AM · iospluginfacebookxcodefont

Unity Facebook Plugin terminates app after login (iOS)

I am trying to login Facebook from my Unity3D project. I use my iPhone 6 to test it. Everything works well in the game but after login is done to facebook, the game cannot come to foreground again and it terminates. XCode brings below code to screen. The part UIApplicationMain(argc... is marked and it says 'thread 1: signal SIGABRT'

Please help I spent hours but could not spot the problem.

  // Hack to work around iOS SDK 4.3 linker problem
 // we need at least one __TEXT, __const section entry in main application .o files
 // to get this section emitted at right time and so avoid LC_ENCRYPTION_INFO size miscalculation
 static const int constsection = 0;
 
 void UnityInitTrampoline();
 
 // WARNING: this MUST be c decl (NSString ctor will be called after +load, so we cant really change its value)
 const char* AppControllerClassName = "UnityAppController";
 
 int main(int argc, char* argv[])
 {
     @autoreleasepool
     {
         UnityInitTrampoline();
         UnityInitRuntime(argc, argv);
 
         RegisterMonoModules();
         NSLog(@"-> registered mono modules %p\n", &constsection);
         RegisterFeatures();
 
         // iOS terminates open sockets when an application enters background mode.
         // The next write to any of such socket causes SIGPIPE signal being raised,
         // even if the request has been done from scripting side. This disables the
         // signal and allows Mono to throw a proper C# exception.
         std::signal(SIGPIPE, SIG_IGN);
 
         UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String:AppControllerClassName]);
     }
 
     return 0;

And this is the output:

 Using Facebook Unity SDK v7.9.0 with FBiOSSDK/4.17.0
 Facebook.Unity.CompiledFacebookLoader:Start()
 
 (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
 
 FB is now not logged in!
 FBScript:SetInit()
 Facebook.Unity.CallbackManager:TryCallCallback(Object, IResult)
 Facebook.Unity.CallbackManager:CallCallback(Object, IResult)
 Facebook.Unity.CallbackManager:OnFacebookResponse(IInternalResult)
 
 (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
 
 FB trying to log in!
 FBScript:FBlogin()
 FBScript:SetInit()
 Facebook.Unity.CallbackManager:TryCallCallback(Object, IResult)
 Facebook.Unity.CallbackManager:CallCallback(Object, IResult)
 Facebook.Unity.CallbackManager:OnFacebookResponse(IInternalResult)
 
 (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
 
 2016-12-10 23:44:34.464780 squares[2556:662682] Uncaught exception: NSInvalidArgumentException: *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
 (
     0   CoreFoundation                      0x00000001819a61d8 <redacted> + 148
     1   libobjc.A.dylib                     0x00000001803e055c objc_exception_throw + 56
     2   CoreFoundation                      0x0000000181885ad4 CFStringConvertNSStringEncodingToEncoding + 0
     3   squares                             0x00000001000f6e58 -[UnityAppController application:openURL:sourceApplication:annotation:] + 308
     4   UIKit                               0x0000000187a9141c <redacted> + 872
     5   UIKit                               0x0000000187a90e30 <redacted> + 656
     6   SafariServices                      0x000000018fcb28a0 <redacted> + 172
     7   SafariServices                      0x000000018fcaa7c0 <redacted> + 76
     8   CoreFoundation                      0x00000001819ac160 <redacted> + 144
     9   CoreFoundation                      0x000000018189fc3c <redacted> + 284
     10  FrontBoardServices                  0x000000018354d8bc <redacted> + 36
     11  FrontBoardServices                  0x000000018354d728 <redacted> + 176
     12  FrontBoardServices                  0x000000018354dad0 <redacted> + 56
     13  CoreFoundation                      0x0000000181954278 <redacted> + 24
     14  CoreFoundation                      0x0000000181953bc0 <redacted> + 524
     15  CoreFoundation                      0x00000001819517c0 <redacted> + 804
     16  CoreFoundation                      0x0000000181880048 CFRunLoopRunSpecific + 444
     17  GraphicsServices                    0x0000000183306198 GSEventRunModal + 180
     18  UIKit                               0x000000018786c2fc <redacted> + 684
     19  UIKit                               0x0000000187867034 UIApplicationMain + 208
     20  squares                             0x00000001000e300c main + 156
     21  libdyld.dylib                       0x00000001808645b8 <redacted> + 4
 )
 2016-12-10 23:44:34.465114 squares[2556:662682] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
 *** First throw call stack:
 (0x1819a61c0 0x1803e055c 0x181885ad4 0x1000f6e58 0x187a9141c 0x187a90e30 0x18fcb28a0 0x18fcaa7c0 0x1819ac160 0x18189fc3c 0x18354d8bc 0x18354d728 0x18354dad0 0x181954278 0x181953bc0 0x1819517c0 0x181880048 0x183306198 0x18786c2fc 0x187867034 0x1000e300c 0x1808645b8)
 libc++abi.dylib: terminating with uncaught exception of type NSException
 (lldb) 



Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by KingAnak · Dec 13, 2016 at 02:58 AM

I am getting to he same problem - see here for a workaround. https://developers.facebook.com/bugs/900542723380664/?__mref=message_bubble

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Emmanuel_Charon · Dec 20, 2016 at 04:31 PM 0
Share

Thank you, I found a fix there.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Linker errors on Xcode 4.5.2 with OpenCV 2.4.3 2 Answers

iOS build is including Mac OSX .bundle files into Xcode Project 2 Answers

iOS - Disable ARC on XCode Projects 2 Answers

Call Unity class in XCode 1 Answer

Using NavigationController in an iOS plugin 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges