Segfaults Rational Resampler

Hi

I have compiled gnuradio severel times from git source with different
compile options on debian stable.

But if i run gnuradio with the following i always get a segfault, and i
dont know why :frowning:

Maybe someone can help me.

Regards Dominik

untitled-testomat.grc

<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
Sat Oct 26 11:45:36 2013

options

id
top_block


_enabled
True


title



author



description



window_size
1280, 1024


generate_options
wx_gui


category
Custom


run_options
prompt


run
True


max_nouts
0


realtime_scheduling



_coordinate
(11, 10)


_rotation
0



variable

id
samp_rate


_enabled
True


value
320000


_coordinate
(10, 170)


_rotation
0



analog_sig_source_x

id
analog_sig_source_x_0


_enabled
True


type
complex


samp_rate
samp_rate


waveform
analog.GR_COS_WAVE


freq
1000


amp
10


offset
0


affinity



minoutbuf
0


_coordinate
(208, 162)


_rotation
0



rational_resampler_xxx

id
rational_resampler_xxx_0


_enabled
True


type
ccc


interp
320000


decim
50000


taps



fbw
0


affinity



minoutbuf
0


_coordinate
(413, 169)


_rotation
0



blocks_throttle

id
blocks_throttle_0


_enabled
True


type
complex


samples_per_second
32000


vlen
1


affinity



minoutbuf
0


_coordinate
(651, 191)


_rotation
0



wxgui_scopesink2

id
wxgui_scopesink2_0


_enabled
True


type
complex


title
Scope Plot


samp_rate
32000


v_scale
0


v_offset
0


t_scale
0


ac_couple
False


xy_mode
False


num_inputs
1


win_size



grid_pos



notebook



trig_mode
wxgui.TRIG_MODE_AUTO


y_axis_label
Counts


affinity



_coordinate
(906, 170)


_rotation
0



<source_block_id>rational_resampler_xxx_0</source_block_id>
<sink_block_id>blocks_throttle_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>


<source_block_id>blocks_throttle_0</source_block_id>
<sink_block_id>wxgui_scopesink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>


<source_block_id>analog_sig_source_x_0</source_block_id>
<sink_block_id>rational_resampler_xxx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>

</flow_graph>

top_block.py:

#!/usr/bin/env python
##################################################

Gnuradio Python Flow Graph

Title: Top Block

Generated: Sat Oct 26 11:45:37 2013

##################################################

from gnuradio import analog
from gnuradio import blocks
from gnuradio import eng_notation
from gnuradio import filter
from gnuradio import gr
from gnuradio import wxgui
from gnuradio.eng_option import eng_option
from gnuradio.filter import firdes
from gnuradio.wxgui import scopesink2
from grc_gnuradio import wxgui as grc_wxgui
from optparse import OptionParser
import wx

class top_block(grc_wxgui.top_block_gui):

 def __init__(self):
     grc_wxgui.top_block_gui.__init__(self, title="Top Block")
     _icon_path = 

“/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png”
self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY))

     ##################################################
     # Variables
     ##################################################
     self.samp_rate = samp_rate = 320000

     ##################################################
     # Blocks
     ##################################################
     self.wxgui_scopesink2_0 = scopesink2.scope_sink_c(
             self.GetWin(),
             title="Scope Plot",
             sample_rate=32000,
             v_scale=0,
             v_offset=0,
             t_scale=0,
             ac_couple=False,
             xy_mode=False,
             num_inputs=1,
             trig_mode=wxgui.TRIG_MODE_AUTO,
             y_axis_label="Counts",
     )
     self.Add(self.wxgui_scopesink2_0.win)
     self.rational_resampler_xxx_0 = filter.rational_resampler_ccc(
             interpolation=320000,
             decimation=50000,
             taps=None,
             fractional_bw=None,
     )
     self.blocks_throttle_0 =

blocks.throttle(gr.sizeof_gr_complex*1, 32000)
self.analog_sig_source_x_0 = analog.sig_source_c(samp_rate,
analog.GR_COS_WAVE, 1000, 10, 0)

     ##################################################
     # Connections
     ##################################################
     self.connect((self.rational_resampler_xxx_0, 0),

(self.blocks_throttle_0, 0))
self.connect((self.blocks_throttle_0, 0),
(self.wxgui_scopesink2_0, 0))
self.connect((self.analog_sig_source_x_0, 0),
(self.rational_resampler_xxx_0, 0))

