Im the silly user, that didnt read the docs right, and I set the file path in GOOGLE_APPLICATION_CREDENTIALS.
the result of that is a crash with this stack trace
`(gdb) info stack
0 0x00007ffacbb06a40 in grpc_impl::CompositeChannelCredentials(std::shared_ptr const&, std::shared_ptr const&) () at /usr/local/lib/libgrpc++.so.1
1 0x00007ffa880290ed in grpc::CompositeChannelCredentials (call_creds=std::shared_ptr (empty) = {...}, channel_creds=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr<grpc_impl::SecureChannelCredentials*, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr<grpc_impl::SecureChannelCredentials*, (__gnu_cxx::_Lock_policy)2>'
std::shared_ptr (use count 1, weak count 0) = {...})
at /usr/local/include/grpcpp/security/credentials.h:80
2 0x00007ffa880290ed in GStreamer::GStreamer(switch_core_session, char const, char, char, char*)
8 0x00007ffa820088a1 in _wrap_API_execute(lua_State*) (L=0x7ffa4c006cc0) at mod_lua_wrap.cpp:3309
9 0x00007ffa81dc2c75 in () at /lib/x86_64-linux-gnu/liblua5.2.so.0
10 0x00007ffa81dce825 in () at /lib/x86_64-linux-gnu/liblua5.2.so.0
11 0x00007ffa81dc2f9e in () at /lib/x86_64-linux-gnu/liblua5.2.so.0`
the call to grpc::ServiceAccountJWTAccessCredentials(var); is actually fine, I'm just going to go out on a limb here and suggest that grpc::ServiceAccountJWTAccessCredentials(var); returns a nil pointer in this case which then causes the crash when nil is passed to grpc::CompositeChannelCredentials
The real solution is for people such as myself to not do silly things, however we have to protect against segfaults :)
Im the silly user, that didnt read the docs right, and I set the file path in GOOGLE_APPLICATION_CREDENTIALS.
the result of that is a crash with this stack trace `(gdb) info stack
0 0x00007ffacbb06a40 in grpc_impl::CompositeChannelCredentials(std::shared_ptr const&, std::shared_ptr const&) () at /usr/local/lib/libgrpc++.so.1
1 0x00007ffa880290ed in grpc::CompositeChannelCredentials (call_creds=std::shared_ptr (empty) = {...}, channel_creds=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr<grpc_impl::SecureChannelCredentials*, (__gnu_cxx::_Lock_policy)2>'
warning: RTTI symbol not found for class 'std::_Sp_counted_ptr<grpc_impl::SecureChannelCredentials*, (__gnu_cxx::_Lock_policy)2>' std::shared_ptr (use count 1, weak count 0) = {...})
at /usr/local/include/grpcpp/security/credentials.h:80
2 0x00007ffa880290ed in GStreamer::GStreamer(switch_core_session, char const, char, char, char*)
3 0x00007ffa88023f90 in google_dialogflow_session_init(switch_core_session_t, responseHandler_t, errorHandler_t, uint32_t, char, char, char, char*, cap_cb**)
4 0x00007ffa88021dbf in start_capture (flags=17, text=0x7ffa4c0368e1 "Text", event=0x7ffa4c0368d9 "Welcome", projectId=0x7ffa4c0368c5 "newagent-tape", lang=0x7ffa4c0368d3 "en-AU", session=0x7ffaa4036358) at mod_dialogflow.c:100
5 0x00007ffa88021dbf in dialogflow_api_start_function (cmd=, session=, stream=0x7ffa81c45f00) at mod_dialogflow.c:172
6 0x00007ffacce25fd5 in switch_api_execute
7 0x00007ffaccebdca7 in API::execute(char const, char const) (this=0x7ffa4c009dd0, cmd=cmd@entry=0x7ffa4c036e18 "dialogflow_start", arg=0x7ffaa402ad38 "e03fdfb4-3a07-4191-9889-b9c01ccde552 newagent-tape en-AU Welcome Text")
8 0x00007ffa820088a1 in _wrap_API_execute(lua_State*) (L=0x7ffa4c006cc0) at mod_lua_wrap.cpp:3309
9 0x00007ffa81dc2c75 in () at /lib/x86_64-linux-gnu/liblua5.2.so.0
10 0x00007ffa81dce825 in () at /lib/x86_64-linux-gnu/liblua5.2.so.0
11 0x00007ffa81dc2f9e in () at /lib/x86_64-linux-gnu/liblua5.2.so.0`
the call to grpc::ServiceAccountJWTAccessCredentials(var); is actually fine, I'm just going to go out on a limb here and suggest that grpc::ServiceAccountJWTAccessCredentials(var); returns a nil pointer in this case which then causes the crash when nil is passed to grpc::CompositeChannelCredentials
The real solution is for people such as myself to not do silly things, however we have to protect against segfaults :)