Handling SIGSEGV: invalid address on gstElementFactory.create()
Hi all, I'm working on a loader for the nodes present on the system, however, I'm having some issues with some third-party nodes. Or better I started to have issues after their installation. After some LLDB, I managed to pinpoint that the error is generated from the create method of a gstElementFactory on the create method. the object is the avmux_ttml . Now the problem is that even if I know the line giving me issues I can't check for error since it is generated from the c side, Does someone know how can I work around this? I would like to help if someone gives me some guidance to propose a fix to propagate the error back from c to rust wrapping it inside a nice Err().
This is a part of the backtrace:
`* thread #1, name = 'myapp', stop reason = signal SIGSEGV: invalid address (fault address: 0x70)
* frame #0: 0x00007ffff7e75c7b libgstreamer-1.0.so.0`gst_pad_new_from_template + 11
frame #1: 0x00007ffff5a4b678 libgstlibav.so`gst_ffmpegmux_init + 72
frame #2: 0x00007ffff7f781dd libgobject-2.0.so.0`g_type_create_instance + 781
frame #3: 0x00007ffff7f5734d libgobject-2.0.so.0`___lldb_unnamed_symbol127$$libgobject-2.0.so.0 + 509
frame #4: 0x00007ffff7f58b45 libgobject-2.0.so.0`g_object_new_with_properties + 629
frame #5: 0x00007ffff7f596f1 libgobject-2.0.so.0`g_object_new + 193
frame #6: 0x00007ffff7e579f3 libgstreamer-1.0.so.0`gst_element_factory_create + 435
frame #7: 0x0000555555d9e221 myapp`gstreamer::auto::element_factory::ElementFactory::create::h3b3646d7343bf9f8(self=0x00007fffffff7518, name=Option<&str> @ 0x00007fffffff6c48) at element_factory.rs:66:41
frame #8: 0x00005555556e2563 myapp`myapp::dgi::element::DgiElement::from_plugin_factory::hcd8baf6093ae2986(gst_factory=0x00007fffffff7518, gst_plugin=0x00007fffffff74d0) at element.rs:27:23
frame #9: 0x0000555555706835 myapp`myapp::dgi::inspector::index_elements::h86477c7f8cd922c6 at inspector.rs:26:27
frame #10: 0x0000555555763041 myapp`myapp::cli_commands::list_elements_commands::handle_list_element::ha7f1cee74af359f3 at list_elements_commands.rs:6:20
frame #11: 0x0000555555786f48 myapp`myapp::main::_$u7b$$u7b$closure$u7d$$u7d$::h29467d2c73ededaa((null)=Pin<&mut myapp::main::{async_block_env#0}> @ 0x00007fffffffbd98, (null)=ResumeTy @ 0x00007fffffffbda0) at main.rs:35:30`