Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-07-29 12:04:43


Christopher Hunt wrote:
> Hi there,
>
> I'm attempting to use a shared_array as member of a class that I have.
> Something akin to the following:
>
> class UTFStringHolder
> {
> ...
>
> boost::shared_array<unsigned short> mStrBufferP;
> };
>
> When UTFStringHolder is instantiated, I get an EXC_BAD_ACCESS and my
> stack trace shows that pthread_mutex_init is being called. Here's the
> complete stack trace:
>
> #0 0x90012730 in _pthread_mutex_init
> #1 0x00088424 in boost::detail::lightweight_mutex::lightweight_mutex()
> at lwm_pthreads.hpp:47

These things usually happen when you have inconsistent definitions of
BOOST_HAS_THREADS in the source files or libraries that form your program.
Does the code still fail when you try it as a single self-contained source
file? If it does, can you post a minimal example that fails?


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