g_core_codegen_interface is nullptr

305 views
Skip to first unread message

Paul Fleming

unread,
Nov 15, 2016, 8:42:39 PM11/15/16
to grpc.io
Hello,

I'm having the following runtime error "grpc::g_core_codegen_interface was nullptr." Using C++, protobufs 3.1, Windows64 VS2015  

Error occurs during the unary call wrapper, on the completequeue constructor.  I am linking against grpc++/grpc++_{unsecure/reflection} correctly. (Can anyone define when to use reflection/unsecure? Unsecure seems to be for openssl-less linkage but still unclear on proper linkage requirements).

Any clues where I may be going wrong? This is sadly using a more complex building system (UBT/UHT from Epics Unreal Engine) that may be complicating issues but some clues on debugging would be wonderful!

Example Code:
TCClient::LoginRequest loginRequest;
TCClient::AuthResponse loginResponse;
ClientContext context;
loginRequest.set_email(TCHAR_TO_UTF8( *AccountCredentials.Id) );
loginRequest.set_pass(TCHAR_TO_UTF8( *AccountCredentials.Token) );


Status result = CommClient->LoginWithEmailAddress(&context, loginRequest, &loginResponse);
if (result.ok()) {
UE_LOG_ONLINE(Display, TEXT("Logged in user: %s"), *AccountCredentials.Id );
return true;


Error:
Exception thrown: read access violation.
grpc::g_core_codegen_interface was nullptr.

Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method,
                         ClientContext* context, const InputMessage& request,
                         OutputMessage* result) {
  -> CompletionQueue cq;


Thank you for any assistance.


Vijay Pai

unread,
Dec 5, 2016, 3:34:24 PM12/5/16
to grpc.io
Sorry for the late response and the cryptic error message. Many common classes derive from the struct that triggers an initialization of that particular variable, so I'm a little surprised to see this. Is your code actually instantiating a Channel at some point? This should have happened before the BlockingUnaryCall wrapper was called.
Reply all
Reply to author
Forward
0 new messages