Segmentation fault when "make check"

Hi All,

I was writing a new block and the “make” process of source files(.cc .h
.i,
etc) was successful. However, when I “make check” to test the block,
there’s
an error message “Segmentation fault” coming out. I searched the
previous
discussions but there were not too much useful information. I know that
only
this error message is too vague for you. But I am still wondering if
anyone
could tell where might have the possible mistakes. I guess the problems
may
lie on the qa_test.py scripts which I post below. The lpi.itersum_ff
blocks
has 4 parallel input and one output. Any suggestions will be
appreciated.


from gnuradio import gr, gr_unittest
import lpi

class qa_lpi (gr_unittest.TestCase):

def setUp (self):
    self.tb = gr.top_block ()

def tearDown (self):
    self.tb = None

def test_itersum_ff (self):
    src_data0 = (1.0, 1.0, 0.0, 0.0, 1.0)
    src_data1 = (1.0, 0.0, 1.0, 1.0, 0.0)
    src_data2 = (0.0, 1.0, 1.0, 0.0, 1.0)
    src_data3 = (0.0, 0.0, 1.0, 1.0, 0.0)

    src0 = gr.vector_source_f (src_data0)
    src1 = gr.vector_source_f (src_data1)
    src2 = gr.vector_source_f (src_data2)
    src3 = gr.vector_source_f (src_data3)

    cal = lpi.itersum_ff ()
    dst = gr.vector_sink_f ()

    self.tb.connect (src0, (cal,0))
    self.tb.connect (src1, (cal,1))
    self.tb.connect (src2, (cal,2))
    self.tb.connect (src3, (cal,3))
    self.tb.connect (cal, dst)

    self.tb.run ()
    result = dst.data ()
    #self.assertFloatTuplesAlmostEqual (expected_result, 

result_data, 6)
print result

if name == ‘main’:
gr_unittest.main ()

On Tue, Sep 01, 2009 at 03:51:41PM -0700, Milo W. wrote:

Hi All,

I was writing a new block and the “make” process of source files(.cc .h .i,
etc) was successful. However, when I “make check” to test the block, there’s
an error message “Segmentation fault” coming out. I searched the previous
discussions but there were not too much useful information. I know that only
this error message is too vague for you. But I am still wondering if anyone
could tell where might have the possible mistakes. I guess the problems may
lie on the qa_test.py scripts which I post below. The lpi.itersum_ff blocks
has 4 parallel input and one output. Any suggestions will be appreciated.

The bug is most likely in your new C++ code.
Run gdb to see where it’s segfaulting.

http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html#debugging

When it segfaults, use the “bt” command to generate a stack backtrace.

gdb docs here: http://www.gnu.org/software/gdb/documentation

Eric

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs