|
Boost Users : |
From: Ross Manges (ross.manges_at_[hidden])
Date: 2005-04-26 19:45:21
Thanks for getting back to me so quickly! My comments are embedded below.
> You should probably redownload since the CVS contained some slightly
> broken
> versions for a short time. :-)
OK, thanks for the heads up.
> I'm not seeing any violations of the rules in your code; the problem is
> probably more mundane:
I moved the mutex as suggested, and the program runs without incident now.
However, I have more examples. I made 'retElem' a member variable in the
class SimpleQueue. This probably (?) breaks the shared_ptr rules for
exclusivity. Nonetheless, the program still runs OK. But, I also tried a
version of the program using CommonCPP threads and mutexes instead of
Boost threads and mutexes, and it dies and dumps a core. The backtrace
follows and both versions of the code base are attached in bzip2 format.
If you are so inclined, please review the code and let me know your
thoughts. Thanks!!!
(gdb) bt
#0 0x080e3f1b in ?? ()
#1 0x00000023 in ?? ()
#2 0x0804a97d in boost::detail::shared_count::operator= (this=0xb60dddf8,
r=@0xb60dddd8) at shared_count.hpp:182
#3 0x08049a14 in boost::shared_ptr<Element>::operator= (this=0xb60dddf4,
r=@0xb60dddd4) at shared_ptr.hpp:148
#4 0x0804948b in CommonThread::run (this=0x80ec258) at
../CommonThread.cpp:14
#5 0xb75ad7be in ost::ThreadImpl::ThreadExecHandler (th=0x80ec258) at
thread.cpp:1110
#6 0xb75ac9bf in ccxx_exec_handler (th=0x80ec258) at thread.cpp:1136
#7 0xb754ae21 in pthread_start_thread () from /lib/i686/libpthread.so.0
#8 0xb73f308a in clone () from /lib/i686/libc.so.6
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