||unity-dev|| Bug? Unity wasn't reporting all the created rooms. Restart fixed the problem.

Discussion list for Unity developers. unity-dev at moock.org
Thu Jun 7 10:48:59 CDT 2007


I never noticed this issue specifically, but the way I coded my application
would have avoided it anyway...basically I ALWAYS call createRoom, and if
it's either successfull, or already exists, then I attempt to join.

-David R

On 6/7/07, Discussion list for Unity developers. <unity-dev at moock.org>
wrote:
>
>
>
> Hey guys,
>
>
>
>
>
> I ran into another problem (bug?) with Unity the other
> day.  I've got an app that has multiple
> chat rooms. These rooms are created dynamically and are persistent once
> everyone leaves the room.   So basically,
> after a Unity server restart, there are no rooms yet and the first time
> someone
> joins a room it's created and stays around for good. So, once a client
> connects
> to the server and creates the namespace, Unity tells the client what rooms
> exist on in that namespace.
>
>
>
>
>
> The problem I ran into was that Unity got into a state where about 25% of
> the time the server
> would not report all the rooms that were in that namespace. Specifically,
> I had
> the following rooms; chat, blue, red, red32, green. (I did NOT create the
> rooms
> in this order. I believe they were created in the order green, blue red,
> chat,
> red32.) Watching the output window in Studio 8, Unity would normally
> report all
> the rooms in that order every time (output below)
>
>
> DEBUG: RoomManager now adding
> NameSpace: server1
>
>
> DEBUG: UClient notified of new
> NameSpace object: 'server1'.
>
>
> DEBUG: NameSpace 'server1' added
> listener: A NamespaceView instance
>
>
> DEBUG: Room factory for NameSpace
> 'server1' set to: LocationRoomFactory
>
>
> DEBUG: NameSpace 'server1'
> notifying observers of new room: 'chat'.
>
>
> DEBUG: NameSpace 'server1'
> notifying observers of new room: 'blue'.
>
>
> DEBUG: NameSpace 'server1'
> notifying observers of new room: 'red'.
>
>
> DEBUG: NameSpace 'server1'
> notifying observers of new room: 'red32'.
>
>
> DEBUG: NameSpace 'server1'
> notifying observers of new room: 'green'.
>
>
>
>
>
> However, I got to a point where Unity would not report the
> first 2 rooms; chat and blue. So it would just tell me the following
>
>
> DEBUG: RoomManager now adding
> NameSpace: server1
>
>
> DEBUG: UClient notified of new
> NameSpace object: 'server1'.
>
>
> DEBUG: NameSpace 'server1' added
> listener: A NamespaceView instance
>
>
> DEBUG: Room factory for NameSpace
> 'server1' set to: LocationRoomFactory
>
>
> DEBUG: NameSpace 'server1'
> notifying observers of new room: 'red'.
>
>
> DEBUG: NameSpace 'server1'
> notifying observers of new room: 'red32'.
>
>
> DEBUG: NameSpace 'server1'
> notifying observers of new room: 'green'.
>
>
>
>
>
> My code would think the chat and blue rooms hadn't been
> created yet. So when I wanted to join one of these rooms, my code would
> call
> the createRoomOnServer to which Unity would reply with a
> ROOM_ALREADY_EXISTS.
> But… the namespace instance did not have those 2 rooms in its room list.
> So it
> was impossible for me to join them as I could not get an instance of the
> rooms
> (e.g. ns.getRoom("blue") would return null).
>
>
>
>
>
> Like I said this was happening about 25% of the time I
> connected and was happening with different apps as well. So I restarted
> the server
> and all was well.
>
>
>
> Has anyone else
> experienced anything like this?  I'm pretty sure it was a server side
> issue and not a flash issue because I was seeing it in multiple
> flash apps. Is there something that would cause this? Notice I do have a
> custom
> URoom (Flash side, not server side). Not sure if that is relevant or not.
>
>
>
>
>
> Also, how does Unity decide what order to store these rooms
> on the server?  If I create rooms in the
> order green, blue, red, the next time I run the app and create the
> namespace,
> Unity always reports back with the rooms in the order blue, red, green.
> i.e.
>
>
> DEBUG: NameSpace 'server1'
> notifying observers of new room: 'blue'.
>
>
> DEBUG: NameSpace 'server1'
> notifying observers of new room: 'red'.
>
>
> DEBUG: NameSpace 'server1'
> notifying observers of new room: 'green'.
>
>
>
>
>
> Sorry, for the super long email
> but I would appreciate any input as this would be a big problem for me if
> it
> happens regularly.
>
>
>
>
>
>
> Thanks,
> Derek
>
>
>
> --
> you're a unity-dev subscriber. to unsubscribe, visit
> www.moock.org/mailman/listinfo/unity-dev/
>
> superb hosting for this list and moock.org is generously provided by
> Rackspace. See: http://www.rackspace.com/?supbid=moock
>


More information about the unity-dev mailing list