Critical bug in SFS client API - SFSEvent.onRoomListUpdate

You think you've found a bug? Please report it here.

Moderators: Lapo, Bax

Post Reply
udikantz
Posts: 153
Joined: 24 Sep 2009, 09:36

Critical bug in SFS client API - SFSEvent.onRoomListUpdate

Post by udikantz »

Hello,

I have found a bug in the sfs client API , which is really a show stopper for us.

Description of the bug:

when handling the SFSEvent.onRoomListUpdate event.
i use the following code.

Code: Select all

for (var rKey:String in e.params.roomList) {

var r:Room = e.params.roomList[rKey];		
r.getVariable("SomeVariable");

}

when i fist get the list the variables that have been traced to the console are correct.

later on in my example the variable: "SomeVariable" changes on certain rooms.

after the change of the variable i refresh the room list.
I can see in the raw xml string which i receive from the server that "SomeVariable" has been changed, however when the code above traces "SomeVariable" values to the console , i see that i still have the old values of the variable and not the new ones, the variable value did not update inside the received: e.params.roomList array.


Thank you for the support.

been testing on 1.6.8 and 1.6.9 , both had same results

EDIT:

I have noticed a strange piece of code in SysHandler.handleRoomList()
method:

Code: Select all


/*
* Merge with current room list data, to avoid destroying previous data
* @since 1.6.0
*/
var oldRoom:Room = roomList[roomId]
if (oldRoom != null)
{
	room.setVariables( oldRoom.getVariables() )
	room.setUserList( oldRoom.getUserList() )
}				
if i comment this line:

Code: Select all

//room.setVariables( oldRoom.getVariables() )
then the roomList variables changes as it should change after the variables have changed, but its there for a reason i guess, i don't know what it will destroy exactly when i comment this line.
diwip games - co founder & CPO.

http://www.diwip.com
udikantz
Posts: 153
Joined: 24 Sep 2009, 09:36

Post by udikantz »

Another related bug has been discovered.

Sometimes the roomlist that is given by the e.params.roomList
contains rooms that already have been destroyed!
diwip games - co founder & CPO.

http://www.diwip.com
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Post by Pippoflash »

Hi,
I am experiencing the same annoying bug.
Did you find a solution? Did anybody reply to your post?

I did comment that line and yes, it seems that variables do get updated now...
did you notice any side effect?

thank you very much
Filippo
-----------------------
www.pippoflash.com
-----------------------
Pippoflash
Posts: 135
Joined: 30 Jan 2006, 17:16
Contact:

Post by Pippoflash »

Hi, in case you are still looking, there is an official solution to this:
http://forums.smartfoxserver.com/viewtopic.php?p=51431
-----------------------
www.pippoflash.com
-----------------------
Post Reply