discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Boost error when trying to use gr.msg_queue.delete_he


From: Colleen Josephson
Subject: [Discuss-gnuradio] Boost error when trying to use gr.msg_queue.delete_head_nowait()
Date: Fri, 12 Apr 2013 16:25:21 -0400

I'm trying to use gr.msg_queue.delete_head_nowait() in a python example,
and if I use delete_head_nowait I get this error:

python: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T = gr_message]: Assertion `px != 0' failed.
Aborted

The blocking version of delete_head works fine.

Here's the code:

while self.keep_running:
            msg = self.rcvd_pktq.delete_head_nowait()
            if msg:
                result = packet_utils2.unmake_packet(msg.to_string(), int(msg.arg1()))
            else:
if len(packet_utils2.uncoded) > 0:
                    result = packet_utils2.unmake_packet(None)

            if result: #make sure it's not null                                              
                ok, payload = result
                m = msg.to_string()
print 'payload"', m


--
Colleen Josephson
http://www.cjosephson.net
Dept. of Electrical Engineering and Computer Science
Massachusetts Institute of Technology
Class of 2013

reply via email to

[Prev in Thread] Current Thread [Next in Thread]