No response on operation (marmalade sdk 6.5.5)

bada
edited November 2011 in Native
Hi,

I got a problem. Sometimes in IOS peer just didn't response on operation, and this also where often on andriond build also, any ideas about this?

Thanks

Comments

  • Well, I am not sure, what you mean.
    You are calling a method, which is sending an operation, like opJoin(), opRaiseEvent(), opCustom(), etc. and your OperationResult-calbback never gets called?
    Have you checked the server logs for any error?
  • yes, it is. I sent operation and never get response, on server logs are ok. It's happens not every time but sometimes, most cases on android platform, so we can't release our project.
  • We didn't encounter this, so we need some reproduction steps and log output.

    Anything in the debug output of the client? Or server?
    Which SDK versions (server and the clients) are you using?
    How can we reproduce this? Does this happen to certain operations? How heavily did you modify the server logic?
  • using
    server: ExitGames-Photon-Server-SDK_v2-6-11-1647
    client: Photon-Marmalade_v6-5-5_SDK

    on server there is a light modification of LiteLobby. And this works perfectly for our Flash client.

    on client when push a button New game from main menu i leave lobby and join game room

    CGame::GetInst().SetCurrGame(gameId);
    CNetwork * net = CGame::GetInst().GetNetwork();
    net->Leave("gomoku_lobby");

    then on operation callback

    case OPC_RT_LEAVE:
    {
    //ExitGames::JString s = returnValues.toString();

    CGame::GetInst().SwapState(CGame::GAME_PLAY);
    }break;

    when I go to play state, I join game room

    void CGamePlay::JoingGame()
    {
    const ExitGames::JString & gameName = CGame::GetInst().GetCurrGame();
    CNetwork * net = CGame::GetInst().GetNetwork();

    ExitGames::Hashtable t1,t2;
    t2.put(ExitGames::KeyObject<ExitGames::JString>(L"socialID"),
    ExitGames::ValueObject<ExitGames::JString>(CGame::GetInst().GetFbId()));

    if ( CGame::GetInst().IsBotGame() )
    {
    ExitGames::LitePeer * peer = net->GetPeer();
    ExitGames::Hashtable t;
    t.put(ExitGames::KeyObject<nByte>(CNetwork::OP_JOIN_PARAM_GAME_ID),
    ExitGames::ValueObject<ExitGames::JString>(gameName));

    t.put(ExitGames::KeyObject<nByte>(CNetwork::OP_JOIN_PARAM_ACTORSROPS), ExitGames::ValueObject<ExitGames::Hashtable>(t2));

    t.put(ExitGames::KeyObject<nByte>(CNetwork::OP_JOIN_PARAM_BOT_GAME),
    ExitGames::ValueObject<bool>(true));

    peer->opCustom(OPC_RT_JOIN, t, true);

    }
    else
    {
    net->Join(gameName, t1, t2);
    }
    }

    and now I must catch callback from this join and this sometimes didn't happen

    Also I use s3efacebook extension and s3eIOSAds and CIwHTTPQueue in my app
  • also log from debug version (some assert could be safely ignored), if its helps you
    http://www.everfall.com/paste/id.php?snpnaw5r16lg
  • You can use [ code ] -tags, so that your code will stay formatted, when pasting it into the forums, like this:
    CGame::GetInst().SetCurrGame(gameId);
    CNetwork * net = CGame::GetInst().GetNetwork();
    net-&gt;Leave("gomoku_lobby");
    
    then on operation callback
    
    case OPC_RT_LEAVE:
    		{
    			//ExitGames::JString s = returnValues.toString();
    		
    			CGame::GetInst().SwapState(CGame::GAME_PLAY);
    		}break;
    
    when I go to play state, I join game room
    
    void CGamePlay::JoingGame()
    {
    	const ExitGames::JString & gameName = CGame::GetInst().GetCurrGame();
    	CNetwork * net = CGame::GetInst().GetNetwork();
    
    	ExitGames::Hashtable t1,t2;
    	t2.put(ExitGames::KeyObject&lt;ExitGames::JString&gt;(L"socialID"),
    		ExitGames::ValueObject&lt;ExitGames::JString&gt;(CGame::GetInst().GetFbId()));
    	
    	if ( CGame::GetInst().IsBotGame() )
    	{
    		ExitGames::LitePeer * peer = net-&gt;GetPeer();
    		ExitGames::Hashtable t;
    		t.put(ExitGames::KeyObject&lt;nByte&gt;(CNetwork::OP_JOIN_PARAM_GAME_ID),
    			ExitGames::ValueObject&lt;ExitGames::JString&gt;(gameName));
    		
    		t.put(ExitGames::KeyObject&lt;nByte&gt;(CNetwork::OP_JOIN_PARAM_ACTORSROPS), ExitGames::ValueObject&lt;ExitGames::Hashtable&gt;(t2));
    
    		t.put(ExitGames::KeyObject&lt;nByte&gt;(CNetwork::OP_JOIN_PARAM_BOT_GAME),
    			ExitGames::ValueObject&lt;bool&gt;(true));
    
    		peer-&gt;opCustom(OPC_RT_JOIN, t, true);
    
    	}
    	else
    	{
    		net-&gt;Join(gameName, t1, t2);
    	}
    }
    
    This increases readability a lot.

    Well, you have linked a log from your client, with a lot of output from your app and various frameworks, but there is not a single line in that log, that is coming from the Photon Client, so this won't tell us anything interesting.

    Please set the debug level to DEBUG_LEVEL_INFO right after constructing a peer instance and then print anything, what you are getting passed to the Photon debug callback to the log, reproduce the issue and then send us the log.

    The server operation data logging also will help a lot (you can activate it by setting the logging level of "operation data logger" to DEBUG in LiteLobby/bin/log4net.config. Afterwards you can find the log in ./log/LiteLobby.log of your running Photon-Server instance).

    PS:
    You are getting 5.000 lines of warnings logged from you client in just 12min? Sure, that you have not to worry about that fact?
  • this warnings actually log. all that marks PHOTON: is a callback from
    virtual void PhotonPeerDebugReturn(PhotonPeer_DebugLevel debugLevel, const JString& string) = 0;
    

    I put DEBUG_LEVEL_INFO level of log and get tomorrow log from our testers.
  • Really? I am pretty sure, that the Marmalade clients don't provide any debug out in the form of "network = " and a solution-wide search supports my impression :?
  • ok, testers get new ios 5 and this bug is disappear, but I am not sure about android, so when we start android testing I get logs from them.
    Thanks for help.
  • Hi!

    This issue is persist.

    Here is logs

    here is server log
    http://www.indigo-games.com/log/indigo.log

    here is ipod log (note that PHOTON log channel is PhotonPeerDebugReturn in marmalade client)
    http://www.indigo-games.com/log/joingame4.txt

    Thanks
  • Hi.

    Sure, that these both logs belong together? Maybe your server hardware runs in another timezone than the client does?

    The times/dates in both logs just don't match each other.

    PS:
    Due to the server-log you are quite often sending a real lot of zeros, looks like a big array with mainly unused entries, which are still on initialization state.
    Do you really need this to be done this way? You could easily get rid of approximately half your traffic, with just a little bit of optimization here.
  • our server is in Zero timezone to correct save game secession and convert after to local user time. Big array of zeros is actually our game board (it's a simple five in a a row game also known as gomoku).

    about time - look logs for 18.10.2011
  • bada wrote:
    our server is in Zero timezone
    And the client?
  • when client got his saved session from server it convert time to local tine assuming that saved time on server is saved in +0 UTC
  • bada wrote:
    when client got his saved session from server it convert time to local tine assuming that saved time on server is saved in +0 UTC
    Yes, but what is the local time zone of the client or it's difference to the server time?

    If the server writes a log entry at 4:20 and the client has one at 6:20 and one at 8:20, which both could match, but no entry at all at 4:20, then this doesn't tell me anything without knowing the time-differenc between client and server.
  • ahh local time of testers log is +4 UTC

    so if on server is 12.40 on testers device is 16.40
  • Sorry. I am very busy at the moment with the upcoming Photon 3 native Clients public alpha release, so I had no change yet, to really look into this problem and and have to put you of until probably mid of next week or so.

    Just as a quick response about the huge amoount of data, which you are sending through per game board update:
    Sending your board the way you do, is pretty much he worst way, you can do it: You are wasting a lot of bandwith this way and network perfomance this way.
    You are currently sending about 8kb for every board update.
    1. This is enough data for more than a 90 times 90 byte array. Is your field really that big or are you just using ints or in64s, where nBytes would be totally sufficient?
    2. you do not need to send all the field every time: just send the fields of the board, that actually have changed in the way x-coordinate, y-coordinate and new valu of the field and this way you would only have to send 3 bytes instead of your currently more than 8.000.
  • I send board only once - on start of the game, every turn I just send (x y). Btw, do you pack your traffic somehow? I thought you did, so I didn't optimize.
  • bada wrote:
    I send board only once - on start of the game, every turn I just send (x y). Btw, do you pack your traffic somehow? I thought you did, so I didn't optimize.
    I see this huge array in there approximately once a second.
    Currently we don't pack the traffic.
  • After the Photon 3 Marmalade Beta Client has been released, I finally found time, to look into this issue again.

    I found some strange behavior of the Photon server when sending multiple kb of data to a client, when trying to reproduce your issue with ExitGames-Photon-Server-SDK_v2-6-11-1647 and Photon-Marmalade_v6-5-5_SDK.
    However, I could not reproduce your issue with ExitGames-Photon-Server-SDK_v3-0-12-2468-RC4 and Photon-Marmalade_v3-0-0-0-Beta_SDK at all, so whatever bug is causing this, it seems to be fixed in the most recent SDKs.

    Is it an option for you to switch to Photon 3?