You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by 吕鹏 <lv...@gmail.com> on 2011/09/14 16:49:39 UTC

core dump occurred on thrift c++ client side

    My thrift server is written by java, and client by c++. when i call the
client method, the client can send request to server successfully, but core
 dump occurred when the client receives the server's response. Code is as
follows, how can i solve this problem?

server java code:
TServerTransport serverTransport = new TServerSocket(41111);
WdbInterface.Processor processor = new WdbInterface.Processor(
new WdbImpl());
TThreadPoolServer.Args args = new TThreadPoolServer.Args(
serverTransport);
args.processor(processor);
server = new TThreadPoolServer(args);
server.serve();
client c++ code:
                        boost::shared_ptr<TSocket> socket(new
TSocket("localhost", 41111));
                        boost::shared_ptr<TTransport> transport(new
TBufferedTransport(socket));
                        boost::shared_ptr<TProtocol> protocol(new
TBinaryProtocol(transport));
                        WdbInterfaceClient client(protocol);
                        transport->open();
                        client.call();*//core dump *
                        transport->close();