|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Sep 28, 2007 11:37 pm
[2.04] #THREAD #STOP lockup combo |
This always produces a lockup.
1. Launch CMud
2. Press ESC to close Sessions Window
3. At the command line type '#THREAD untitled' and press ENTER
4. Second command entry '#STOP untitled' and press ENTER
Neither command by themselves produces a lockup, but the 2 of them done in that sequence are deadly. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Sep 28, 2007 11:40 pm |
Boy, you really are evil. aren't you
Heh, yeah, telling it to stop/close the main thread (which is the one you always have by default) would definitely cause problems. Do you get the same problem if you do a #THREAD and find the thread ID number and then use '#STOP number' giving the ID number?
I'll add this to the bug list, but I'm not sure that this one really has any effect on "normal" operations. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Sep 28, 2007 11:53 pm |
Using '#STOP 1' as the first command entered causes the same lockup.
However, when you do '#STOP untitled' as the first command it doesn't cause a lockup. You can even hit that command many times or put it in a #LOOP and it doesn't cause a problem. Using the name only causes a problem when the #THREAD command precedes it.
I think the bugs are:
1. incosistent behavior
2. main thread should refuse #STOP |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Thinjon100 Apprentice
Joined: 12 Jul 2004 Posts: 190 Location: Canada
|
Posted: Fri Sep 28, 2007 11:56 pm |
To chime in and cross-reference this with my own post... When I #STOP the thread that's apparently sourced from my capture window:
Code: |
60 wiznet stopped Trigger: capfailhelp : #COL $cc99cc
|
The next time a trigger in that window fires, my CMud crashes. |
|
_________________ If you're ever around Aardwolf, I'm that invisible guy you can never see. Wizi ftw! :) |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Sep 29, 2007 12:41 am |
Just for giggles I also caused the same lockup by doing these two commands in sequence
#THREAD abc
#STOP abc
So this would explain why just doing '#STOP untitled' by itself caused nothing. The main thread has no name until that initial #THREAD command. I have to correct myself; behavior is consitent. Killing the main thread is evil.
As for normal operations, I believe there are still some context issues, and it is conceivable to me that someone would use '#STOP %threadid()' as an abort in a script. If the context or script usage is wrong then the main thread can get stopped. No matter what that stoppage needs to be prevented. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Sep 29, 2007 1:38 am |
Quote: |
Using the name only causes a problem when the #THREAD command precedes it. |
Yes, as you noticed, the main thread has no title until you use the #THREAD command to name it. When a thread doesn't have any title, the #THREAD command shows the name of the window that created the thread as it's name.
The proper way to "stop" the current thread is to use #ABORT. But yes, I need to prevent the main thread of a window/module from being stopped. |
|
|
|
|
|