I'm really glad you found the cause of this; you had me worried I'd done something horrible with the .NET encoding ;-p
Probably one for Kenton, but I wonder if it might be prudent to include VS2008 (and presumably VS2010) project files for the core project? Marc On 14 March 2010 07:25, Roey Lehman <[email protected]> wrote: > 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 [email protected]. >>>>> To unsubscribe from this group, send email to >>>>> [email protected]<protobuf%[email protected]> >>>>> . >>>>> >>>>> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<protobuf%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > -- Regards, Marc -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
