Hi,

I have created static lib libproto_gen.a from all proto generated files and 
linked it to other lib i.e. libcomm.so . Now inside comm i'm using only 2 
proto files messages and one of them imports third proto file i.e. 
general.proto . Here inside comm i'm not explicitly using any message from 
general.proto and not even including its header in source files.
My comm lib is getting build successfully so i'm linking this libcomm.so to 
application and trying to use ShortDebugString and DebugString on message 
inside general.proto , this leads to crash 

Example : comm.proto

syntax = "proto3";
import "general/general.proto";

message MyMessage 
{}

Output: After running application

WARNING: All log messages before absl::InitializeLog() is called are 
written to STDERR
F0000 00:00:1756447204.077746 3718630 generated_message_reflection.cc:3620] 
Check failed: file != nullptr 
*** Check failure stack trace: ***
@0x71283668effb absl::lts_20240116::log_internal::LogMessage:: PrepareToDie 
@0x71283668f06b absl::1ts_20240116::log_internal::LogMessage: SendToLog()
@0x71283668eb04 absl::1ts_20240116::log_internal::LogMessage: Flush()
@0x71283668f33c absl::1ts_20240116::log_internal::LogMessage 
Fatal::~LogMessage Fatal() 
@0x459f2f google::protobuf:: (anonymous namespace) :: 
AssignDescriptorsImpl() 
@0x45alde google::protobuf::internal::AssignDescriptorsOnce InnerCall() 
@0x503bb3 google::protobuf::Message::GetMetadataImpl() :: (lambda () 
#1}::operator() ()
@0x5071ae absl::1ts_20240116: :base_internal::Callable::Invoke<>()
@0x506514 absl::1ts_20240116: :base_internal::invoke<>()
@0x504ba8 absl::1ts_20240116::base_internal::CallOnce Impl<>()
@0x504ef7 absl::1ts_20240116::call_once<>()
@0x503c21 google::protobuf::Message::GetMetadataImpl()
@0x503b95 google::protobuf::Message::GetMetadata() 
@0x46241c google::protobuf::Message::GetReflection ()
@0x52990e google::protobuf:: Text Format:: Printer::Print () 
@0x5291d6 google::protobuf::Text Format:: Printer::Print ()
@0x528fel google::protobuf:: Text Format:: Printer::PrintToString() 
@0x5255ce google::protobuf::Message:: Short DebugString [abi:cxx11] ()
@0x4349ba main
@0x7f2833249ca3 _libc_start_main
Aborted 

But when i don't import general.proto in comm.proto and build libcomm.so 
and link comm.so to application ShortDebugString and DebugString for 
general.proto works fine. Help me understanding this scenario why its 
happening? Also provide solution if you have applied any solution for your 
situation if you ever faced this.

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/grpc-io/a2ac915b-07ba-43cf-b8d2-9f1617a4c439n%40googlegroups.com.

Reply via email to