Page 1 of 1

Spell Queueing locks server

Posted: Sun Aug 03, 2008 2:16 am
by John Adams
I built Faithful Swing and was testing it out. I didn't see the icon pop available again, so I hit it anyway... the cast bar filled, then locked, now I cannot do any commands in the World. It's still running, just no commands working.
I will try and reproduce it now.
(this was after a world restart and /reload spells)

Posted: Sun Aug 03, 2008 2:51 am
by John Adams
Ok, got the bug I think. Cast the spell, then while it's cooling down, tap it again. Soon as the cooldown finishes, the second (queued) attempt to cast fires off, and locks the World.
I know queuing is likely not working yet, I only discovered it out of habit.
I don't think it has to do with /reload spells.

Posted: Sun Aug 03, 2008 6:13 am
by LethalEncounter
I did setup queued spells and they used to work at one time, but you are right it seems like something is off. More than likely it is a Mutex that is blocking access to the spell and preventing further execution. I'll take a look at it.

Posted: Tue Aug 12, 2008 6:19 pm
by John Adams
Definitely, Queueing causes a server to lock solid - no activity, doesn't crash, so it cannot be reset. It's pretty critical, since we cannot rely on players to turn off button queueing in their clients.
However, there is that workaround for us, for now. Go to Options, Controls, Button Queue and disable that sucker. This also might only effect those of us using the new spells, since I don't think this happens with Attack or Sprint (the only spell anyone else gets).

Posted: Thu Aug 14, 2008 5:17 pm
by LethalEncounter
Fixed.

Posted: Thu Aug 14, 2008 7:03 pm
by John Adams
Sorry to say, not fixed yet. Just locked the server again. I will give you the spell I am using in your book, you can try it - but the server will be dead until I kill it and restart.

Posted: Fri Aug 15, 2008 2:18 pm
by John Adams
Either Scat cannot stop himself from queueing spells (LOL) or the server is locking solid for another reason. The last activity today was a few spell casts seemingly close together, a client disconnect, then a dozen or so more sapswill slaughters by the guards... and I cannot connect.
Says 1 Zone(s) active, 0 Client(s), and has been like that for hours. It's likely the queueing still, but just in case it's not, I wanted to update this post.
Resetting the server.

Posted: Fri Aug 15, 2008 3:09 pm
by LethalEncounter
I don't see how it could be the spell que. I cast Lightning Burst, it landed and I immediately cast it again. When the recast timer hit 0 it recast itself. I did this all several times chain casting it and I never had a problem.

Posted: Fri Aug 15, 2008 3:47 pm
by John Adams
I used Faithful Swing on my server, and it did queue and cast when the cooldown expired - however, immediately the cast bar froze and the server was fine'.
I think I gave you Faithful Swing, if it winds up being the spell settings, that's good. Spell ID 10000.

Posted: Fri Aug 15, 2008 3:54 pm
by Scatman
Yeah I was on it testing my quest out and everything was going well. Killed some mobs, and such. I exited the emulator by clicking the X in the top right hand corner then when I tried to log back on a few minutes later the server was locked! :cry:

Posted: Sun Aug 17, 2008 2:52 pm
by LethalEncounter
Could you try the same thing you did before to lock the server? I have fixed a couple of lock problems that were causing issues as well as a bug that might have been causing your crash problem. I don't think I ever explained the lock issue, but here it is: Since the lua scripts can be executed at any time and not in an orderly fashion Mutex (mutually exclusive) locks are used to prevent multiple threads from accessing the safe portion of the code at the same time. If for example, one thread was adding to the loop while it was being modified in another thread this could thrown exceptions or corrupt the data so that the exception is thrown later. The locks help prevent this. The problem comes in when I used a particular lock and then I decide to reuse a function from elsewhere that uses the same lock. This will cause the second lock to wait forever for the first lock to release itself. If it happened in the zone thread only that zone would be affected, but since it happened in the spells thread (which is global) is causes the whole server to lock up.

Posted: Sun Aug 17, 2008 3:44 pm
by John Adams
Naw, still seems to be an issue - though it is a little better. The server did not entirely lock up - but refused new connections and further actions in the zone could not be executed (ie., could not cast spells, attack, but chatting worked).
When Scatman and I logged out to reset our clients, we could not get back to the server until I restarted it.

Posted: Mon Aug 18, 2008 7:18 pm
by John Adams
Definite progress made in this bug. I'll let it sit open for a while longer while we dev more spells.
Nice work, LE.