whats a "std::_Container_base::_Orphan_all"

  • Thread starter Thread starter Abubakar
  • Start date Start date
A

Abubakar

Hi,

In my application, Some of my thread gets stuck somewhere. The vs2k5
debugging "Thread" window shows that stuck thread and I can I dentify it. In
its Name column the following text is written:
"std::_Container_base::_Orphan_all". What does this mean?

Now some general info about whats happnening here: :this is a call to a
SendMessage api, which I'm sending to my GUI window, and this call never
makes it back. I have checked the GUI code that in this particular case the
call never makes it to the proc that I have mapped my message to, so I cant
do any checking as to what goes wrong in the gui that the call never returns
( i believe there is nothing wrong cuz the same code runs fine so many
times ).

Any ideas?

Regards,

-ab.
 
Hi,

In my application, Some of my thread gets stuck somewhere. The vs2k5
debugging "Thread" window shows that stuck thread and I can I dentify it. In
its Name column the following text is written:
"std::_Container_base::_Orphan_all". What does this mean?

Searching the source code reveals it is involved with iterator debugging;
it appears to be used by vector and deque to invalidate all iterators into
the container at those times when they really are invalidated, so that
future use of those iterators will cause an error.
Now some general info about whats happnening here: :this is a call to a
SendMessage api, which I'm sending to my GUI window, and this call never
makes it back. I have checked the GUI code that in this particular case the
call never makes it to the proc that I have mapped my message to, so I cant
do any checking as to what goes wrong in the gui that the call never returns
( i believe there is nothing wrong cuz the same code runs fine so many
times ).

Any ideas?

The usual reason an interthread SendMessage hangs is because the target
thread doesn't enter a receptive state, which includes calling WaitMessage,
GetMessage, (some forms of) PeekMessage, and (not a typo) SendMessage. For
example, if the GUI thread is waiting on a resource held by the sending
thread, you have a deadlock. Note that _Orphan_all starts with:

_Lockit _Lock(_LOCK_DEBUG);

If the sending thread holds _LOCK_DEBUG, you will have a deadlock, so the
thing to do is switch to the target thread and see what line it is on. If
it's stuck on this line, then look at the context in which the sending
thread calls SendMessage.
 
Back
Top