Quantcast

Regarding Boost message queue

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Regarding Boost message queue

Ruecan
Hi,

I am developping some source code using a boost shared pointer gr_message_sptr
which is retrieving from a queue (gr_msg_queue_sptr),
The issue is that when calling :

 gr_message_sptr mesg = queue->delete_head_nowait();  

from within a while loop (BTW the queue itself is being passed from a thread function to a subsequent function which process it),

I got an error stated as:

... /usr/include/boost/smart_ptr/shared_ptr.hpp:424: T* boost::shared_ptr<T>::operator->() const [with T = gr_message]: Assertion `px != 0' failed.
Aborted (core dumped),
Even after googling the issue I got no clear explanation of am I doing wrong or missing.

All clarifications are welcome, thank you,

Regards,
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Regarding Boost message queue

Tom Rondeau-2
On Wed, Sep 18, 2013 at 3:27 PM, NaceurElOuni <[hidden email]> wrote:

> Hi,
>
> I am developping some source code using a boost shared pointer
> gr_message_sptr
> which is retrieving from a queue (gr_msg_queue_sptr),
> The issue is that when calling :
>
>  gr_message_sptr mesg = queue->delete_head_nowait();
>
> from within a while loop (BTW the queue itself is being passed from a thread
> function to a subsequent function which process it),
>
> I got an error stated as:
>
> ... /usr/include/boost/smart_ptr/shared_ptr.hpp:424: T*
> boost::shared_ptr<T>::operator->() const [with T = gr_message]: Assertion
> `px != 0' failed.
> Aborted (core dumped),
> Even after googling the issue I got no clear explanation of am I doing wrong
> or missing.
>
> All clarifications are welcome, thank you,
>
> Regards,

This is very little information to go on. But it looks like you aren't
initializing your messages correctly.

It's core dumping. Do a search for how to create a core dump file and
read it with gdb; that can give you a lot more information about where
and why things are breaking.

--
Tom
GRCon13 Oct. 1 - 4
http://www.trondeau.com/grcon13

_______________________________________________
Discuss-gnuradio mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Loading...