Java Android Version bug FOUND

Post here all your questions related with SmartFoxServer Java API

Moderators: Lapo, Bax

croco
Posts: 84
Joined: 14 Jun 2009, 09:31

Java Android Version bug FOUND

Postby croco » 26 Aug 2009, 18:36

Hi all,

It seems the SFS API does not callback the userVariablesUpdate :( :(

Has you can see below the message Command .... is mine indicating which event i receive.

As you can see onUserCountChange message is received and i'm called by SFS aPI ;)

but for userVariablesUpdate i received well ;) but i'm not called by the SFS API :(

Thanks for your help.

uffer is required.
I/ ( 1213): Command ......... onUserCountChange
I/SmartFoxClient( 1213): [ RECEIVED ]: <msg t='sys'><body action='uCount' r='24' u='0' s='0'></body></msg>, (len: 67)
I/global ( 1213): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
I/ ( 1213): Command ......... onUserCountChange
I/SmartFoxClient( 1213): [ RECEIVED ]: <msg t='sys'><body action='uVarsUpdate' r='24'><user id='0' /><vars><var n='state' t='s'><![CDATA[AVAILABLE]]></var></vars></body></msg>, (len: 136)
I/global ( 1213): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
croco
Posts: 84
Joined: 14 Jun 2009, 09:31

Postby croco » 26 Aug 2009, 19:18

Hi all, Hi Lapo,

I found the SFS Bug

in the syshandler you deal on the bad element to find the user

On the body it's better ;)

An other thing with the current code i should have been raised with a NullPointer but i don't have it :( Does the errors handling is correct .

I'm used with java code so no problem for me but for unused developper they can ask for a week if the error is in their code or in the SFS ;)

Hope this help.

Croco

public void handleUserVarsUpdate(IXMLElement xmlData)
{
IXMLElement body = xmlData.getFirstChildNamed("body");
IXMLElement user = xmlData.getFirstChildNamed("user");
....
}

public void handleUserVarsUpdate(IXMLElement xmlData)
{
IXMLElement body = xmlData.getFirstChildNamed("body");
IXMLElement user = body.getFirstChildNamed("user");
....
}
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 27 Aug 2009, 05:57

Please, remember to post in the proper section.
There is a dedicated Java/Android section, I've moved the post there.

Thanks for the feedback.
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 27 Aug 2009, 07:09

It looks like you are using an older version of the API.
Please make sure to download the latest release, we have made quite a few updates and fixes recently.

http://www.smartfoxserver.com/labs/API/
Lapo

--

gotoAndPlay()

...addicted to flash games
croco
Posts: 84
Joined: 14 Jun 2009, 09:31

Postby croco » 29 Aug 2009, 10:04

Hi lapo,
Yeah the bug comes on the latest version :(
I had to patch the source code from the link repository you mention
Hope this Help.

Croco
patso
Posts: 380
Joined: 13 Nov 2006, 13:44
Location: Sofia, Bulgaria

Postby patso » 30 Aug 2009, 08:59

Hi croco,

in it.gotoandplay.smartfoxclient.handlers.SysHandler you have

Code: Select all

    public void handleUserVarsUpdate(IXMLElement xmlData)
    {
        IXMLElement body = xmlData.getFirstChildNamed("body");
        IXMLElement user = body.getFirstChildNamed("user");


Is this the current content of the zip file you download from the API page? If not can you check what is the SysHandler.java last modification date? Maybe you see a cached file.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 31 Aug 2009, 09:17

Hi Croco,
the latest download has fixed that bug. Please check the suggestion from Patso. If you are under a proxy and you cannot access the latest update we can send it via email.

Let us know
Lapo

--

gotoAndPlay()

...addicted to flash games
croco
Posts: 84
Joined: 14 Jun 2009, 09:31

Postby croco » 07 Sep 2009, 07:52

Hi patso, Lapo,

I checked you are right it's fixed and i got a ghost version ;)

anyway it's good to know debugging SFS ;)

sorry to have afraid you with that old bug!

Regards.

Croco
croco
Posts: 84
Joined: 14 Jun 2009, 09:31

Postby croco » 07 Sep 2009, 07:54

Lapo wrote:Hi Croco,
the latest download has fixed that bug. Please check the suggestion from Patso. If you are under a proxy and you cannot access the latest update we can send it via email.

Let us know


thanks Lapo for your support !

I checked my FF options and got the last version now ;)

Cool

Croco

Return to “Java2SE / Android Client API”

Who is online

Users browsing this forum: No registered users and 24 guests