Jump to content

[9606] Causes client freezes


Alex

Recommended Posts

Rev. [9606] (send packed caster GUID) causes client freezes.

How to reproduce:

1. Create mage.

2. Up his level to 80 (any will do as long as you can tick all talents in step 3).

3. Tick all the talents in Arcane (dont up max, just one tick at each will do, except for the chains).

4. Up Missile Barrage talent to the max.

5. Learn all mage spells from any mage trainer.

6. .go xyz 6701 1144 275 571

7. There will be many skeletons and other undead here, start attacking using just Arcane Missiles (rarely) and Arcane Blast (most often).

8. Arcane Blast will produce some Missile Barrage events with time, and eventually the client will freeze at Arcane Blast cast.

I could not debug this any further, but probably sending packed caster GUID for some spells is incorrect causing these freezes. Reverting 9606 solves this.

Link to comment
Share on other sites

Please try this patch and test if the functionality still is as it should be and if the crashes are gone:

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 3ee1892..56ba367 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1029,7 +1029,7 @@ void Aura::_AddAura()
        if(slot < MAX_AURAS)                        // slot found send data to client
        {
            SetAura(false);
-            SetAuraFlags((1 << GetEffIndex()) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE));
+            SetAuraFlags((1 << GetEffIndex()) | ((GetCasterGUID() == GetTarget()->GetGUID()) ? AFLAG_NOT_CASTER : AFLAG_NONE) | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE));
            SetAuraLevel(caster ? caster->getLevel() : sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL));
            SendAuraUpdate(false);
        }

Link to comment
Share on other sites

I'll check that function, but please also test the above patch.

EDIT: Also, here's QAston's patch to fix appendPackGUID:

diff --git a/src/shared/ByteBuffer.h b/src/shared/ByteBuffer.h
index eec35c8..152917f 100644
--- a/src/shared/ByteBuffer.h
+++ b/src/shared/ByteBuffer.h
@@ -385,21 +385,22 @@ class ByteBuffer

        void appendPackGUID(uint64 guid)
        {
-            if (_storage.size() < _wpos + sizeof(guid) + 1)
-                _storage.resize(_wpos + sizeof(guid) + 1);
-
-            size_t mask_position = wpos();
-            *this << uint8(0);
-            for(uint8 i = 0; i < 8; ++i)
+            uint8 packGUID[8+1];
+            packGUID[0] = 0;
+            size_t size = 1;
+            for (uint8 i = 0; guid != 0; ++i)
            {
                if(guid & 0xFF)
                {
-                    _storage[mask_position] |= uint8(1 << i);
-                    *this << uint8(guid & 0xFF);
+                    packGUID[0] |= uint8(1 << i);
+                    packGUID[size] =  uint8(guid & 0xFF);
+                    ++size;
                }

                guid >>= 8;
            }
+
+            append(packGUID, size);
        }

        void put(size_t pos, const uint8 *src, size_t cnt)

Link to comment
Share on other sites

Actually if you enter any instance and use group spells, or some area effect spells while you are grouped, freezes the client. Not really sure how to repeat it, but I can confirm. My testers said they only disconnected in instance.

Can you try to give me an exact way to reproduce this? Would be much easier to check that way... Also, try the two patches I posted above.
Link to comment
Share on other sites

Thanks for the testing, guys. If possible, try to get some more info on when/how the (much less frequent) freezes happen.

I dont know if this is related to this bug but i have some problem with memory increase by time , so how longer the server online the memory increase , with 10% each hour and without increasing player amount.

Not related.
Link to comment
Share on other sites

Can you try to give me an exact way to reproduce this? Would be much easier to check that way... Also, try the two patches I posted above.

I just apply patches on my server, will see.

I was grouping with them, but I was outside of the instance. They were doing Instructor Razuvious in Naxx and I saw half of them dropped. They said they just casted Prayer of Fortitude.

Link to comment
Share on other sites

Applied both patches. Still freezing. It's probably better to revert [9606] now and then search for a solution.

The exact way to reproduce the freeze easy and fast is stated in the first post. If someone here is acquainted with client debugging, it's a way to go.

Link to comment
Share on other sites

Applied both patches. Still freezing. It's probably better to revert [9606] now and then search for a solution.

The exact way to reproduce the freeze easy and fast is stated in the first post. If someone here is acquainted with client debugging, it's a way to go.

If you revert [9606] most people will stop looking for the solution lol

and if don't want to mess with git and you need it working now you can always open text editor and set it the way it was only 3 lines :)

Link to comment
Share on other sites

Cant figure that out either... hmmm... it seems that the two patches XTZGZoReX listed seems to lower raiding/creep killing related freezes to a minimum BUT in pvp it seems just the same.. or slightly reduced. Who zone froze with the patches listed while pvp was going on. Sometimes there is also a freeze when character is killed, or just before character is killed that was not there before, when this happens.. long freeze for the character being killed but the killer seems fine.

Link to comment
Share on other sites

If you revert [9606] most people will stop looking for the solution lol

and if don't want to mess with git and you need it working now you can always open text editor and set it the way it was only 3 lines :)

I had it reverted and working just before I've opened this thread :) If you revert [9606], most people will stop crying "ARGH! CLIENT FREEZE! WHAT THE FUCK?", and those who know may peacefully look for the solution using bug report.

---

According to the reports, client does not expect having GUID every time there. There must be cases when it is zero. Note: this mostly affect aura triggered spells. May be aura triggered spells must have zero as a caster GUID?

It's not arcane blast. It's this 'missile barrage available' effect causing hang. Something is amiss here.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use