Re: [protobuf] Re: Problem : Serialized in protobuf-net, deserialize in C++ app

2010-03-16 Thread Roey Lehman
appearantly I didn't notice that when I clicked the .sln file, it opened
with VS2005...
I only started looking into it when compilation failed with the 2005
version.
Linking with the 2005 version failed, the linker error I got was something
to do with std::Base_container contstructor/destructor. I guess that's what
changed between VS2005 and VS2008.



On Tue, Mar 16, 2010 at 12:16 AM, Kenton Varda  wrote:

> I actually maintain the project files using VS2008, but I run a hack script
> that "downgrades" them to VS2005 (by simply replacing the version number)
> before release so that VS2005 users can use the package.
>
> I'm confused about how you managed to compile the project using VS2008
> without it automatically "upgrading" the files.  Doesn't VS immediately
> prompt you to upgrade when you open them?  I'm also confused why compilation
> would fail, considering that the only difference between the 2005 and 2008
> versions of the project files is the version number.
>
> I definitely do not want to try to maintain two separate copies of the VS
> project files.  Maintaining one set is already painful enough.  I really
> dislike the MSVC build system.
>
> On Sun, Mar 14, 2010 at 2:49 PM, Austin Ziegler wrote:
>
>> On Sun, Mar 14, 2010 at 3:15 PM, Marc Gravell 
>> wrote:
>> > 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?
>>
>> We've got some VS2008 versions we can contribute; we deliberately
>> created them in parallel to to the existing vs/ directory.
>>
>> -austin
>> --
>> Austin Ziegler • halosta...@gmail.com • aus...@halostatue.ca
>> http://www.halostatue.ca/ • http://twitter.com/halostatue
>>
>
>

-- 
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.



Re: [protobuf] Re: Problem : Serialized in protobuf-net, deserialize in C++ app

2010-03-14 Thread Roey Lehman
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  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  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  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  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
>>>> .
>>>> 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.