|
Thinjon100 Apprentice
Joined: 12 Jul 2004 Posts: 190 Location: Canada
|
Posted: Fri Sep 28, 2007 10:52 pm
[2.04] Something is killing triggers |
This has changed since 2.03. The triggers worked fine in 2.03, but now there is some odd behavior somewhere that is (at least temporarily) killing my triggers that I use for capturing, subbing, and coloring lines.
I haven't determined a pattern for failure yet, and the failures appear to be temporary... for a few minutes none of my triggers will work, but after a while they will resume operation.
Checking #THREAD doesn't show anything that didn't appear in 2.03. I am curious why it always shows the last trigger that did execute in one of my capture windows, with a status of "stopped" (even though the trigger is completely done executing). If I #STOP the above-mentioned trigger, I get a crash on my next text received from the MUD... but that I'm going to try to test a bit more and put another post up for. |
|
_________________ If you're ever around Aardwolf, I'm that invisible guy you can never see. Wizi ftw! :) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Sep 28, 2007 11:26 pm |
If #THREAD is showing any stopped triggers, then there is definitely a problem. Stopped triggers are supposed to be closed automatically, and if they don't, then that indicates that there is still some problem processing the Windows messages that terminate the thread.
Not sure on the triggers. I haven't seen that yet myself and I don't think I changed anything that would cause that. Double check to make sure your triggers and patterns all still compile, since there were some parser changes from the | character problems. |
|
|
|
Thinjon100 Apprentice
Joined: 12 Jul 2004 Posts: 190 Location: Canada
|
Posted: Fri Sep 28, 2007 11:47 pm |
I know they're compiling, because half the time the triggers are working properly. The other half they do nothing at all.
The "stopped" trigger has been showing up since I upgrades to 2.0x. I'm not sure exactly WHY it shows up... the triggers aren't anything spectacular, they color the line and call an alias.
I'm currently disabling small subsets of triggers to see if any of the triggers I'm running are causing the failures. |
|
_________________ If you're ever around Aardwolf, I'm that invisible guy you can never see. Wizi ftw! :) |
|
|
|
Thinjon100 Apprentice
Joined: 12 Jul 2004 Posts: 190 Location: Canada
|
Posted: Sat Sep 29, 2007 12:07 am |
Quote: |
If #THREAD is showing any stopped triggers, then there is definitely a problem. Stopped triggers are supposed to be closed automatically, and if they don't, then that indicates that there is still some problem processing the Windows messages that terminate the thread. |
I just tested a theory... it seems if I execute #THREAD from one window, it shows the last activity for any other window as well. I.E.:
In my main window - Xantcha: #THREAD:
Code: |
Threads:
# ID Window Name Status Script
-------------------------------------------------------------------------------------------------
2 wiznet stopped Trigger: capconnect : #COL $339966 m...
3 [u] Xantcha running #THREAD
|
In my wiznet window: #THREAD:
Code: |
Threads:
# ID Window Name Status Script
-------------------------------------------------------------------------------------------------
1 Xantcha stopped Trigger: ^$ : #IF (%t1 != ".:|Wolf|:....
3 [u] Xantcha stopped #THREAD
4 [u] wiznet running #THREAD
|
I don't know if that helps any, but it might :)
BTW: That weird trigger showing in the second example is a condition (within lines=1) on another trigger that already finished executing. |
|
_________________ If you're ever around Aardwolf, I'm that invisible guy you can never see. Wizi ftw! :) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Sep 29, 2007 1:27 am |
Bah, yes, you are right. I should have thought about this but I didn't realize until you posted that the triggers were executing in the capture window itself.
Each window has it's own "thread pool". In other words, CMUD keeps a cached thread and will re-use it if the thread was stopped. This cuts down on the overhead of always creating and destroying threads (which can be time consuming in Windows). So each Window and Module has a thread pool. The "pool" consists of one thread that is reused for the command line, and one thread that is reused for triggers. If one of these threads isn't stopped, then CMUD will create an additional thread as needed and mark it as "autoclose".
So in your case, it is normal. The [u] in front of the thread name shows that it is a "command line" thread rather than a "trigger thread".
Anyway, so this is normal and isn't the cause of the problem that we are looking for. |
|
|
|
|
|