Page 1 of 1

SFSObject serialization issue on iOS

Posted: 02 Apr 2014, 16:50
by BerengerVB2S360
Hi,

We're using Unity 3.5.7 and SmartFox.Version returns 1.2.0. When using the iPad, some request are apparently blocked and we get the following warning :

[SFS - WARN] Unrecognized type in SFSObject serialization: 6684755.

However, we're are not serializing anything fancy. We put some integers, floats, bytes, string and SFSArray inside the SFSObject. Any idea what could be the problem ? Do you need more informations ? I'm a bit new to this, I'm taking up someone else's work.

Re: SFSObject serialization issue on iOS

Posted: 03 Apr 2014, 09:15
by Lapo
Hi,
your problem looks very much like this one:
http://forums.smartfoxserver.com/viewto ... 20&t=16963

In essence it's not related with the API but it seems to be caused by Unity's iOS exporter. Specifically I think the problem is with the AOT (ahead of time) compilation process that use to transform the C# bytecode into native ARM code.

In that discussion you will notice that the user was able to solve the problem, although the solution is far from being logical. :?

Re: SFSObject serialization issue on iOS

Posted: 03 Apr 2014, 10:16
by BerengerVB2S360
We saw this topic earlier, and disabled every debugs in our project, but it doesn't seem to fix it unfortunately :(

Re: SFSObject serialization issue on iOS

Posted: 03 Apr 2014, 12:34
by Lapo
We have a more recent version of the API available here:
http://www.smartfoxserver.com/download/sfs2x#p=client

It shouldn't really matter but since the origin of the problem is not well understood, it might be worthwhile to experiment using the latest version.

Re: SFSObject serialization issue on iOS

Posted: 08 Apr 2014, 14:57
by BerengerVB2S360
Hi again,

After several days of investigations, I finally found the solution to my problem, and the solution to alien woods' as well. Prepare to be surprised ... SFSObject.ToString() function is messing things up on iOS ! I don't know what it does, but every time it's called, implicitly ("test" + sfsobj) or explicitly (sfsobj.ToString()), communications stops with the other users.

Just remove them all, and you're good ! Damn that was a tricky one to find ... Hope it can help someone else :)

Re: SFSObject serialization issue on iOS

Posted: 08 Apr 2014, 15:43
by Lapo
No idea why that's happening. Good to know that you have found a way to fix the issue.
We'll see if we can reproduce it and understand why it happens.

thanks

Re: SFSObject serialization issue on iOS

Posted: 09 Apr 2014, 07:31
by Lapo
UPDATE: we're not able to reproduce the problem. Calling SFSObject.ToString() doesn't cause any issue.
Once again this confirms that the AOT compilation process is very likely to be the problem.