Sign In Register

How can we help you today?

Start a new topic
Answered

[UNITY] get_name log warning on iOS - GameSparks SDK 0.5

Hi guys,


i have just updated the GameSparks SDK to version 5.0.0 because i need to compile for iOS 64 bit.


I use for the moment only the Facebook Authentication to the service.


Just after updated to SDK 5.0.0 i receive this log warning when debugging in Xcode:


"get_name can only be called from the main thread.

Constructors and field initializers will be executed from the loading thread when loading a scene.

Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.

 

(Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineObject.cpp Line: 75)"


Everything works fine now (authentication doesn't work with SDK v3 and IL2CPP) but this message seems to log every frame.


I didn't change anything in my code, only update the SDK.


I only wanted to know if you know about this, and if it's a bug in GameSparks SDK.


I repeat, everything seems work for me, but it's pretty annoying when debugging to have this messages because cannot track of other debug messages.


Thanks for the reply.


Best,


Andrea


Best Answer

Hi


Could you confirm the SDK version you are using. This issue was reported and resolved a few releases ago, and the line numbers indicate you may be on an older one.


Gamesparks_Unity_5.3.0.117.unitypackage is the version available for download.


Gabriel


Hi Andrea


Is there a stack trace with this ? It sounds like a bug and we can resolve it pretty quickly once we have this detail.


Gabriel

Hi Gabriel,


thank you for your reply, i'll attach the stack trace that occurs between the two logs. Hope it was what you need.


I had notice that this happens everytime i'll logout from FB, and sometimes in other occasions but i cannot identify it at the moment, it seems sometimes happens at random time.


Thanks again for your reply,


Andrea

I don't know if that can help (or if it is related) but it happened to me as well, on every frame, after the reception of a BuyVirtualGoodResponse from a IOSBuyGoodsRequest. It happened a few time before, but I investigated it only this time.

To reproduce, I can do some sandbox transaction until eventually I begin to get what seems to be a infinite reconnecting fury along with the get_name message. This on every frame:

   

get_name can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
 
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineObjectBindings.gen.cpp Line: 66)

GS: Connecting to:wss://gsp-aeu000-se02.gamesparks.net/ws/273957sqof2g?deviceOS=IOS&deviceID=58CF2BFD-DC90-4D92-A7B0-24438CD731C0&SDK=?deviceOS=IOS&deviceID=58CF2BFD-DC90-4D92-A7B0-24438CD731C0&SDK=
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
GameSparks.Platforms.<DebugMsg>c__AnonStorey23:<>m__2() (at /Users/gabriel/Desktop/Unity Projects/Decline/Assets/GameSparks/Platforms/PlatformBase.cs:131)
GameSparks.Platforms.PlatformBase:Update() (at /Users/gabriel/Desktop/Unity Projects/Decline/Assets/GameSparks/Platforms/PlatformBase.cs:62)
GameSparks.Platforms.IOS.IOSPlatform:Update() (at /Users/gabriel/Desktop/Unity Projects/Decline/Assets/GameSparks/Platforms/IOS/IOSPlatform.cs:79)
 
(Filename: /Users/gabriel/Desktop/Unity Projects/Decline/Assets/GameSparks/Platforms/PlatformBase.cs Line: 131)

   

Any idea?


Answer

Hi


Could you confirm the SDK version you are using. This issue was reported and resolved a few releases ago, and the line numbers indicate you may be on an older one.


Gamesparks_Unity_5.3.0.117.unitypackage is the version available for download.


Gabriel

Login to post a comment