Page 1 of 1

Ghost room

Posted: 14 Dec 2011, 06:11
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;
	}

Posted: 14 Dec 2011, 10:32
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

Posted: 15 Dec 2011, 01:18
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?

Posted: 15 Dec 2011, 09:11
by Lapo
Sounds strange, does this happen in your local environment?

Posted: 16 Dec 2011, 04:01
by king3200
Lapo wrote:Sounds strange, does this happen in your local environment?
never happen in local environment...

Posted: 03 Jan 2012, 10:08
by Bax
Thanks for the details you sent by email, but we are still unable to reproduce this issue :(