Basic rule: if the memory is used outside the lifetime of the function call, 
you don't want it on the stack. Async_write very much requires the memory to be 
around later.

--Chris

On Jul 6, 2011, at 10:10 AM, platzhirsch <konrad.rei...@googlemail.com> wrote:

> I find it difficult to check this by so many messages. This approach
> was suggested by some people already, I don't know how I would realize
> this.
> 
> On Jul 6, 6:56 pm, Jason Hsueh <jas...@google.com> wrote:
>> I'm not familiar with the boost libraries you're using, but the use of
>> "async_write" and the stack-allocated streambuf looks suspect. If nothing
>> jumps out there, I would first check that the data read from the socket in
>> Java exactly matches the data on the C++ side.
>> 
>> On Sat, Jul 2, 2011 at 8:55 AM, platzhirsch 
>> <konrad.rei...@googlemail.com>wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Some other exceptions I receive as well:
>> 
>>> Protocol message tag had invalid wire type.
>>> Protocol message end-group tag did not match expected tag.
>>> While parsing a protocol message, the input ended unexpectedly in the
>>> middle of a field.  This could mean either than the input has been
>>> truncated or that an embedded message misreported its own length.
>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Protocol Buffers" group.
>>> To post to this group, send email to protobuf@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> protobuf+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/protobuf?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Protocol Buffers" group.
> To post to this group, send email to protobuf@googlegroups.com.
> To unsubscribe from this group, send email to 
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/protobuf?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to