QT sink close method reimplementation

 def get_samp_rate(self):
     return self.samp_rate

 def set_samp_rate(self, samp_rate):
     self.samp_rate = samp_rate
     self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate)

if name == ‘main’:
import ctypes
import os
if os.name == ‘posix’:
try:
x11 = ctypes.cdll.LoadLibrary(‘libX11.so’)
x11.XInitThreads()
except:
print “Warning: failed to XInitThreads()”
parser = OptionParser(option_class=eng_option, usage="%prog:
[options]")
(options, args) = parser.parse_args()
tb = top_block()
tb.Start(True)
tb.Wait()

gdb i stack:

Program terminated with signal 6, Aborted.
#0 0xb774d424 in __kernel_vsyscall ()
(gdb)
(gdb) i stack
#0 0xb774d424 in __kernel_vsyscall ()
#1 0xb7589941 in raise () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#2 0xb758cd72 in abort () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#3 0xb75c5e15 in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#4 0xb75cff01 in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#5 0xb75d1768 in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#6 0xb75d481d in free () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#7 0xb62f44bf in operator delete(void*) () from
/usr/lib/i386-linux-gnu/libstdc++.so.6
#8 0xb6affccc in deallocate (__p=0xa2bd4f8, this=) at
/usr/include/c++/4.7/ext/new_allocator.h:100
#9 _M_deallocate (__p=0xa2bd4f8, this=, __n=) at /usr/include/c++/4.7/bits/stl_vector.h:175
#10 ~_Vector_base (this=0xbfdc63f4, __in_chrg=) at
/usr/include/c++/4.7/bits/stl_vector.h:161
#11 ~vector (this=0xbfdc63f4, __in_chrg=) at
/usr/include/c++/4.7/bits/stl_vector.h:404
#12 gr::filter::firdes::low_pass (gain=, sampling_freq=1,
cutoff_freq=0.0140625,
transition_width=0.0031249999999999993,
window_type=gr::filter::firdes::WIN_KAISER, beta=5)
at /home/dominik/rtl-sdr/gnuradio/gr-filter/lib/firdes.cc:150
#13 0xb4170894 in _wrap_firdes_low_pass (args=0x0, kwargs=0x0)
at
/home/dominik/rtl-sdr/gnuradio/build/gr-filter/swig/filter_swigPYTHON_wrap.cxx:5184
#14 0x00000006 in ?? ()
#15 0x080fd70a in PyEval_EvalFrameEx ()
#16 0x081008fe in PyEval_EvalCodeEx ()
#17 0x080fa041 in PyEval_EvalFrameEx ()
#18 0x080fa115 in PyEval_EvalFrameEx ()
#19 0x081008fe in PyEval_EvalCodeEx ()
#20 0x08103e8e in ?? ()
#21 0x080cd485 in ?? ()
#22 0x080fa340 in PyEval_EvalFrameEx ()
#23 0x081008fe in PyEval_EvalCodeEx ()
#24 0x08103fdc in ?? ()
#25 0x080cd485 in ?? ()
#26 0x080ccfa0 in ?? ()
#27 0x080b4399 in ?? ()
#28 0x080fa340 in PyEval_EvalFrameEx ()
#29 0x081008fe in PyEval_EvalCodeEx ()
#30 0x08103e8e in ?? ()
#31 0x080cd485 in ?? ()
#32 0x080ccfa0 in ?? ()
#33 0x080b4399 in ?? ()
#34 0x080fa340 in PyEval_EvalFrameEx ()
#35 0x081008fe in PyEval_EvalCodeEx ()
#36 0x08197635 in ?? ()
#37 0x0809cb34 in PyRun_FileExFlags ()
#38 0x0809cec4 in PyRun_SimpleFileExFlags ()
#39 0x0809e06b in Py_Main ()

Hi,

I just tested with gnuradio-3.7.1 on gentoo and the example worked for
me.

Some days ago I had a lot of segfaults, too. I recompiled pyqwt and qwt5
and the segfaults where gone.

–Volker

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