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
0
Question by Nonatomic · Oct 07, 2015 at 12:07 PM · facebook

Facebook SDK 7.1.0 integration crash?

Having upgraded the Facebook SDK to 7.1.0 having followed the upgrade guide, it all builds and runs fine in the editor. Although the Editor version doesn't simulate the modal display of the SafariViewController.

Guide: https://developers.facebook.com/docs/unity/upgrading-7.x

I've been able to set the Facebook SDK example scene as my main scene, build and run on an iOS device and have it all run fine and login without issue.

My issue is with my implementation. When I build and run on an iOS device, the new Facebook SDK uses the SafariViewController and popups a login window. I enter my login details and login, then I see the permission screen and hit ok. This is the point of failure, and the error message suggests an issue with nested iteration.

So my question is what has changed in the Facebook SDK that could cause this? Could this be an issue with the SDK? It seems unlikely as the example runs fine. However I didn't experience this issue with the previous SDK.

I'm left a little stumped on this one. Any help would be appreciated. I've attached screenshots and dumped the console error log on pastebin http://pastebin.com/BipVLc9p

alt text

img-3506.png (98.1 kB)
crash4.jpg (486.3 kB)
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

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by LTX · Oct 13, 2015 at 11:54 AM

I ran into the same issue. If you go into UnityAppController+ViewHandling.mm in xcode, you should find the createSnapshotView , returning nil will stop the crash, but i am not sure what side effects it will have. The weird thing is that If i am not using ADBannerView then it won't crash, is that the case for you? I have filed a bug to Unity, will wait and see what they say.

Comment
Add comment · Show 4 · 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 Nonatomic · Oct 13, 2015 at 05:59 PM 0
Share

Thanks for you answer LTX. I shall give your suggestion a go and let you know how I get on.

avatar image Nonatomic · Oct 13, 2015 at 07:55 PM 0
Share

LTX your recommendation works a treat!!! Awesome. I tested this on iOS 9.0.2. I think I need to test this on previous version of iOS though for peace of $$anonymous$$d.

As you outlined the change is in UnityAppController+ViewHandling.mm the existing createSnapshotView looks like this

 - (UIView*)createSnapshotView
 {
     // snapshot api appeared on ios7
     // BUT on ios7 tweaking hierarchy like that on going to background results in all kind of weird things when going back to foreground
     // so do snapshotting only on ios8 and newer
     return _ios80orNewer ? [_rootView snapshotViewAfterScreenUpdates:YES] : nil;
 }

The comment in the createSnapshotView method suggests changes to iOS8 required the snapshotViewAfterScreenUpdates to be called. Perhaps iOS9 fixes the issue discovered in iOS8 but I need to run further tests to confirm this.

Thanks for your help LTX its much appreciated. With regards to the use of ADBannerView, I am indeed using this as well. Perhaps the use of iAds is an underlying cause.

avatar image DarkSchneider · Feb 02, 2016 at 10:08 AM 0
Share

$$anonymous$$an you saved my life. Thanks.

avatar image mrgeorge3d · Mar 27, 2016 at 01:29 AM 0
Share

@LTX Did you get an answer From unity about the filed bug you submitted?

avatar image
0

Answer by BMO · Apr 19, 2016 at 11:30 PM

Returning nil will make the problem go away, but I talked with Unity support and a robust fix was made in Unity 5.3.4p3.

Case 775710: https://issuetracker.unity3d.com/issues/keyboard-messed-up-switching-between-single-line-and-multi-line-input-fields

The case description doesn't really reflect the issue we were seeing, but they are now guarding the call to createSnapshotView such that the view hierarchy shouldn't be modified during iteration.

Also, for reference the symbolicated crash stack is like this:

 NSInternalInconsistencyException
 Reason: can't start iterating in the middle of an iteration
     0      CoreFoundation                         0x2125398b __exceptionPreprocess + 124
     1      libobjc.A.dylib                        0x209eee17 objc_exception_throw + 36
     2      CoreFoundation                         0x21253861 +[NSException raise:format:arguments:] + 102
     3      Foundation                             0x21a37509 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 90
     4      FrontBoardServices                     0x228e8fff -[FBSSettingsDiffInspector inspectDiff:withContext:] + 160
     5      UIKit                                  0x25a5f333 __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 100
     6      UIKit                                  0x25a5f041 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 642
     7      FrontBoardServices                     0x228dbcf5 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke_2 + 38
     8      FrontBoardServices                     0x228f6c07 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 16
     9      FrontBoardServices                     0x228f6ab9 -[FBSSerialQueue _performNext] + 222
     10     FrontBoardServices                     0x228df4cd -[FBSWorkspace synchronizeSystemAnimationFencesWithCleanUpBlock:] + 1326
     11     UIKit                                  0x25a5cb41 -[UIApplication _synchronizeSystemAnimationFencesWithSpinCleanUpBlock:] + 430
     12     UIKit                                  0x25aaf66d __realPreCommitHandler_block_invoke + 398
     13     QuartzCore                             0x23896247 CA::Transaction::Fence::run_callbacks() + 24
     14     QuartzCore                             0x2385c68f CA::Context::commit_transaction() + 636
     15     QuartzCore                             0x2385c233 CA::Transaction::commit() + 612
     16     UIKit                                  0x25c3022d +[UIScreen _beginDisableScreenUpdatesForSnapshotUsingSnapshotCover:] + 374
     17     UIKit                                  0x25ac0f99 __73-[UIView resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:]_block_invoke + 74
     18     UIKit                                  0x25acdf93 +[_UIReplicantView _pendingSnapshotOfTarget:snapshotBlock:] + 376
     19     UIKit                                  0x25ac0e91 -[UIView resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets:] + 238
     20     UIKit                                  0x25ac0d99 -[UIView snapshotViewAfterScreenUpdates:] + 134
     ...
 23     UIKit                                  0x2582a0bd -[UIApplication _deactivateForReason:notify:] + 698

Our crashes were occurring when users would background the app during the startup sequence. Reason being that removing the splash screen and showing our game UI would change the view hierarchy.

Another variant of this issue was fixed in Unity 5.3.2.p4 with case 760747. The repro for that was to have the onscreen keyboard open when the app is backgrounded.

Comment
Add comment · 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

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

36 People are following this question.

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

Related Questions

first steps with facebook sdk - print name in GUI 0 Answers

Get email from facebook SDK 0 Answers

Displaying profile pictures in all connected devices 1 Answer

Facebook leaderboard issue 0 Answers

How we create multiple leaderboard of facebook without using any other server? 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