[zeromq-dev] Assert when debugging, but not when executing
Claudio Carbone
erupter at libero.it
Wed Jan 9 17:29:48 CET 2013
On 09/01/13 17:25, Claudio Carbone wrote:
> I traced my program through all the function
> zmq::socket_base_t::connect
>
> and it goes through it flawlessly until line 556
> add_endpoint (addr_, (own_t *) session);
>
> which translates to
> launch_child (endpoint_);
> endpoints.insert (endpoints_t::value_type (std::string (addr_),
> endpoint_));
>
> the second is the one that triggers the assert, although the code is
> alien to me
> _GLIBCXX_CONSTEXPR pair(const _T1& __a, const _T2& __b)
> : first(__a), second(__b) { }
>
> I don't know enough about this to understand what is happening.
> The address that is being passed though is
> epgm://192.168.2.113;239.192.1.1:5678
>
>
Ok maybe I'm going somewhere: it may be failing on taking ownership of
the thread
void zmq::own_t::launch_child (own_t *object_)
{
// Specify the owner of the object.
object_->set_owner (this);
// Plug the object into the I/O thread.
send_plug (object_);
// Take ownership of the object.
send_own (this, object_);
}
But if that's the case then there are two questions:
- how do I use multi threading correctly to avoid this?
- why it doesn't fail when run normally? ft the problem is that the
debugger somehow manipulates thread ownerships, then how do you debug
such an application?
Claudio
More information about the zeromq-dev
mailing list