Welcome to the RaGEZONE - MMORPG development forums.

How to fix 5page pet crash permanently.

This is a discussion on How to fix 5page pet crash permanently. within the SilkRoad Releases forums, part of the SilkRoad Online category; As i see, nobody shared a permanent fix for it, so here we go: First of all, we create a ...

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Member
    Rank
    Member
    Join Date
    Nov 2011
    Posts
    92
    Liked
    34

    How to fix 5page pet crash permanently.

    Click
    As i see, nobody shared a permanent fix for it, so here we go:

    First of all, we create a table, just to be able to add more exceptions easily:

    Spoiler:
    PHP Code:
    USE [SRO_VT_SHARD]
    GO

    /****** Object:  Table [dbo].[_Exceptionz]    Script Date: 07/29/2012 02:54:31 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    CREATE TABLE 
    [dbo].[_Exceptionz](
        [
    ID] [intNULL
    ON [PRIMARY]

    GO 


    Till my theory is that the attack pets causes the error, till they have no pages, but the stored procedure trying to add 5 pages to it too, we have to insert the grabpets to the _Exceptionz table:

    Spoiler:
    PHP Code:
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_MYOWON%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_SEOWON%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_RABBIT%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_SPOT_RABBIT%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_RABBIT_SILK%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_GOLDPIG%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_PINKPIG%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_GGLIDER%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_CAT%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_RACCOONDOG%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_BROWNIE%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_WINTER_SNOWMAN%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_GHOST%'))
    insert into _Exceptionz (IDvalues ((select ID from _RefObjCommon where CodeName128 like 'COS_P_CIRCUSBEAR%')) 


    We have the _Exceptionz table, now we have to edit the procedure, to make a difference between grabpets (which are in the Exceptionz table) and the attack pets:

    Spoiler:
    PHP Code:
    USE [SRO_VT_SHARD]
    GO
    /****** Object:  StoredProcedure [dbo].[_AddNewCOS]    Script Date: 07/29/2012 02:35:06 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO


    ALTER PROCEDURE 
    [dbo].[_AddNewCOS]
        @
    OwnerCharID    int,
        @
    RefObjID    int,
        @
    Level        int,
        @
    HP        int,
        @
    MP        int,
        @
    HGP        int,
        @
    KeeperNPC    int,
        @
    State        int,
        @
    InventorySize  int,
        @
    itemID        int,
        @
    PickItemConfig tinyint,
        @
    RentEndTime     smalldatetime
    as

    begin tran

        
    declare @COS_ID    int
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --        
    pet_skill_item (AÖ1±EL)        
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

        declare @
    MaxInventorySize tinyint
        select 
    @MaxInventorySize InventorySize
        from _RefObjCommon
    _RefObjChar
        where _RefObjCommon
    .ID = @RefObjID and _RefObjCommon.Link _RefObjChar.ID
        
        
    if( @@rowcount or @MaxInventorySize < @InventorySize )
        
    begin
            rollback tran
            
    return -5
        end

        insert into _CharCOS values 
    (@OwnerCharID, @RefObjID, @HP, @MP, @KeeperNPC, @StateNULL, @Level0, @HGP, @PickItemConfig, @RentEndTime)
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
        
    set @COS_ID = @@identity
        
    if (@COS_ID OR @@error <> 0)
        
    begin
            rollback tran
            
    return -1
        end

    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --        
    pet_skill_item (AÖ1±EL)        
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
        if (@
    MaxInventorySize 0)
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
        
    begin
            
    declare @Slot  int
            set 
    @Slot 0
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --        
    pet_skill_item (AÖ1±EL)        
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            while (@
    Slot < @MaxInventorySize)
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            
    begin
                insert into _InvCOS values
    (@COS_ID, @Slot0)
                if (@@
    error <> 0)
                
    begin
                    
    -- AÎoYA丮 »ý1o 1ÇA?!
                    
    rollback tran
                    
    return -2
                end    
            
                set 
    @Slot = @Slot 1
            end
        end
        
    /*    --´o AI»ó AI ÄA·3?!´Â µYAIA͸¦ 3ÖÁö 3E´Â´U!
        UPDATE _Char SET EngagedCOS = @COS_ID WHERE CharID = @OwnerCharID
        IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
        BEGIN
            ROLLBACK TRANSACTION
            RETURN -3
        END
    */
        
    if( @itemID <> )
        
    begin
            update _Items set Data 
    = @COS_ID where ID64 = @itemID
            
    if( @@error <> or @@rowcount )
            
    begin
                rollback transaction
                
    return -4
            end
      
            
    if ((SELECT COUNT(*) FROM _Exceptionz where ID=@RefObjID) = 1)
      
    begin
       
    --BEGIN ADDITIONAL 112 SLOT IN GRAB PETS FOR 7684 DAYS
       
    declare @Serial64 bigint
       select 
    @Serial64 Serial64 from _Items where Data = @COS_ID
       exec _AddTimedJobForPet 
    @COS_ID,5,22926,1992999999,1111708465,1,112,0,0,0,0,0,@Serial64
       
    --BEGIN ADDITIONAL 112 SLOT IN GRAB PETS FOR 7684 DAYS
      end
       end

        commit tran

    return @COS_ID 


    The last thing we have to do is cleaning out the "dirty" pets from _TimedJobForPet table:

    Spoiler:
    PHP Code:
    use SHARD
    delete from _TimedJobForPet where CharID in 
    (select ID from _CharCOS where RefCharID in (select ID from _RefObjCommon where codename128 like 'COS_P_WOLF_01%'))
    delete from _TimedJobForPet where CharID in (select ID from _CharCOS where RefCharID in (select ID from _RefObjCommon where codename128 like 'COS_P_WOLF_02%'))
    delete from _TimedJobForPet where CharID in (select ID from _CharCOS where RefCharID in (select ID from _RefObjCommon where codename128 like 'COS_P_WOLF_03%'))
    delete from _TimedJobForPet where CharID in (select ID from _CharCOS where RefCharID in (select ID from _RefObjCommon where codename128 like 'COS_P_WOLF_04%'))
    delete from _TimedJobForPet where CharID in (select ID from _CharCOS where RefCharID in (select ID from _RefObjCommon where codename128 like 'COS_P_JINN%'))
    delete from _TimedJobForPet where CharID in (select ID from _CharCOS where RefCharID in (select ID from _RefObjCommon where codename128 like 'COS_P_RAVEN%'))
    delete from _TimedJobForPet where CharID in (select ID from _CharCOS where RefCharID in (select ID from _RefObjCommon where codename128 like 'COS_P_PENGUIN%'))
    delete from _TimedJobForPet where CharID in (select ID from _CharCOS where RefCharID in (select ID from _RefObjCommon where codename128 like 'COS_P_KANGAROO%'))
    delete from _TimedJobForPet where CharID in (select ID from _CharCOS where RefCharID in (select ID from _RefObjCommon where codename128 like 'COS_P_BEAR%'))
    delete from _TimedJobForPet where CharID in (select ID from _CharCOS where RefCharID in (select ID from _RefObjCommon where codename128 like 'COS_P_FOX%')) 


    Thats all. Added descriptions, just if anybody care about what causes the error. If a permanent fix has been released, please delete this thread.

    Edit: It works on my server since 1 or 2 months.

    Credits: Me, for the idea/tables and Chern0byl for the stored procedure edit/help.
    Last edited by Dizzie; 29-07-12 at 01:58 AM.
    We live on a world where smart people are called nerds and social outcasts, and stupid people are the cool ones.
    The most common error: "The user's IQ is too low"
    [SIGPIC][/SIGPIC]

  2. #2
    SilkRoad
    Rank
    Member +
    Join Date
    Sep 2011
    Location
    Jangan
    Posts
    357
    Liked
    5

    Re: How to fix 5page pet crash permanently.

    (ID) pet ID write ?

  3. #3
    Member
    Rank
    Member
    Join Date
    Nov 2011
    Posts
    92
    Liked
    34

    Re: How to fix 5page pet crash permanently.

    My bad, edited. Delete the table and it will work.
    We live on a world where smart people are called nerds and social outcasts, and stupid people are the cool ones.
    The most common error: "The user's IQ is too low"
    [SIGPIC][/SIGPIC]

  4. #4
    Ultimate Member
    Rank
    Member
    Join Date
    Dec 2011
    Posts
    176
    Liked
    9

    Re: How to fix 5page pet crash permanently.

    C++ in GameServer Fixed ?
    Keep learing !!
    its the right way to success fail thing's to learn from what u failing
    Atlantis Sro D10 CaP

  5. #5
    Member
    Rank
    Member
    Join Date
    Nov 2011
    Posts
    92
    Liked
    34

    Re: How to fix 5page pet crash permanently.

    Well, if pets causing the c++ then yes. In our server pet bug caused c++ error, but something else can cause it too.
    We live on a world where smart people are called nerds and social outcasts, and stupid people are the cool ones.
    The most common error: "The user's IQ is too low"
    [SIGPIC][/SIGPIC]

  6. #6
    Ultimate Member
    Rank
    Member
    Join Date
    Dec 2011
    Posts
    176
    Liked
    9

    Re: How to fix 5page pet crash permanently.

    we can talk if u got skype then buddy !
    i know the C++ can be from low ram and alot of spawn in refnest !
    but pet was making that when i did an old query its take time like 7 days then the C++ problem start
    Keep learing !!
    its the right way to success fail thing's to learn from what u failing
    Atlantis Sro D10 CaP

  7. #7
    Developer
    Rank
    Member +
    Join Date
    Oct 2011
    Posts
    579
    Liked
    275

    Re: How to fix 5page pet crash permanently.

    great release, thanks for it
    I just modified this:
    PHP Code:
    if ((SELECT COUNT(*) FROM _Exceptionz where ID=@RefObjID) = 1
    to this:
    PHP Code:
    IF EXISTS (SELECT ID FROM _Exceptionz WHERE ID=@RefObjID
    looked a bit faster ^^

  8. #8
    #Yummi.sql
    Rank
    Member +
    Join Date
    Sep 2011
    Location
    Germany
    Posts
    409
    Liked
    269

    Re: How to fix 5page pet crash permanently.

    (use the TypeID's of _RefObjCommon to indentify pets as grab ones, the additional table is redundant)
    I dun like Signatures, they're always confusing me while reading a thread!

  9. #9
    Delta Subscription
    Rank
    Subscriber
    Join Date
    Dec 2010
    Location
    France
    Posts
    121
    Liked
    14

    Re: How to fix 5page pet crash permanently.

    This is don't will works because bug was form if you add a blue on item like int or str and put it directly after into your pet!

    5page will down to 1 and crash the server!
    this is what we have see about this error here

  10. #10
    Learning PHP *-*
    Rank
    Member +
    Join Date
    Nov 2011
    Location
    Brazil
    Posts
    646
    Liked
    404

    Re: How to fix 5page pet crash permanently.

    testing

  11. #11
    Delta Subscription
    Rank
    Subscriber
    Join Date
    Dec 2010
    Location
    France
    Posts
    121
    Liked
    14

    Re: How to fix 5page pet crash permanently.

    result ? :)

    everytime i put a blue item after alchemy on pet this crash the server tryed on different server too

  12. #12
    In the Emperor name
    Rank
    Member +
    Join Date
    Jun 2011
    Location
    Balcora Gate
    Posts
    789
    Liked
    101

    Re: How to fix 5page pet crash permanently.

    wanted to test this bug on a 5 page pet, item +3 , with 6 blues on it (int/str/astral/immortal/block/hp) tried on every row on the 5 pages and server dont crash.
    i dont believe my lame test server is inmune to that bug, so what im doing wrong?
    the illusion of friendship is the begining of heresy.

  13. #13
    Delta Subscription
    Rank
    Subscriber
    Join Date
    Dec 2010
    Location
    France
    Posts
    121
    Liked
    14

    Re: How to fix 5page pet crash permanently.

    when is done trade the pet whit a another char ;)

    Relog and see :)

  14. #14
    Learning PHP *-*
    Rank
    Member +
    Join Date
    Nov 2011
    Location
    Brazil
    Posts
    646
    Liked
    404

    Re: How to fix 5page pet crash permanently.

    test fail game server run time error :)

  15. #15
    Delta Subscription
    Rank
    Subscriber
    Join Date
    Dec 2010
    Location
    France
    Posts
    121
    Liked
    14

    Re: How to fix 5page pet crash permanently.

    yes the error was here, when you do a alchemy on item (blue) put on pet and trade pet = crash runtime C++ error

    We have tempory bloked it by bloking grab pet possibility and working to fix it into gameserver in dedi test :)

    If we found something static we will try to release it ;)

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •