Is there any thing I can check to resolve this issue?
Vipin
Sent from Mail for Windows 10
From: Vipin Sharma
Sent: Saturday, July 29, 2017 10:13 PM
To: GNURadio Discussion List
Subject: ValueError: itemsize mismatch crash
Hi,
I have a few custom blocks in C in the top level GRC system. Everything seems
to work fine up until the Play button. The top_block.py Python program seems to
crash on this error.
At first glance, it seems to say that A1SystemControl's 4th output has size of
49 while the connected input port of ChannelEstimator has the size of 0.
I have checked this multiple types. Both are declared correctly, "byte" type in
my xml file. I also checked the lib/*.cc files for these custom blocks and
verified that the io_signature::make call correctly defines the size as
'sizeof(char)' for those corresponding IOs. I have no idea from where GRC is
using the number 49 and 0. Can anybody help? The "make test" step runs fine as
well.
Here the related code in lib/A1Sy*.cc. You can see that iosOut has the 4th
element (starting from 0 on the leftmost element) has sizeof(char):
static int ios[] = {sizeof(gr_complex), sizeof(gr_complex),
sizeof(gr_complex), sizeof(gr_complex), sizeof(gr_complex), sizeof(char)};
static std::vector<int> iosig(ios, ios+sizeof(ios)/sizeof(int));
static int iosOut[] = {sizeof(gr_complex), sizeof(gr_complex),
sizeof(gr_complex), sizeof(gr_complex), sizeof(char), sizeof(char),
sizeof(char), sizeof(char)};
static std::vector<int> iosigOut(iosOut, iosOut+sizeof(iosOut)/sizeof(int));
A1SystemControl_impl::A1SystemControl_impl(float frame_size, float
tap_size, float est_sample_size)
: gr::block("A1SystemControl",
gr::io_signature::makev(6, 6, iosig),
gr::io_signature::makev(8, 8, iosigOut)),
FrameSize(frame_size),
TapSize(tap_size),
EstSampleSize(est_sample_size)
{}
Also, for lib/Chan*.cc, the 0'th input has sizeof(char) as well:
static int ios[] = {sizeof(char), sizeof(gr_complex), sizeof(gr_complex),
sizeof(char)};
static std::vector<int> iosig(ios, ios+sizeof(ios)/sizeof(int));
ChannelEstimator_ff_impl::ChannelEstimator_ff_impl(float tap_size, float
est_sample_size)
: gr::block("ChannelEstimator_ff",
gr::io_signature::makev(4, 4, iosig),
gr::io_signature::make(1, 1, sizeof(gr_complex))),
TapSize(tap_size),
EstSampleSize(est_sample_size)
{}
Traceback (most recent call last):
File "/home/vipin/a1/grcnew/gr-a1System/top_block.py", line 174, in <module>
main()
File "/home/vipin/a1/grcnew/gr-a1System/top_block.py", line 162, in main
tb = top_block_cls()
File "/home/vipin/a1/grcnew/gr-a1System/top_block.py", line 113, in __init__
self.connect((self.a1System_A1SystemControl_0, 4),
(self.a1System_ChannelEstimator_ff_0, 0))
File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/hier_block2.py",
line 47, in wrapped
func(self, src, src_port, dst, dst_port)
File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/hier_block2.py",
line 110, in connect
self.primitive_connect(*args)
File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py",
line 5334, in primitive_connect
return _runtime_swig.top_block_sptr_primitive_connect(self, *args)
ValueError: itemsize mismatch: A1SystemControl0:4 using 49,
ChannelEstimator_ff0:0 using 34948032
*** Error in `/usr/bin/python2': free(): invalid pointer: 0x0000000002154e58 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f6dfd2317e5]
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio