Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CRITICAL BUG] Client freeze on vehicles #163

Closed
xfurry opened this issue Mar 31, 2013 · 0 comments
Closed

[CRITICAL BUG] Client freeze on vehicles #163

xfurry opened this issue Mar 31, 2013 · 0 comments
Labels
Expansion: WotLK (3.3.5) Issues relating to the WotLK Expansion (3.3.5).

Comments

@xfurry
Copy link
Member

xfurry commented Mar 31, 2013

During the scripting process of Pit of Saron, (see latest commits on SD: https://github.com/scriptdev2/scriptdev2/commits/master), I encountered many client crashes which were happening because of vehicles.

How to reproduce:

  1. Pull and build the latest core and SD2
  2. Use UDB as database
  3. Go to the Pit of Saron instance entrance
  4. After entering the instance use the following commands: .gm fly on, .modify aspeed 10
  5. Then fly straight to Krick or Tyrannus with full speed (see their location here http://www.wowhead.com/zone=4813)
  6. Client will crash at the moment when the vehicle get in the visible range.
  7. If I reload the client and reenter the game, I will be restored in the exact point where the client crashed, but everything will work just fine. So I think it's related to the first vehicle load on the map.
    PS. This happened with the patch posted below applied, and it happened almost like every time I tried the scenario above. However it won't happen if the player is saved in the visible range of the vehicle at the first login.

I have a patch which will fix some of the crashes, due to vehicles trying to board dead passenger.
However this will not fix all issues!:

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 9d72290..7033680 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -5876,6 +5876,12 @@ SpellCastResult Spell::CheckCast(bool strict)
             }
             case SPELL_AURA_CONTROL_VEHICLE:
             {
+                if (!m_caster->isAlive())
+                    return SPELL_FAILED_CASTER_DEAD;
+
+                if (!expectedTarget->isAlive())
+                    return SPELL_FAILED_TARGETS_DEAD;
+
                 if (m_caster->HasAuraType(SPELL_AURA_MOUNTED))
                     return SPELL_FAILED_NOT_MOUNTED;

Any feedback is appreciated.

xfurry referenced this issue in cmangos/mangos-wotlk Apr 7, 2013
It appears it is possible for the client freezes if movement of stunned mobs is sent (combined flags of SPLINE_ENABLED and SPLINE_ROOTED).
This fix cannot be considered proper, but there should be no sideeffects.

HUGE thanks for kid10 figuring the source of some of these freezes by manually testing individual commits.
Unexpected source(*) is [12225] (ec67729)

(*) Well, the thing that made these freezes visual... - I consider these source to be older and much better hidden!
@xfurry xfurry closed this as completed Apr 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expansion: WotLK (3.3.5) Issues relating to the WotLK Expansion (3.3.5).
Projects
None yet
Development

No branches or pull requests

1 participant