Ghost room

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
king3200
Posts: 25
Joined: 28 Oct 2010, 01:48

Ghost room

Post by king3200 »

Image
Image
:cry:
this problem cropped up every day... and when I use zone.getRoomByName() , but only get one of them. I try to get one and destory, then getRoomByName(), it returns null...the ghost room has own room extension and variables... can you explain this case??

here is my create room code:

Code: Select all

public static Room createNewRoom(String roomId, Zone exitZone) throws IOException{
		
		JSONObject roomInfo = getRoomInfo(roomId);
		int maxUser = roomInfo.getInt("maxUser");
//		int maxUser = 1000;
		
		CreateRoomSettings newRoomSets = new CreateRoomSettings();
		newRoomSets.setName(roomId);
		newRoomSets.setPassword("");
		newRoomSets.setMaxUsers(maxUser);
		newRoomSets.setMaxSpectators(0);
		newRoomSets.setDynamic(true);
		newRoomSets.setGame(false);
		newRoomSets.setHidden(false);
		newRoomSets.setAutoRemoveMode(SFSRoomRemoveMode.WHEN_EMPTY);
		newRoomSets.setUseWordsFilter(true);
		newRoomSets.setExtension(new RoomExtensionSettings("boExt", "com.bo.extension.serverevt.RoomExtensionMain"));
		newRoomSets.setMaxVariablesAllowed(20);

		List<RoomVariable> rv = initRoomVariableList(roomInfo);
		newRoomSets.setRoomVariables(rv);

		Room newRoom = null;
		try {
			newRoom = ((ExtensionMain) exitZone.getExtension()).getApi().createRoom(exitZone, newRoomSets, null);
			newRoom.setActive(true);
		} catch (SFSCreateRoomException e) {
			((SFSExtension) exitZone.getExtension()).trace(e.getMessage());
		}
		return newRoom;
	}
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Is this something that can be reproduced at will?
If so, please list the steps to see it in action.
Read this, in order to send us a complete bug report:
http://smartfoxserver.com/support.php
Lapo
--
gotoAndPlay()
...addicted to flash games
king3200
Posts: 25
Joined: 28 Oct 2010, 01:48

Post by king3200 »

Lapo wrote:Is this something that can be reproduced at will?
If so, please list the steps to see it in action.
Read this, in order to send us a complete bug report:
http://smartfoxserver.com/support.php
It's hard to reproduced...... in the test environment, it works all right~~
my normal program flow:
1: a user login with a room name
2: in join zone extension, find that room, if null, create one
3: let user join this new room, create two new npcs and join.

May be the cause of the concurrent login user?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Sounds strange, does this happen in your local environment?
Lapo
--
gotoAndPlay()
...addicted to flash games
king3200
Posts: 25
Joined: 28 Oct 2010, 01:48

Post by king3200 »

Lapo wrote:Sounds strange, does this happen in your local environment?
never happen in local environment...
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Thanks for the details you sent by email, but we are still unable to reproduce this issue :(
Paolo Bax
The SmartFoxServer Team
Post Reply