[Top][All Lists]

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

[Discuss-gnuradio] segmentation fault when using a new added block

From: intermilan
Subject: [Discuss-gnuradio] segmentation fault when using a new added block
Date: Thu, 14 Apr 2011 16:09:01 +0800

hi all:
    I want to use the gr-howto-write-a-block-3.3.0 (my version of the Gnuradio is 3.3.0)to add a new package
or a new block to the gnuradio and grc. At first I did not change anything in the gr-howto-write-a-block-3.3.0,
so the name of the new package should be howto,and the name of the block should be howto.square_ff() and
howto.square2_ff().I run the follow command as follow:
    sudo ./bootstrap
    sudo ./configure --prefix=/usr/local
    sudo make
    sudo make check
    sudo make install
 After all commands done,everything seems fine (no error appear after make check)and the package looks like  been installed.
Then I write a small python program to test the new block.Here are the codes:
#! /usr/bin/env python
from gnuradio import gr
import howto
class example_block(gr.top_block):
    def __init__(self):
        src = "">                                 True)
        thr = gr.throttle(gr.sizeof_float,
        sqr =howto.square_ff()
        dst = gr.file_sink(gr.sizeof_float,


if __name__ == '__main__':
    tb = example_block()

But when I run the program in the shell, there is error "segmentation fault".I do not know why does this error happen.
I did not change anything in the gr-howto-write-a-block-3.3.0. I hope someone can help me to fix this problem and
tell me why this error happen.
Thanks in advance.


reply via email to

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