|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Nov 10, 2007 3:38 pm
[2.11] Threads not getting reused |
This has actually been around for a long time, but the debugger finally shows why it is happening.
Procedure
1. Launch CMud
2. Close Sessions window (ESC)
3. Open Debugger from the Window menu
4. Enter at the command line
Code: |
#WHILE (1) {#WAIT 10;#ADD a 1} |
5. Enter at the command line
Quote: |
0.0006 | untitled | [2] untitled Comline : start : #STOP 1
0.0020 | untitled | [1] untitled Comline : resumed
0.0014 | untitled | [2] untitled Comline : stopped |
I did a later test with this in the command line
Code: |
#WHILE (@a<3000) {#WAIT 10;#ADD a 1} |
Quote: |
0.0120 | untitled | [4] untitled Comline : resumed
0.0011 | untitled | [4] Var "a" changed from "2999" to "3000"
0.0012 | untitled | [4] untitled Comline : terminated |
It would appear that under some circumstances the thread is being marked as resumed instead of correctly terminated. I haven't quite gotten to check what types of settings will have this same bug. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sat Nov 10, 2007 5:06 pm |
Confirmed.
I also got a 0% CPU non-responsive lock-up when I clicked refreshed class tree button a few times. |
|
_________________ Asati di tempari! |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Nov 10, 2007 6:42 pm |
You should get a "resumed" message each time the #WAIT command times-out. But yes, in the first case you should have gotten a "terminated" message, which I didn't see, so it does look like the thread isn't getting auto-terminated in some cases.
Tech: when you got the lock-up, was the Settings Editor also open, or just the debugger window? |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Nov 12, 2007 8:01 am |
Just the debugger, but it'll be a while before I can double check. I had to have my machine reimaged this weekend and the tech staff kinda botched the job. The worst part, I forgot to try System Restore before taking it to them, and now I think System Restore would have fixed the problem.
[Edit]
Just downloaded CMUD again, it was just the debugger window. |
|
_________________ Asati di tempari! |
|
|
|
|
|