Boost logo

Boost Users :

Subject: Re: [Boost-users] Crash in boost::thread::sleep(xt) (boost 1.42 on Windows 32 bit)
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2012-03-26 04:11:03


On Mon, Mar 26, 2012 at 9:17 AM, Arno <arno.schaefer_at_[hidden]> wrote:

> > boost::this_thread::sleep(boost::get_system_time()+
> > boost::posix_time::milliseconds(millisec_));
> Hi Ovanes,
>
> I took my call from examples what I have found and use it at many places in
> our code and til now it seems to work correctly.
> Our problem is not related to the use of sleep, I look for reasons what can
> happen, that a thread stops without any known reason.
>
> Do you have some hints in this direction?
>
> regards
> Arno
>

Arno,

if that is not the reason, I would run it in the debugger and enable the
debugger to stop whenever an exception is thrown or a signal is raised. Try
to see if that happens when this one thread runs... Logs might help as
well. Finally, does the program wait for the thread to exit or does it
detaches the thread from the thread object? Is is possible that some
dangling references or pointers are accessed in the thread (but than the
debugger should receive an access violation signal).

Can you reproduce a minimal example to be posted here. I know it might be
hard to do when dealing with MT-contexts.

Best Regards,
Ovanes



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net