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 /
  • Help Room /
avatar image
1
Question by andreshvs · Mar 30, 2016 at 01:57 AM · crashiphoneupgradeleaderboardsocial

iOS crash on Social Leaderboard LoadScores after upgrading to Unity5

Hello,

I have the following code that I use to setup leaderboards on my game:

 public void Setup(Dictionary<string, IUserProfile> friendsHashTable)
     {
         ILeaderboard leaderboard leaderboard = SocialManager.GetSocialPlatform().CreateLeaderboard();
         this.friendsHashTable = null == friendsHashTable? this.friendsHashTable : friendsHashTable;
         
         if(!IsCompleted())
         {
             return;
         }
 
         leaderboard.SetUserFilter(GetFriendsFilterList());
         leaderboard.LoadScores(OnScoresLoaded);
     }

It used to work fine on 4.6.4 and it works fine on Android as well for 5.3.4f1; however when I run it on iOS it crashes with the following error message:

 2016-03-29 18:34:46.506 bith[4820:60b] -[GKLeaderboard initWithPlayers:]: unrecognized selector sent to instance 0x16f63af0
 2016-03-29 18:34:46.726 bith[4820:60b] Uncaught exception: NSInvalidArgumentException: -[GKLeaderboard initWithPlayers:]: unrecognized selector sent to instance 0x16f63af0
 (
     0   CoreFoundation                      0x2f2a0ee3 <redacted> + 154
     1   libobjc.A.dylib                     0x39a3bce7 objc_exception_throw + 38
     2   CoreFoundation                      0x2f2a47f7 <redacted> + 202
     3   CoreFoundation                      0x2f2a30f7 <redacted> + 706
     4   CoreFoundation                      0x2f1f2058 _CF_forwarding_prep_0 + 24
     5   bith                                0x01770608 ___ZN10GameCenter13GcLeaderboard6CreateEP9MonoArray_block_invoke + 432
     6   GameCenterFoundation                0x2fe5aca1 <redacted> + 12
     7   libdispatch.dylib                   0x39f24d53 <redacted> + 10
     8   libdispatch.dylib                   0x39f24d3f <redacted> + 22
     9   libdispatch.dylib                   0x39f276c3 _dispatch_main_queue_callback_4CF + 278
     10  CoreFoundation                      0x2f26b641 <redacted> + 8
     11  CoreFoundation                      0x2f269f0d <redacted> + 1308
     12  CoreFoundation                      0x2f1d4729 CFRunLoopRunSpecific + 524
     13  CoreFoundation                      0x2f1d450b CFRunLoopRunInMode + 106
     14  GraphicsServices                    0x341436d3 GSEventRunModal + 138
     15  UIKit                               0x31b35871 UIApplicationMain + 1136
     16  bith                                0x00023d94 main + 164
     17  libdyld.dylib                       0x39f39ab7 <redacted> + 2
 )

From testing the this seems to be the call that causes the issue:

 leaderboard.LoadScores(OnScoresLoaded);

Has anyone come across this before? Or does anyone know what may be causing it?

Thanks.

Comment
Add comment · Show 3
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 andreshvs · Mar 30, 2016 at 06:07 PM 0
Share

Small update, yesterday we found out that if we stopped using

 leaderboard.SetUserFilter(GetFriendsFilterList());

It would no longer crash. It is not right because the leaderboards are failing to load, the message we are getting is that the user is not autenticated; however, we are testing for the user to be autenticated and it is, so this seems to be a conflicting message.

This is the updated code:

 ...
 string[] friends = this.GetFriendsFilterList();
 
         Debug.LogWarningFormat("\n\n\nFriends in leaderboard are null {0}", friends.Length);
         Debug.LogWarningFormat("\n\n\nIs user autenticated? {0}", Social$$anonymous$$anager.GetSocialPlatform().localUser.authenticated);
         //leaderboard.SetUserFilter(GetFriendsFilterList());
         leaderboard.LoadScores(OnScoresLoaded);
 ...

And this is a sample of the messages we are getting:

 Friends in leaderboard are null 3
 UnityEngine.Logger:LogFormat(LogType, String, Object[])
 UnityEngine.Debug:LogWarningFormat(String, Object[])
 UpUp$$anonymous$$erboard:Setup(Dictionary`2)
 Social$$anonymous$$anager:Build$$anonymous$$erboards()
 Social$$anonymous$$anager:OnUserFriendsLoaded(Boolean)
  
 (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
 
 Is user autenticated? True
 UnityEngine.Logger:LogFormat(LogType, String, Object[])
 UnityEngine.Debug:LogWarningFormat(String, Object[])
 UpUp$$anonymous$$erboard:Setup(Dictionary`2)
 Social$$anonymous$$anager:Build$$anonymous$$erboards()
 Social$$anonymous$$anager:OnUserFriendsLoaded(Boolean)
  
 (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
 
 2016-03-30 10:56:53.138 bith[4897:60b] Failed to load scores The requested operation could not be completed because local player has not been authenticated.
 Failed to load leaderboard scores for leaderboard: <Some$$anonymous$$erboardName>
 UnityEngine.Logger:Log(LogType, Object)
 UnityEngine.Debug:LogError(Object)
 UpUp$$anonymous$$erboard:OnScoresLoaded(Boolean)

We are still investigating the issue, but any suggestions are very welcomed.

avatar image nikomikulicic andreshvs · Jun 18, 2016 at 04:23 PM 0
Share

Hi @andreshvs! Do you have any update on the issue? Have you managed to solve this or create any workaround? We've stumped on the same problem and if you've managed to overcome it, any info would be appreciated. Thanks!

avatar image andreshvs nikomikulicic · Jan 18, 2017 at 08:42 PM 0
Share

Hi @sejton. To be honest the only workaround I was able to fine was using the Prime31 plugin and adding a wrapper over it using the unity interface for social. I have not looked anymore in this issue but would love to hear if anyone finds a solution.

0 Replies

· Add your reply
  • Sort: 

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

54 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 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

Game crashes on iPhone 11 0 Answers

Unity 5.4 crash after iOS version building and open xcode8 0 Answers

Simple Leaderboad 1 Answer

Unity crashes whenever I try to modify a prefab 1 Answer

IOS app crashes after splash screen 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