Dynamic_cast on ARM Android

Hi all,

I tried to run gnuradio in order to decode DAB+ form a file on an ARM
Cortex-A8 (OMAP 3) with Android. I translated the specific Python code
to C++ and used gnu libstdc++ with boost. I connected the blocks using
the method connect of gr_hier_block and gr_top_block.

The result is SIGSEGV in dynamic_cast when connecting blocks. The exact
line should be: gnuradio-core/src/lib/runtime/gr_sptr_magic.cc:54:

gr_hier_block2 *hb2 = dynamic_cast<gr_hier_block2 *>(p);

Did you find such a problem before? How to solve it? My idea is to
rewrite bock connections without dynamic_cast.

The exact gdb output is:
0x0036ab4a in __cxxabiv1::__dynamic_cast (src_ptr=0x3e0b80,
src_type=, dst_type=0x3c9af0, src2dst=) at /tmp/ndk-digit/src/build/…/gcc/gcc-4.4.3/libstdc
+±v3/libsupc++/dyncast.cc:47
47 /tmp/ndk-digit/src/build/…/gcc/gcc-4.4.3/libstdc+±v3/libsupc
++/dyncast.cc: No such file or directory.
in /tmp/ndk-digit/src/build/…/gcc/gcc-4.4.3/libstdc+±v3/libsupc
++/dyncast.cc

The backtrace is:
(gdb) bt
#0 0x0036ab4a in __cxxabiv1::__dynamic_cast (src_ptr=0x3e0b80,
src_type=, dst_type=0x3c9af0, src2dst=) at /tmp/ndk-digit/src/build/…/gcc/gcc-4.4.3/libstdc
+±v3/libsupc++/dyncast.cc:47
#1 0x000da704 in gnuradio::detail::sptr_magic::fetch_initial_sptr
(p=0x3e0b80)
at
/home/riadh/dev/p8/trunk/soft/Didon/Soft/Sources/gnuradio-core/src/lib/runtime/gr_sptr_magic.cc:54
#2 0x0002a824 in gnuradio::get_initial_sptr (p=0x3e0b80)
at
/home/riadh/dev/p8/trunk/soft/Didon/Soft/Sources/gnuradio-core/src/lib/runtime/gr_sptr_magic.h:47
#3 0x00028ce8 in dab_make_null_detect (length=2656, debug=false)
at
/home/riadh/dev/p8/trunk/soft/Didon/Soft/Sources/python/detect_null.cpp:25
#4 0x0001cfc0 in OfdmDemod::OfdmDemod (this=0x3dc408,
dab_params=0x3dc328, rx_params=0x3dc3c0, verbose=true, debug=true)
at /home/riadh/dev/p8/trunk/soft/Didon/Soft/Sources/python/ofdm.cpp:92
#5 0x00017474 in dab_make_ofdm_demod (dab_params=0x3dc328,
rx_params=0x3dc3c0, verbose=true, debug=true)
at /home/riadh/dev/p8/trunk/soft/Didon/Soft/Sources/python/ofdm.cpp:24
#6 0x0000f878 in dab_rx_main ()
at
/home/riadh/dev/p8/trunk/soft/Didon/Soft/Sources/python/dab_rx_constellation.cpp:93
#7 0x0000e780 in thread_entry (data=0x0)
at
/home/riadh/dev/p8/trunk/soft/Didon/Soft/Sources/main/didon_main.cpp:82
#8 0x00352584 in thread_header (data=0x3d401c)
at
/home/riadh/dev/p8/trunk/soft/CommonSoft/ParrotOS/core/src/posix/posix_thread.c:353
#9 0xafe0fe34 in __thread_entry (func=0x3523e8 <thread_header>,
arg=0x3d401c, tls=) at
bionic/libc/bionic/pthread.c:188
#10 0xafe0f900 in pthread_create (thread_out=,
attr=0x78, start_routine=0x3523e8 <thread_header>, arg=0x3d401c) at
bionic/libc/bionic/pthread.c:324
#11 0x00000000 in ?? ()

Best reagrds,

Riadh.

Hi all,

It was a bug of mine. I should have used self() for interconnecting
blocks in gr_hier_block2 rather than gnuradio::get_initial_sptr (this).

Best reagrds,

Riadh.