Crash: get_usrp_info(): RuntimeError: vector::_M_range_check (uhd)

This is on a USRP1 with two channels , when calling get_usrp_info(0) all
is fine, but get_usrp_info(1) is greeted with a crash:

Traceback (most recent call last):
File “eh.py”, line 158, in
main ()
File “eh.py”, line 151, in main
tb = build_block (options.args, options.tx_enable, options.rx_enable)
File “eh.py”, line 116, in init
d = self.u_rx.get_usrp_info(i) <=============== note i=1 here
File “/usr/local/lib/python2.7/dist-packages/gnuradio/uhd/uhd_swig.py”,
line 1824, in get_usrp_info
return _uhd_swig.uhd_usrp_source_sptr_get_usrp_info(self, chan)
RuntimeError: vector::_M_range_check


Traced this down within C+±land, here’s the corresponding stack trace:

_M_range_check (this=0x7fff1a183ef0, __n=1) at
/usr/include/c++/4.6/bits/stl_vector.h:719
719 __throw_out_of_range(__N(“vector::_M_range_check”));
(gdb) i stack
#0 _M_range_check (this=0x7fff1a183ef0, __n=1) at
/usr/include/c++/4.6/bits/stl_vector.h:719
#1 at (__n=1, this=0x7fff1a183ef0) at
/usr/include/c++/4.6/bits/stl_vector.h:737
#2 multi_usrp_impl::mb_root (this=, mboard=1) at
/home/mhp/uhd/host/lib/usrp/multi_usrp.cpp:861
#3 0x00007fa17fca38ea in multi_usrp_impl::get_usrp_rx_info
(this=0x2c82990, chan=)
at /home/mhp/uhd/host/lib/usrp/multi_usrp.cpp:244
#4 0x00007fa18016ef7e in uhd_usrp_source_impl::get_usrp_info(unsigned
long) () from /usr/local/lib/libgnuradio-uhd-3.6.3git.so.0.0.0
#5 0x00007fa1803e2f1b in _wrap_uhd_usrp_source_sptr_get_usrp_info ()
from /usr/local/lib/python2.7/dist-packages/gnuradio/uhd/_uhd_swig.so
#6 0x00000000004b6569 in PyEval_EvalFrameEx ()
#7 0x00000000004bcd2d in PyEval_EvalCodeEx ()
#8 0x00000000004b6a5b in PyEval_EvalFrameEx ()
#9 0x00000000004bcd2d in PyEval_EvalCodeEx ()
#10 0x0000000000448edf in ?? ()
#11 0x000000000041ad2a in PyObject_Call ()
#12 0x000000000043074e in ?? ()
#13 0x000000000041ad2a in PyObject_Call ()
#14 0x0000000000480c73 in ?? ()
#15 0x000000000047c1d1 in ?? ()
#16 0x000000000041ad2a in PyObject_Call ()
#17 0x00000000004b6b9e in PyEval_EvalFrameEx ()
#18 0x00000000004b6d77 in PyEval_EvalFrameEx ()
#19 0x00000000004bcd2d in PyEval_EvalCodeEx ()
#20 0x00000000004bd802 in PyEval_EvalCode ()
#21 0x00000000004dcc22 in ?? ()
#22 0x00000000004dd7e4 in PyRun_FileExFlags ()
#23 0x00000000004de2ee in PyRun_SimpleFileExFlags ()
#24 0x00000000004ee6dd in Py_Main ()
#25 0x00007fa18508730d in __libc_start_main () from
/lib/x86_64-linux-gnu/libc.so.6
#26 0x000000000041cb69 in _start ()

AFAICT it’s affecting other methods in addition to get_usrp_info(), but
in any case the crash is 100% solidly reproducible - any help
appreciated. For now will try to shift back to gnuradio v3.3.x (without
uhd)

Thx & Best

Max

On 02/20/2013 09:50 PM, ikjtel wrote:

return _uhd_swig.uhd_usrp_source_sptr_get_usrp_info(self, chan)

RuntimeError: vector::_M_range_check

My first guess is that it doesnt know the channel mapping (how the
frontends map to RX DSPs). So there is nothing to query for channel 1
which isnt setup.

Try setting the subdevice spec string for for the two channel usage.

-josh

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