OpenSpace trying to leave a room a user isn't connected to

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

drh_qtm
Posts: 40
Joined: 15 Apr 2010, 09:07

OpenSpace trying to leave a room a user isn't connected to

Postby drh_qtm » 17 Mar 2011, 18:24

Hi I'm using OpenSpace 2 & SFS2x and have come across an issue where it appears that in a server extension that extends openspace and I try to use the sendAvatarToMap I get an error to say that the user can't be found in a room that it was previously connected to but is no longer. The work flow is as follows:

1) User connects to a openspace room (called en-maintown)
2) User connects to a different openspace (called en-firestation)
3) User then connects to a none openspace room called GameRoomA and is disconnected from the openspace room called firestation. I can see in the Admin tool that at this point the only room the user is connected to is GameRoomA
4) The client then attempts to join the openspace room called en-maintown again but the extension fires the following exception (some debug prior to the exception included):

18:15:06,296 DEBUG [ExtensionController-1] request.JoinRoomRequestHandler - connected rooms:[[ Room: GameRoomA, Id: 5, Group: Game, isGame: true ]]
18:15:06,296 INFO [com.smartfoxserver.v2.controllers.ExtensionController-1] utils.Logger - [OpenSpace] 'Send avatar to map' command received on behalf of user pwdtest [3]
18:15:06,296 INFO [com.smartfoxserver.v2.controllers.ExtensionController-1] utils.Logger - [OpenSpace] Map load request received from user pwdtest [3]
18:15:06,297 INFO [com.smartfoxserver.v2.controllers.ExtensionController-1] utils.Logger - [OpenSpace] Joining user pwdtest [3] to Room 'en-maintown' [4]
com.smartfoxserver.v2.exceptions.SFSRuntimeException: Can't remove user: ( User Name: pwdtest, Id: 3, Priv: 0, Sess: 0 ) , from: [ Room: en-firestation, Id: 13, Group: en-firestation, isGame: false ]
at com.smartfoxserver.v2.entities.managers.SFSRoomManager.removeUser(SFSRoomManager.java:442)


As you can see from the debug in the custom join handler the connected room is just the GameRoomA so I don't understand why it is trying to leave a room that it was connected to prior but not anymore. The code that is throwing the error is:

Code: Select all

log.debug("connected rooms:"+ user.getJoinedRooms());
ext.sendAvatarToMap(user, room.getId(), "");


It's as if openspace has some memory of the previous openspace room it was connected to but I'm not sure why this would be. If anyone has any idea what I'm doing wrong here it would be much appreciated [/code]
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 18 Mar 2011, 17:59

We will investigate this as soon as possible.
Paolo Bax
The SmartFoxServer Team
drh_qtm
Posts: 40
Joined: 15 Apr 2010, 09:07

Postby drh_qtm » 18 Mar 2011, 18:48

Hi Paolo

Many thanks, if you require any further information please let me know.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 19 Mar 2011, 13:13

We think we have found the bug and solved it.
If you want a pre-release version to test, please send us an email. If you own a retail version of OpenSpace, please send your purchase receipt.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 34 guests