10

I've been trying to debug some issues related with threads with one application. When I attach to the application I see a window like this one:

enter image description here

What is this thread with a name "[Thread Destroyed]"? The app code is not writing this name for sure.

What means that a Thread has the call stack not available. The "Acquisition Engine" thread is created inside the application and runs inside a loop until stopped. If the thread is stopped it exits the loop and it ends its life so it should be in the thread list. If it's there its because it hasn't exited the loop yet, so, again, what means that the callstack is not available?

Thanks in advance for your help, this one doesn't seem an easy one.

Kaustubh
  • 39
  • 7
Ignacio Soler Garcia
  • 21,122
  • 31
  • 128
  • 207
  • 4
    It is a dead parrot: http://www.youtube.com/watch?v=4vuW6tQ0218 – Hans Passant Jun 13 '12 at 19:50
  • A thread does allocate a Windows kernel object which is kept alive as long as someone keeps a Thread handle to it open. Without knowing what the debugger is exactly displaying here I would think that someone is still holding a managed Thread object alive which points to an exited thread. – Alois Kraus Jun 13 '12 at 19:50
  • What of the two, the not available of the Thread Destroyed? – Ignacio Soler Garcia Jun 13 '12 at 19:51
  • @HansPassant: by the way, the video was absolutely funny :D Even when I didn't catch everything due to their accent I had a very good time: "This is an ex - parrot :D" – Ignacio Soler Garcia Jun 13 '12 at 20:22
  • @AloisKraus: does this mean taht I'm not disposing something or doing somethig that keeps the native thread alive? – Ignacio Soler Garcia Jun 13 '12 at 20:29
  • 1
    A Thread object does not implement IDisposable. No I meant that someone is still holding a reference to a Thread object for an already exited thread. – Alois Kraus Jun 13 '12 at 21:00
  • The thread is created by a Timer and the Timer is being disposed. No others access the Timer thread. I'm going to give a look to the Timer class, thanks. – Ignacio Soler Garcia Jun 14 '12 at 08:09

1 Answers1

1

[Thread Destroyed] means the Destructor has been called and the Thread no longer exists.

IvoTops
  • 3,463
  • 17
  • 18
  • 1
    Probably because there was a thread listed in there that actually did something in the session, but now no longer exists. It used to show data about that thread and now indicates the new status of that thread. – IvoTops Aug 20 '12 at 14:27
  • And what about the callstack being not available (sorry, I forgot this question) – Ignacio Soler Garcia Nov 02 '12 at 14:48