Re: AW: Segmentation fault when adding a variable...

2023-03-31 Thread Vasil Velichkov
Hi Niklas,

On 31/03/2023 17.18, Beckmann, Niklas wrote:
> Here is  the link to github, where I uploaded the code (since the link was 
> not working): https://github.com/niklas-aac/phyheader

I can't find the line you referenced previously in 
https://lists.gnu.org/archive/html/discuss-gnuradio/2023-03/msg00069.html

> mymodule.phy_header().formatter()

Is this in a python script? Can you upload this code as well as 
python/bindings/*.cc files? Or better upload the whole OOT module project so 
anyone can clone and test it locally.

Regards,
Vasil



AW: Segmentation fault when adding a variable...

2023-03-31 Thread Beckmann, Niklas
Hi Johannes, Vasil  & all,


I am on gnuradio 3.10.4.0 and I installed gnuradio from source.

Since pybind11 (2.4.3) which comes with ubuntu 20.04 is not working with 
gnuradio 3.10, I changed to pybind11 (2.5.0).

my pygccxml is in version 2.2.1


Here is  the link to github, where I uploaded the code (since the link was not 
working): https://github.com/niklas-aac/phyheader


Exactly, I am running a flowgraph, this will be on my to-do list, thank you:


>since gdb starts quite a few threads, I suggest you extract the part
>that segfaults into a script that's as small as possible. I assume you
>run a flowgraph in GRC. Just take the generated `.py` file and reduce it.




Thank you so far!


Best,

N




Von: Vasil Velichkov 
Gesendet: Freitag, 31. März 2023 15:30:24
An: Beckmann, Niklas; discuss-gnuradio@gnu.org
Betreff: Re: Segmentation fault when adding a variable...

Hi Niklas,

On 31/03/2023 14.42, Beckmann, Niklas wrote:
> I am currently facing a problem, where gunradio segfaults, when I add a 
> certain variable into the flowchart.

For reference a link to our previous discussion is 
https://lists.gnu.org/archive/html/discuss-gnuradio/2023-03/msg00062.html

> I created a little apache server, to share the according code of my module, 
> where the segfault happens (/include & /lib cpp files):
>
>  http://nbws.hopto.org/

It's not accessible

$ curl http://nbws.hopto.org/
curl: (7) Failed to connect to nbws.hopto.org port 80 after 3101 ms: No route 
to host

$ ping nbws.hopto.org
PING nbws.hopto.org (192.168.0.157) 56(84) bytes of data.

$ host nbws.hopto.org 8.8.8.8 | grep "has address"
nbws.hopto.org has address 192.168.0.157

This is a private IP address and is not publicly accessible.

Better upload the sources to one of the git hosting services (github, gitlab, 
...) or upload a tarball archive to file hosting service and provide a link.

Regards,
Vasil


Re: Segmentation fault when adding a variable...

2023-03-31 Thread Vasil Velichkov
Hi Niklas,

On 31/03/2023 14.42, Beckmann, Niklas wrote:
> I am currently facing a problem, where gunradio segfaults, when I add a 
> certain variable into the flowchart.

For reference a link to our previous discussion is 
https://lists.gnu.org/archive/html/discuss-gnuradio/2023-03/msg00062.html

> I created a little apache server, to share the according code of my module, 
> where the segfault happens (/include & /lib cpp files):
> 
>  http://nbws.hopto.org/

It's not accessible

$ curl http://nbws.hopto.org/
curl: (7) Failed to connect to nbws.hopto.org port 80 after 3101 ms: No route 
to host

$ ping nbws.hopto.org
PING nbws.hopto.org (192.168.0.157) 56(84) bytes of data.

$ host nbws.hopto.org 8.8.8.8 | grep "has address"
nbws.hopto.org has address 192.168.0.157

This is a private IP address and is not publicly accessible.

Better upload the sources to one of the git hosting services (github, gitlab, 
...) or upload a tarball archive to file hosting service and provide a link.

Regards,
Vasil



Re: Segmentation fault when adding a variable...

2023-03-31 Thread Johannes Demel

Hi Niklas,

since gdb starts quite a few threads, I suggest you extract the part 
that segfaults into a script that's as small as possible. I assume you 
run a flowgraph in GRC. Just take the generated `.py` file and reduce it.

A simple unittest would be an alternative approach.
Which GR version do you use exactly?
How did you install GR?
You might want to check which pybind11 version was used to build GR and 
which version was picked up by CMake for your OOT module. This is just a 
wild guess.
It's beneficial to start using git as early as possible. Even if you 
just run into situations like: "It works this morning, what did I break?".


I assume your "certain variable" is your customized `phy_header`. Is 
this correct?


Cheers
Johannes

PS: Instead of absolute paths like `#include "/home/inets/..."` you 
might want to figure out how to configure your system such that it picks 
up the correct prefixes.


On 31.03.23 13:42, Beckmann, Niklas wrote:

Dear all,


I am currently facing a problem, where gunradio segfaults, when I add a 
certain variable into the flowchart.


I created a little apache server, to share the according code of my 
module, where the segfault happens (/include & /lib cpp files):


http://nbws.hopto.org/ 


Maybe there is something wrong with the code?


When I do a gdb backtrace, I get the following:

[New Thread 0x7fffe0c4f700 (LWP 172481)]
[Thread 0x7087c700 (LWP 172476) exited]
[Thread 0x7fffdbfff700 (LWP 172479) exited]
[New Thread 0x7fffdbfff700 (LWP 172482)]
[New Thread 0x7087c700 (LWP 172483)]
[Thread 0x7fffdbfff700 (LWP 172482) exited]
[Thread 0x7087c700 (LWP 172483) exited]
--Type  for more, q to quit, c to continue without paging--

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x7fffdaa52c6b in pybind11::detail::same_type (rhs=..., lhs=...)
     at /usr/include/pybind11/detail/internals.h:55
55 inline bool same_type(const std::type_info , const std::type_info 
) { return lhs == rhs; }

(gdb) backtrace
#0  0x7fffdaa52c6b in pybind11::detail::same_type(std::type_info 
const&, std::type_info const&) (rhs=..., lhs=...) at 
/usr/include/pybind11/detail/internals.h:55
#1  
pybind11::detail::type_caster_base::src_and_type(gr::digital::packet_header_default const*)

     (src=0x7fffe3519cf0 )
     at /usr/include/pybind11/cast.h:852
#2  
pybind11::detail::type_caster_base::cast_holder(gr::digital::packet_header_default const*, void const*)
     (holder=0x7fff7cd0, src=0x7fffe3519cf0 gr::mymodule::phy_header_impl+96>) at /usr/include/pybind11/cast.h:877
#3  
pybind11::detail::copyable_holder_caster >::cast(std::shared_ptr const&, pybind11::return_value_policy, pybind11::handle)
     (src=std::shared_ptr (use count 
25760825, weak count -1) = {...}) at /usr/include/pybind11/cast.h:1466
#4  
pybind11::cpp_function::initialize, gr::digital::packet_header_default, , pybind11::name, pybind11::is_method, pybind11::sibling, char const*>(std::shared_ptr (gr::digital::packet_header_default::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, char const* const&)::{lambda(gr::digital::packet_header_default*)#1}, std::shared_ptr, gr::digital::packet_header_default*, pybind11::name, pybind11::is_method, pybind11::sibling, char const*>(pybind11::cpp_function::initialize, gr::digital::packet_header_default, , pybind11::name,--Type  for more, q to quit, c --Type  for more, q to quit, c to continue without paging--
  pybind11::is_method, pybind11::sibling, char 
const*>(std::shared_ptr 
(gr::digital::packet_header_default::*)(), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(gr::digital::packet_header_default*)#1}&&, 
std::shared_ptr 
(*)(gr::digital::packet_header_default*), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (call=..., this=0x0)

     at /usr/include/pybind11/pybind11.h:159
#5  
pybind11::cpp_function::initialize, gr::digital::packet_header_default, , pybind11::name, pybind11::is_method, pybind11::sibling, char const*>(std::shared_ptr (gr::digital::packet_header_default::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, char const* const&)::{lambda(gr::digital::packet_header_default*)#1}, std::shared_ptr, gr::digital::packet_header_default*, pybind11::name, pybind11::is_method, pybind11::sibling, char const*>(pybind11::cpp_function::initialize, gr::digital::packet_header_default, , pybind11::name, pybind11::is_method, pybind11::sibling, char const*>(std::shared_ptr (gr::digital::packet_header_default::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, char const* const&)::{lambda(gr::digital::packet_header_default*)#1}&&, std::shared_ptr (*)(gr::digital::packet_header_default*), pybind11::name const&, 

Segmentation fault when adding a variable...

2023-03-31 Thread Beckmann, Niklas
Dear all,


I am currently facing a problem, where gunradio segfaults, when I add a certain 
variable into the flowchart.

I created a little apache server, to share the according code of my module, 
where the segfault happens (/include & /lib cpp files):

 http://nbws.hopto.org/


Maybe there is something wrong with the code?


When I do a gdb backtrace, I get the following:


[New Thread 0x7fffe0c4f700 (LWP 172481)]
[Thread 0x7087c700 (LWP 172476) exited]
[Thread 0x7fffdbfff700 (LWP 172479) exited]
[New Thread 0x7fffdbfff700 (LWP 172482)]
[New Thread 0x7087c700 (LWP 172483)]
[Thread 0x7fffdbfff700 (LWP 172482) exited]
[Thread 0x7087c700 (LWP 172483) exited]
--Type  for more, q to quit, c to continue without paging--

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x7fffdaa52c6b in pybind11::detail::same_type (rhs=..., lhs=...)
at /usr/include/pybind11/detail/internals.h:55
55 inline bool same_type(const std::type_info , const std::type_info ) 
{ return lhs == rhs; }
(gdb) backtrace
#0  0x7fffdaa52c6b in pybind11::detail::same_type(std::type_info const&, 
std::type_info const&) (rhs=..., lhs=...) at 
/usr/include/pybind11/detail/internals.h:55
#1  
pybind11::detail::type_caster_base::src_and_type(gr::digital::packet_header_default
 const*)
(src=0x7fffe3519cf0 )
at /usr/include/pybind11/cast.h:852
#2  
pybind11::detail::type_caster_base::cast_holder(gr::digital::packet_header_default
 const*, void const*)
(holder=0x7fff7cd0, src=0x7fffe3519cf0 ) at /usr/include/pybind11/cast.h:877
#3  
pybind11::detail::copyable_holder_caster 
>::cast(std::shared_ptr const&, 
pybind11::return_value_policy, pybind11::handle)
(src=std::shared_ptr (use count 
25760825, weak count -1) = {...}) at /usr/include/pybind11/cast.h:1466
#4  
pybind11::cpp_function::initialize,
 gr::digital::packet_header_default, , pybind11::name, pybind11::is_method, 
pybind11::sibling, char 
const*>(std::shared_ptr 
(gr::digital::packet_header_default::*)(), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(gr::digital::packet_header_default*)#1}, 
std::shared_ptr, 
gr::digital::packet_header_default*, pybind11::name, pybind11::is_method, 
pybind11::sibling, char 
const*>(pybind11::cpp_function::initialize,
 gr::digital::packet_header_default, , pybind11::name,--Type  for more, q 
to quit, c --Type  for more, q to quit, c to continue without paging--
 pybind11::is_method, pybind11::sibling, char 
const*>(std::shared_ptr 
(gr::digital::packet_header_default::*)(), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(gr::digital::packet_header_default*)#1}&&, 
std::shared_ptr 
(*)(gr::digital::packet_header_default*), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call)
 const (call=..., this=0x0)
at /usr/include/pybind11/pybind11.h:159
#5  
pybind11::cpp_function::initialize,
 gr::digital::packet_header_default, , pybind11::name, pybind11::is_method, 
pybind11::sibling, char 
const*>(std::shared_ptr 
(gr::digital::packet_header_default::*)(), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(gr::digital::packet_header_default*)#1}, 
std::shared_ptr, 
gr::digital::packet_header_default*, pybind11::name, pybind11::is_method, 
pybind11::sibling, char 
const*>(pybind11::cpp_function::initialize,
 gr::digital::packet_header_default, , pybind11::name, pybind11::is_method, 
pybind11::sibling, char 
const*>(std::shared_ptr 
(gr::digital::packet_header_default::*)(), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(gr::digital::packet_header_default*)#1}&&, 
std::shared_ptr 
(*)(gr::digital::packet_header_default*), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call)
 () at /usr/include/pybind11/pybind11.h:137
#6  0x7fffda94bfcf in pybind11::cpp_function::dispatcher(_object*, 
_object*, _object*) (self=, args_in=0x7fffd952a1f0, 
kwargs_in=0x0) at /usr/include/pybind11/pybind11.h:624
#7  0x005f6489 in PyCFunction_Call ()
#8  0x005f7056 in _PyObject_MakeTpCall ()
#9  0x0050b993 in  ()
#10 0x00570ac2 in _PyEval_EvalFrameDefault ()
#11 0x00569cea in _PyEval_EvalCodeWithName ()
#12 0x0068e7b7 in PyEval_EvalCode ()
#13 0x00680001 in  ()
#14 0x0068007f in  ()
#15 0x006801cf in PyRun_StringFlags ()
#16 0x0060138e in  ()
#17 0x005c52f0 in  ()
#18 0x0056b9fd in _PyEval_EvalFrameDefault ()
#19 0x00569cea in _PyEval_EvalCodeWithName ()
#20 0x005f6a13 in _PyFunction_Vectorcall ()
#21 0x0056bbdf 

Re: Project title 'GRC: Build-in sub flowgraphs'

2023-03-31 Thread Marcus Müller

Hi Sai!

Welcome to the GNU Radio community! As a first step, you'd familiarize 
yourself with GRC; I'd recommend taking the first couple of lessons on 
https://tutorials.gnuradio.org.


Note that the project you're proposing is specifically *not* about DSP, 
but about graphical interface work.


Best regards,
Marcus

On 3/31/23 03:25, sai shanmukh wrote:
Hello, I am an undergraduate who is interested in this project 'GRC: 
Build-in sub flowgraphs'. I have previously worked in DSP projects and 
created voice recognition tool using mel frequency cepstrum in an 
embedded system. I have also created code blocks for synthetic signal 
generation. So, I am willing to contribute my time on this project. 
Can you tell me how should I approach this problem?