在iOS上创建实时聊天室后,Google Play游戏服务崩溃
Google Play Game Services crashing after creating real-time room on iOS
我正在使用Google Play游戏服务为Android和iOS开发一款实时多人游戏。我正在使用它的C++API和Cocos2d-x。
谷歌的文档告诉,GPG是在游戏中实现的,这在Android上运行良好。但在iOS上,当实时房间有足够的玩家后,游戏就会崩溃。
快照没有启用,我正在使用谷歌的UI进行实时聊天。
其他功能运行良好,经过测试的功能:
-
朋友的邀请
-
邀请朋友
-
Leaderborads
-
显示成就UI
登录G+时的日志:
cocos2d: [LUA-print] Loading game
Signing in to GPG
cocos2d: [LUA-print] Entered background
2014-10-14 15:32:34.539 MYAPP iOS[10716:1633086] VERBOSE: Cancelling event timer
cocos2d: [LUA-print] Entered foreground
Signed in to GPG
MYAPP iOS[10716:1633086] ERROR: Attempting to get name of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get avatar URL of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get id of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get title of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get current xp of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get last level up timestamp of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get current level of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get level number of an invalid PlayerLevel
MYAPP iOS[10716:1633086] ERROR: Attempting to get minimum xp of an invalid PlayerLevel
MYAPP iOS[10716:1633086] ERROR: Attempting to get maximum xp of an invalid PlayerLevel
MYAPP iOS[10716:1633086] ERROR: Attempting to get next level of an invalid Player
MYAPP iOS[10716:1633086] ERROR: Attempting to get level number of an invalid PlayerLevel
MYAPP iOS[10716:1633086] ERROR: Attempting to get minimum xp of an invalid PlayerLevel
MYAPP iOS[10716:1633086] ERROR: Attempting to get maximum xp of an invalid PlayerLevel
运行CreateRealTimeRoom()后的日志:
MYAPP iOS[10716:1633236] VERBOSE: ProcessedInState is not implemented.
MYAPP iOS[10716:1633236] VERBOSE: OnConnectNetworkStart is not implemented.
MYAPP iOS[10716:1633236] INFO: Connect with retry.getRetryAuthToken(): 1
MYAPP iOS[10716:1633236] INFO: Token expired. Refreshing.
MYAPP iOS[10716:1633236] Trying to refresh token; old token is: XXX
MYAPP iOS[10716:1633086] Auth updated! ... maybe. New token is: XXX
MYAPP iOS[10716:1633236] Token refresh success!
MYAPP iOS[10716:1633236] INFO: Trying to connect with returned auth token.
MYAPP iOS[10716:1633236] VERBOSE: ProcessedInState is not implemented.
MYAPP iOS[10716:1633236] VERBOSE: OnConnectNetworkDone is not implemented.
MYAPP iOS[10716:1633236] VERBOSE: ProcessedInState is not implemented.
MYAPP iOS[10716:1633236] VERBOSE: OnEnterRoomStart is not implemented.
MYAPP iOS[10716:1633236] VERBOSE: OnEnterRoomEnd is not implemented.
MYAPP iOS[10716:1633393] INFO: mPlayerId: 112816036638541164521 Enter room: ChoKCQilzeL2rgQQAhABGAAg____________ARCA1Jb6uNOCgrsB
MYAPP iOS[10716:1633393] VERBOSE: RtmpDcmLog is not implemented.
created a room 1
[RTMP] (Error) +[GPGRealTimeRoomMaker performPreCheck:checkDelegate:]:[main] Sign in to the Google Play Games Service before using the multiplayer functions
房间有足够的玩家后,应该调用ShowWaitingRoomUI的回调,但不是:
MYAPP iOS[10716:1633236] ERROR: - unhandledMessage: message.type=48
MYAPP iOS[10716:1633393] ERROR: Attempting to get participant for invalid participant id.
MYAPP iOS[10716:1633393] INFO: Waiting for connection from p_CJXeyNKXhKOL3QEQAQ
OnParticipantStatusChanged participant:p_CJXeyNKXhKOL3QEQAQ status: 2
JOINED OnParticipantStatusChanged participant :p_CJXeyNKXhKOL3QEQAQ
JOINED OnParticipantStatusChanged room :ChoKCQilzeL2rgQQAhABGAAg____________ARCA1Jb6uNOCgrsB
OnParticipantStatusChanged participant participantsInRace_.size: 1
MYAPP iOS[10716:1633394] VERBOSE: RtmpPeerLog is not implemented.
MYAPP iOS[10716:1633394] ERROR: peer_capabilities must not be null in PeerStateMachine::WaitingForOutgoingRemoteConnectionNoSessionId
MYAPP iOS[10716:1633394] VERBOSE: EnteredState is not implemented. MYAPP iOS[10716:1633394] INFO: OP: 1
MYAPP iOS[10716:1633394] INFO: CALL_STATE_CHANGED_OP: New state: 1
MYAPP iOS[10716:1633394] ERROR: peer_capabilities must not be null in PeerStateMachine::WaitingForConnectionData
MYAPP iOS[10716:1633394] VERBOSE: EnteredState is not implemented.
你用真正的iOs设备尝试过吗?这个错误发生在我的iphone模拟器中。
相关文章:
- 如何使用Google Mock来模拟gettimeofday()
- 在Google Kick start中提交时出错
- CHECK(调用)函数在Google Colab中出错
- Google protobuf 时间戳未声明标识符,在 Windows 上具有C++
- 如何使用 Google Test 向测试添加元数据 / 如何将数据从 Google Test 发送到 TestEven
- 运行命令 "rosbag play example.bag" 时出错。找不到与插件 rosbag/NoEncryptor 对应的库
- 在macOS Mojave上发布BOOST unit_test_framework/Google测试
- Google Test for OpenCv c++
- 使用 Google Test 对自定义断言函数进行单元测试
- 如何将混合应用程序上传到Google Play
- Google Play Games C++API-无法通过程序访问好友
- 在Qt项目中引用Google Play库
- Google Play游戏服务可以用于PC游戏吗?(Windows/Linux/OSX)
- Google Play 游戏服务C++集成
- Google Play游戏服务(GPGS)实时多人游戏(RTMP)在Android上永远不会匹配(iOS适用)
- Google Play Services C++/使用IntentHandler在第二个活动上运行UI
- Google Play 游戏服务的邀请对话框不显示任何好友
- Google Play游戏服务C++SDK找不到NativeSdkEntryPoints java类
- 在iOS上创建实时聊天室后,Google Play游戏服务崩溃
- 使用Google Play服务时出错