I cannot find the ReadBytes function inside wire_format_lite_inl.h.
How come?


On Thu, Mar 11, 2010 at 10:21 PM, Kenton Varda <ken...@google.com> wrote:

> Please keep the mailing list CC'd so that others can help.
>
> The input_ field is normally null when parsing from a flat array, so that's
> not the problem.
>
> ReadBytes() is an inline function found in
> google/protobuf/wire_format_lite_inl.h.  Your debugger should be able to
> descend into it.  You may have to compile with optimization disabled so that
> it doesn't actually inline the function.
>
>
> On Thu, Mar 11, 2010 at 12:11 PM, Roey Lehman <roey...@gmail.com> wrote:
>
>>  Hi Kenton, thanks for the reply.
>>
>> this line causes the access violation :
>> DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(input,
>> this->mutable_data()));
>>
>> I checked this in the debugger. This->  , is not null, and is the message
>> object itself.
>>
>> Input is a CodedInputStream type, and it is not null either.
>> I haven't the code for ReadBytes, I don't know what goes on inside it, but
>> I can tell you that the "input_" field of the CodedInputStream, is null.
>> (the "buffer_" field is not null ).
>>
>> since I can't delve into ReadBytes, I have no idea what's causing the
>> access violation....
>>
>>
>>
>> On Thu, Mar 11, 2010 at 9:44 PM, Kenton Varda <ken...@google.com> wrote:
>>
>>> OK, so, which pointer is null?
>>>
>>> We can't do this for you.  You are the only one who can run your code in
>>> the debugger.
>>>
>>> If you want us to debug it, you need to provide a small, self-contained
>>> example program demonstrating the problem.  Just C++ code and input data is
>>> needed -- the C# part is not necessary.
>>>
>>>  On Thu, Mar 11, 2010 at 5:56 AM, Roey <roey...@gmail.com> wrote:
>>>
>>>> Just to clarify , the access violation occurs inside the
>>>> ParseFromArray function, right when it tries to parse the second field
>>>> of the struct ("data"),
>>>> this is the code that crashes inside the cc file :
>>>>
>>>>  // optional bytes Data = 2;
>>>>      case 2: {
>>>>        if
>>>> (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
>>>>
>>>>  ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED)
>>>> {
>>>>         parse_Data:
>>>>
>>>> DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
>>>>  <--------------
>>>> This crashes
>>>>                input, this->mutable_data()));
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Protocol Buffers" group.
>>>> To post to this group, send email to proto...@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@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 proto...@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