Mercury give DC various users.

Results 1 to 3 of 3
  1. #1
    Member smatch is offline
    MemberRank
    Oct 2012 Join Date
    MontrealLocation
    74Posts

    angry Mercury give DC various users.

    Hi,

    The errors:

    Error.log:

    Error en thread Room cycle task for room 29060:
    System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
    at System.Collections.Generic.HashSet`1.Enumerator.MoveNext()
    at Mercury.HabboHotel.Rooms.RoomManager.UnloadRoom(Room Room) in C:\Users\Administrator\Desktop\Emulador\HabboHotel\Rooms\RoomManager.cs:line 629
    at Mercury.HabboHotel.Rooms.Room.ProcessRoom() in C:\Users\Administrator\Desktop\Emulador\HabboHotel\Rooms\Room.cs:line 772


    Error en thread Room cycle task for room 23712:
    System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
    at System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator.MoveNext()
    at Mercury.HabboHotel.Rooms.RoomUserManager.OnCycle(Int32& idleCount) in C:\Users\Administrator\Desktop\Emulador\HabboHotel\Rooms\RoomUserManager.cs:line 1293
    at Mercury.HabboHotel.Rooms.Room.ProcessRoom() in C:\Users\Administrator\Desktop\Emulador\HabboHotel\Rooms\Room.cs:line 757
    Exceptionlog:

    Exception logged 11/27/2014 10:08:03 PM in Room.SqAbsoluteHeight:
    System.NullReferenceException: Object reference not set to an instance of an object.
    at Mercury.HabboHotel.Items.RoomItem.get_TotalHeight() in C:\Users\Administrator\Desktop\Emulador\HabboHotel\Items\RoomItem.cs:line 143
    at Mercury.HabboHotel.Rooms.Gamemap.SqAbsoluteHeight(Int32 X, Int32 Y, List`1 ItemsOnSquare) in C:\Users\Administrator\Desktop\Emulador\HabboHotel\Rooms\Gamemap.cs:line 981
    Source:
    Mercury
    Data:
    Message:
    Object reference not set to an instance of an object.
    Stack trace:
    at Mercury.HabboHotel.Items.RoomItem.get_TotalHeight() in C:\Users\Administrator\Desktop\Emulador\HabboHotel\Items\RoomItem.cs:line 143
    at Mercury.HabboHotel.Rooms.Gamemap.SqAbsoluteHeight(Int32 X, Int32 Y, List`1 ItemsOnSquare) in C:\Users\Administrator\Desktop\Emulador\HabboHotel\Rooms\Gamemap.cs:line 981
    THIS IS ROOM.CS INVOID FOR ERROR LINE 772:
    internal void ProcessRoom()
    {
    try
    {
    if (isCrashed || mDisposed)
    return;
    try
    {
    int idle = 0;
    GetRoomItemHandler().OnCycle();
    GetRoomUserManager().OnCycle(ref idle);

    if (idle > 0)
    {
    IdleTime++;
    }
    else
    {
    IdleTime = 0;
    }

    if (!mCycleEnded)
    {
    if (this.IdleTime >= 60/* && usersQueueToEnter.Count == 0*/)
    {
    MercuryEnvironment.GetGame().GetRoomManager().UnloadRoom(this);
    return;
    }
    else
    {
    ServerMessage serverMessage = this.GetRoomUserManager().SerializeStatusUpdates(false);

    if (serverMessage != null)
    SendMessage(serverMessage);
    }
    }

    if (gameItemHandler != null)
    gameItemHandler.OnCycle();
    if (game != null)
    { game.OnCycle(); }
    if (GotBanzai())
    { banzai.OnCycle(); }
    if (GotSoccer())
    { soccer.OnCycle(); }
    roomUserManager.UserList.OnCycle();

    GetWiredHandler().OnCycle();
    WorkRoomKickQueue();
    }
    catch (Exception e)
    {
    OnRoomCrash(e);
    }
    }
    catch (Exception e)
    {
    Logging.LogCriticalException("Sub crash in room cycle: " + e.ToString());
    }
    }
    This only happens when many users try to enter the room.
    Multiple users take dc.
    Thxa.
    Last edited by smatch; 28-11-14 at 12:23 AM.


  2. #2
    Elite Member Lancey is offline
    Member +Rank
    Apr 2013 Join Date
    131Posts

    Re: Mercury give DC various users.

    check whats in C:\Users\Administrator\Desktop\Emulador\HabboHotel\Items\RoomItem.cs line 143

  3. #3
    Member smatch is offline
    MemberRank
    Oct 2012 Join Date
    MontrealLocation
    74Posts

    Re: Mercury give DC various users.

    Quote Originally Posted by Lancey View Post
    check whats in C:\Users\Administrator\Desktop\Emulador\HabboHotel\Items\RoomItem.cs line 143
    this:
    internal double TotalHeight
    {
    get
    {
    if (this.GetBaseItem().StackMultipler && !string.IsNullOrWhiteSpace(this.ExtraData))
    {
    int num = Convert.ToInt32(this.ExtraData);
    return this.mZ + Convert.ToDouble(this.GetBaseItem().ToggleHeight[num]);
    }
    return this.mZ + this.GetBaseItem().Height;
    }
    }
    I have edited this in GameClientMessageHandler.cs for fix the room visits.
    More now give dc in users. lol.

    this.Session.GetHabbo().LoadingChecksPassed = true;
    queuedServerMessage.addBytes(this.LoadRoomForUser().getPacket);
    queuedServerMessage.sendResponse();
    using (IQueryAdapter dbClient = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
    dbClient.runFastQuery("INSERT INTO user_roomvisits (user_id,room_id,entry_timestamp,exit_timestamp,hour,minute) VALUES ('" + Session.GetHabbo().Id + "','" + Id + "','" + MercuryEnvironment.GetUnixTimestamp() + "','0','" + DateTime.Now.Hour + "','" + DateTime.Now.Minute + "');" + "UPDATE user_stats SET RoomVisits = RoomVisits + 1 WHERE id = " + Session.GetHabbo().Id);

    if (this.Session.GetHabbo().RecentlyVisitedRooms.Contains(room2.RoomId))
    {
    this.Session.GetHabbo().RecentlyVisitedRooms.Remove(room2.RoomId);
    }
    Last edited by smatch; 28-11-14 at 12:46 AM.



Advertisement