[protobuf] Re: nested message not read properly. (_has_bits is not set?)

2011-12-21 Thread alok
Apologies for incorrect values of _has_bits in my prev message. Those were the addresses of the variable _has_bits. But the behvaior of the _has_bits is same. When I initialize the header while writing using cMsg.mutable_header(), it sets the 3rd bit in _has_bits and the value of _has_bits is 7 (

[protobuf] Re: nested message not read properly. (_has_bits is not set?)

2011-12-21 Thread alok
On further investigation, looks like the issue could be due to the limits. I have following code code lim = coded_input-PushLimit(objlen); cMsg.ParseFromCodedStream(coded_input); coded_input-PopLimit(lim); cmsgsize = cMsg.ByteSize(); /code Above, the value of objlen is 44. The

[protobuf] Re: nested message not read properly. (_has_bits is not set?)

2011-12-21 Thread alok
The issue is resolved now. Made the same mistake which I did in the past. Forgot to open the file in the binary mode. It encountered an early eof cuz of text mode. Now its working fine. thanks, Alok On Dec 22, 11:25 am, alok alok.jad...@gmail.com wrote: On further investigation, looks like the