Re: [protobuf] Re: Problem : Serialized in protobuf-net, deserialize in C++ app
OK, can you file an issue report, then? I suppose it would not be too terrible to make this part of the release post-processing step. On Wed, Mar 17, 2010 at 11:19 AM, Austin Ziegler wrote: > On Wed, Mar 17, 2010 at 1:07 PM, Kenton Varda wrote: > > On Tue, Mar 16, 2010 at 7:44 PM, Austin Ziegler > > wrote: > >> Except in the case where the user has both VS2005 and VS2008 installed > >> on the same system. > > Oh, right. Sorry. > > Urgh. I'll think about it. This is the first I've heard of this > problem, > > though. Is it really that common? > > Common enough that I think it's worth doing something about it. We're > going to be facing the VS2010 problem by the end of the year, in > house. > > -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
On Wed, Mar 17, 2010 at 1:07 PM, Kenton Varda wrote: > On Tue, Mar 16, 2010 at 7:44 PM, Austin Ziegler > wrote: >> Except in the case where the user has both VS2005 and VS2008 installed >> on the same system. > Oh, right. Sorry. > Urgh. I'll think about it. This is the first I've heard of this problem, > though. Is it really that common? Common enough that I think it's worth doing something about it. We're going to be facing the VS2010 problem by the end of the year, in house. -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
On Tue, Mar 16, 2010 at 7:44 PM, Austin Ziegler wrote: > Except in the case where the user has both VS2005 and VS2008 installed > on the same system. Oh, right. Sorry. Urgh. I'll think about it. This is the first I've heard of this problem, though. Is it really that common? -- 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
On Tue, Mar 16, 2010 at 10:21 PM, Kenton Varda wrote: > On Tue, Mar 16, 2010 at 6:11 PM, Austin Ziegler > wrote: >> On Tue, Mar 16, 2010 at 3:24 PM, Kenton Varda wrote: >> > I do test each release with both VS2005 and VS2008, and haven't seen >> > that >> > problem before. Odd. >> Do you have 2005 and 2008 on a single system, or are they on >> independent systems? If they're on the same system, VS does not always >> offer to upgrade, but opens the VS projects in the same VS that they >> were created in. You have to explicitly force them to upgrade. > Different systems. >> I agree that if you can avoid it, you shouldn't maintain two different >> sets of vsproj files, but if all you're doing is downconverting a >> vs2008 vsproj to vs2005, then it couldn't hurt to ship both in the >> tarball, even in separate directories. > It also wouldn't help, because they are exactly the same except for the > version number, and if a VS2008 user tries to open them, it auto-converts > them to VS2008. Except in the case where the user has both VS2005 and VS2008 installed on the same system. As many of the developers at my place of work do. If you give me VS2005 projects and I have both VS2005 and VS2008 installed, I have to explicitly open the VS2005 projects with VS2008 to make them work. This also may not work in scenarios where someone may need to provide compiled versions that work with VS2005 and VS2008 (separately built versions). It's able to be worked around (we copied the VS2005 projects to a new directory and forced them to be opened with VS2008), but it is a little annoying. -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
On Tue, Mar 16, 2010 at 6:11 PM, Austin Ziegler wrote: > On Tue, Mar 16, 2010 at 3:24 PM, Kenton Varda wrote: > > I do test each release with both VS2005 and VS2008, and haven't seen that > > problem before. Odd. > > Do you have 2005 and 2008 on a single system, or are they on > independent systems? If they're on the same system, VS does not always > offer to upgrade, but opens the VS projects in the same VS that they > were created in. You have to explicitly force them to upgrade. > Different systems. > I agree that if you can avoid it, you shouldn't maintain two different > sets of vsproj files, but if all you're doing is downconverting a > vs2008 vsproj to vs2005, then it couldn't hurt to ship both in the > tarball, even in separate directories. > It also wouldn't help, because they are exactly the same except for the version number, and if a VS2008 user tries to open them, it auto-converts them to VS2008. -- 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
On Tue, Mar 16, 2010 at 3:24 PM, Kenton Varda wrote: > I do test each release with both VS2005 and VS2008, and haven't seen that > problem before. Odd. Do you have 2005 and 2008 on a single system, or are they on independent systems? If they're on the same system, VS does not always offer to upgrade, but opens the VS projects in the same VS that they were created in. You have to explicitly force them to upgrade. I agree that if you can avoid it, you shouldn't maintain two different sets of vsproj files, but if all you're doing is downconverting a vs2008 vsproj to vs2005, then it couldn't hurt to ship both in the tarball, even in separate directories. -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
I do test each release with both VS2005 and VS2008, and haven't seen that problem before. Odd. On Mon, Mar 15, 2010 at 10:54 PM, Roey Lehman wrote: > 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
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
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
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
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 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 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. > -- 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 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
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.
[protobuf] Re: Problem : Serialized in protobuf-net, deserialize in C++ app
The problem was that Protocol Buffers comes with a default VS2005 project, and my application is in VS2008. Had to convert protobuf VS2005 to VS2008 and everything runs just fine. It seems that one of the STL Libraries had been changed between VS8 and VS9 and so was throwing all kinds of weird error/linkage errors. Thanks for all the help. Roey On Mar 11, 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.- Hide quoted text - > > - Show quoted text - -- 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
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.
Re: [protobuf] Re: Problem : Serialized in protobuf-net, deserialize in C++ app
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.
[protobuf] Re: Problem : Serialized in protobuf-net, deserialize in C++ app
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.
[protobuf] Re: Problem : Serialized in protobuf-net, deserialize in C++ app
The crash occurs in my auto-generated cc file for the google proto structs , on this line : // 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( <--- crash occurs here input, this->mutable_data())); I do not know what this macro/code is trying to do (I guess it's trying to deserialize my data field) On Mar 11, 4:24 pm, Michael Poole wrote: > Roey writes: > > [snip] > > > The problem is, I get a memory access violation when I try to > > deserialize it :( > > Unhandled exception at 0x02f166d8 in wmplayer.exe: 0xC005: Access > > violation writing location 0x. > > > Are any of the things I'm doing here wrong , for what I'm trying to do > > (serialize in C# .NET and deserialize in C++?) > > Most likely yes, but it's hard to suggest what that is without a brief > code example that shows the crash. The crash is obviously trying to > write into a null pointer, but only you can find out what code is at > address 0x02f166d8. > > Michael Poole -- 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.