Re: whats a "std::_Container_base::_Orphan_all"



On Mon, 9 Oct 2006 16:17:55 +0500, "Abubakar" <emailallrise@xxxxxxxxx>
wrote:

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.

--
Doug Harrison
Visual C++ MVP
.



Relevant Pages

  • Re: Data marshalling from worker thread to GUI thread
    ... SendMessage from worker thread directly. ... This way the GUI update is done instantly and its much simpler then using ... especially the topic in this chapter called "Sending Messages to a Window". ...
    (microsoft.public.win32.programmer.ui)
  • Re: Data marshalling from worker thread to GUI thread
    ... >SendMessage from worker thread directly. ... >waiting is done from the same GUI thread. ... >especially the topic in this chapter called "Sending Messages to a Window". ...
    (microsoft.public.win32.programmer.ui)
  • Re: Network Drive Issue
    ... It was stuck too. ... > Open DOS box and tried to switch drives: ... > At some point the DOS window showed the S: ...
    (microsoft.public.win32.programmer.kernel)
  • Re: saved my hotmail password by mistake
    ... I accidentally clicked yes when a pop up window ... > came up asking me to save hotmail password. ... > stuck with my password being saved and many people use ... tab click on AutoComplete, and then Clear passwords. ...
    (microsoft.public.security)
  • Re: The Super Slab
    ... Have a temptation to see what all the fuss is about in August though. ... If you absolutely have to do it, either do it late at night or in the possible window of opportunity between rush hours, which is about 11:00 to 13:30 weekdays Even then, you can get stuck, literally, like the dufus yesterday that rolled his tanker full of hot tar and had to be cut out of the cab of his truck because he was stuck to it. ...
    (rec.motorcycles)

Loading