unsynchronized / gr-mixalot

POCSAG, FLEX, and GSC encoder blocks for GNU Radio
GNU General Public License v3.0
139 stars 39 forks source link

Conversion to GR3.8 #37

Closed ckoval7 closed 4 years ago

ckoval7 commented 4 years ago

I'm pretty close to getting this done, but I've hit a bit of a wall. I was hoping you could take a look and notice if I missed something. It compiles fine, but when you go to run GRC flow graphs it seg faults. Here is the gdb output in case it helps:


Starting program: /usr/bin/python3 ./test_pocsagtx.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffec5ca700 (LWP 14206)]
[New Thread 0x7fffe9dc9700 (LWP 14207)]
[New Thread 0x7fffe95c8700 (LWP 14208)]
[New Thread 0x7fffe4dc7700 (LWP 14209)]
[New Thread 0x7fffe25c6700 (LWP 14210)]
[New Thread 0x7fffdfdc5700 (LWP 14211)]
[New Thread 0x7fffdd5c4700 (LWP 14212)]
[New Thread 0x7fffd2c59700 (LWP 14213)]
[New Thread 0x7fffd2458700 (LWP 14214)]
[New Thread 0x7fffd1c57700 (LWP 14215)]

Thread 9 "pocencode1" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd2c59700 (LWP 14213)]
0x00007fffd4cf58f3 in gr::mixalot::pocencode_impl::work(int, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) ()
   from /usr/local/lib/libgnuradio-mixalot.so.1.0.0git
(gdb) backtrace
#0  0x00007fffd4cf58f3 in gr::mixalot::pocencode_impl::work(int, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) ()
   from /usr/local/lib/libgnuradio-mixalot.so.1.0.0git
#1  0x00007ffff493b367 in gr::sync_block::general_work(int, std::vector<int, std::allocator<int> >&, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) ()
   from /usr/local/lib/libgnuradio-runtime.so.3.8.2
#2  0x00007ffff48f3a0b in gr::block_executor::run_one_iteration() ()
   from /usr/local/lib/libgnuradio-runtime.so.3.8.2
#3  0x00007ffff4945ce7 in gr::tpb_thread_body::tpb_thread_body(boost::shared_ptr<gr::block>, boost::shared_ptr<boost::barrier>, int) () from /usr/local/lib/libgnuradio-runtime.so.3.8.2
#4  0x00007ffff4938464 in boost::detail::function::void_function_obj_invoker0<gr::thread::thread_body_wrapper<gr::tpb_container>, void>::invoke(boost::detail::function::function_buffer&) ()
   from /usr/local/lib/libgnuradio-runtime.so.3.8.2
#5  0x00007ffff4952f72 in boost::detail::thread_data<boost::function0<void> >::run() ()
   from /usr/local/lib/libgnuradio-runtime.so.3.8.2
#6  0x00007ffff3437bcd in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1
#7  0x00007ffff77cc6db in start_thread (arg=0x7fffd2c59700) at pthread_create.c:463
#8  0x00007ffff7b05a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) ```
unsynchronized commented 4 years ago

Thanks for getting it started! I'll take a look a bit later; have to update my primary GR machine to 3.8.

unsynchronized commented 4 years ago

Get rid of this line entirely in pocencode_impl::work:

            const float *in = (const float *) input_items[0];

It should work then. (This is a source block; there's no input, so that vector is empty. I'm surprised that didn't break in GR3.7..)

BTW, if you're planning on using this module, the wasp branch is worth checking out.. it contains a bunch of work I did to implement FLEX and enable dynamic tuning/pages over a localhost socket (via Socket PDU).

unsynchronized commented 4 years ago

(Also, if you ever want better debug info, at least in most cmake builds, try cmake -DCMAKE_BUILD_TYPE=debug; that helped me isolate this right away.)

ckoval7 commented 4 years ago

Worked like a charm, thanks! I recommend pulling into a new branch named "maint-3.8" to follow the standards set by GNURadio.

ZeroChaos- commented 4 years ago

Bump

ZeroChaos- commented 4 years ago

Monthly bump. Can we get this merged please?

unsynchronized commented 4 years ago

Yep, let me make a new maint-3.8 branch and merge into that

unsynchronized commented 4 years ago

I can't test easily until tomorrow -- but let me know if there are any issues. Sorry for the delay, and thanks again!