A few connection issues with Marmalade

0 votes

I'm running into a few issues getting Marmalade to work with AppWarpS2 harmoniously. Firstly, I can establish a connection. However, if the server is not running and I attempt to establish a connection the app just hangs (pauses), and I have to force quit it. This is evidently not user friendly. The same happens if the server is stopped mid way - the app will just hang.

Secondly, if I stop the server while a connection is established with the client, wait for the reconnect recovery allowance time to expire, then start the server again, the client begins to receive AUTH_ERROR response codes for every operation it tries to do - even connect() causes this code. The only way out seems to be to restart the client.

Thirdly, it says in the docs that there is a SetPollingMode method in the Marmalade implementation? It doesn't seem to be available...

Any help would be greatly appreciated


By the way - is there a Spacewarfare example for Marmalade as it says in the docs? Because there isn't a marmalade example in the folder downloaded for that example.
asked Sep 17, 2014 in AppWarpS2 by alzab (10 points)

1 Answer

0 votes
Hey Alex,

Whenever you stop the server, server losses all its state for example users, dynamic rooms, etc. So, I if you will try to recover connection after server has restarted, it will give AUTH Error as the server does not have that user to recover.

SetPollingMode was available in old version of SDK. The new version does not have it. Thanks for this information, we will remove it from documentation.

Regarding hanging of application, we will try to debug the SDK and check out if there is any such bug and what is the cause.

You can download the Marmalade SpaceWarFare sample from here https://www.dropbox.com/s/gll8j22veodo0yp/Marmalade_SpaceWarFare.zip?dl=0

answered Sep 17, 2014 by Suyash Mohan (900 points)
Thanks for your reply! I downloaded the example, and tried to recreate the hanging issue. This is how you do it: run the spacewarfare demo and click 'Play' (but make sure the server isn't running). You should notice a continual "TryConnect Error: 10036" in the output in visual studio. It seems it's trying to connect but not timing out or anything...?

Also, when I say AUTH error, I mean I get an AUTH error when I try to connect again without restarting the client... I'm not trying to reconnect. i.e. I run the connect() method of the AppWarp client. Maybe I'm not explaining it well...
Okay. We will test it out and inform you here on this thread.
Hey Alex,

We tested the same sample that I sent you earlier.  And it was working fine. Please try it again yourself. The message "TryConnect Error: 10036" is produced by Marmalade while connecting to a server. The message is printed till socket connects to server. This is a normal behavior.

Regarding the hanging of app, there is only once possibility that you are either calling connect or recoverConnection method in onConnectDone. This will create a loop between onConnectDone and  connect method result in blocking of game loop.

Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com