[protobuf] Re: Problems de-serialising a string, C++
Hi I've solved this now. The problem was in the wrapper class I was provided. Sorry. Regards Iain On Jan 29, 10:31 pm, Iain Walsh iain.d.wa...@googlemail.com wrote: Hi It's a fairly simple program despite the size. Most of it is just turning the Log into html. The main.cpp just creates a bunch of log events via a wrapper class (again quite simple) serialises them, then reads them back in and converts the part that is re-serialised into html. I will try to provide an even simpler version than this, I assumed the wrapper classes would be handy for debugging purposes, however protobuffer libraries don't seem to compile on my home laptop. Regards, Iain On 29 January 2010 19:20, Kenton Varda ken...@google.com wrote: Sorry, I can only debug something small, but your example is 1000 lines of code, most of it unrelated to protobufs. Please reduce this to a program that simply initializes your message, writes it to a file, reads back the same file, and print the message. It should be only one C++ source file and a .proto file. On Fri, Jan 29, 2010 at 10:09 AM, Iain Walsh iain.d.wa...@googlemail.comwrote: Hi I've provided a slightly silly example in a zip file. I had to rename everything for work security reasons. I'm using 2.3.0 RC2 To create the problem remove the comment from line 146 main.cpp then it will start crashing. Regards Iain On 29 January 2010 11:49, iWalsh iain.d.wa...@googlemail.com wrote: Hi I'm working on a self contained example, I'll have to edit it because it's a bit sensitive for work. I also checked and the files are open in binary mode. Regards Iain On Jan 28, 8:48 pm, Kenton Varda ken...@google.com wrote: There's a bug in your code, but I don't know what. Can you please reduce it to a small, self-contained example and send it to the list? On Thu, Jan 28, 2010 at 11:47 AM, iWalsh iain.d.wa...@googlemail.com wrote: Ah Sorry I should also mention that leaving the mac address field empty/default means that the file works correctly. On Jan 28, 7:45 pm, iWalsh iain.d.wa...@googlemail.com wrote: Hi Thanks for the reply. The methods are both returning correctly. It's the only thing I write to the file. They are also open in binary mode I think, I'll have to double check the binary mode part. Regards Iain -- 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.comprotobuf%2bunsubscr...@googlegroups.com protobuf%2bunsubscr...@googlegroups.comprotobuf%252bunsubscr...@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.comprotobuf%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.comprotobuf%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.
Re: [protobuf] Re: Problems de-serialising a string, C++
This is why I ask people to whittle down their examples: they usually find the problem in the process. :) Glad you figured it out! On Mon, Feb 1, 2010 at 8:19 AM, iWalsh iain.d.wa...@googlemail.com wrote: Hi I've solved this now. The problem was in the wrapper class I was provided. Sorry. Regards Iain On Jan 29, 10:31 pm, Iain Walsh iain.d.wa...@googlemail.com wrote: Hi It's a fairly simple program despite the size. Most of it is just turning the Log into html. The main.cpp just creates a bunch of log events via a wrapper class (again quite simple) serialises them, then reads them back in and converts the part that is re-serialised into html. I will try to provide an even simpler version than this, I assumed the wrapper classes would be handy for debugging purposes, however protobuffer libraries don't seem to compile on my home laptop. Regards, Iain On 29 January 2010 19:20, Kenton Varda ken...@google.com wrote: Sorry, I can only debug something small, but your example is 1000 lines of code, most of it unrelated to protobufs. Please reduce this to a program that simply initializes your message, writes it to a file, reads back the same file, and print the message. It should be only one C++ source file and a .proto file. On Fri, Jan 29, 2010 at 10:09 AM, Iain Walsh iain.d.wa...@googlemail.comwrote: Hi I've provided a slightly silly example in a zip file. I had to rename everything for work security reasons. I'm using 2.3.0 RC2 To create the problem remove the comment from line 146 main.cpp then it will start crashing. Regards Iain On 29 January 2010 11:49, iWalsh iain.d.wa...@googlemail.com wrote: Hi I'm working on a self contained example, I'll have to edit it because it's a bit sensitive for work. I also checked and the files are open in binary mode. Regards Iain On Jan 28, 8:48 pm, Kenton Varda ken...@google.com wrote: There's a bug in your code, but I don't know what. Can you please reduce it to a small, self-contained example and send it to the list? On Thu, Jan 28, 2010 at 11:47 AM, iWalsh iain.d.wa...@googlemail.com wrote: Ah Sorry I should also mention that leaving the mac address field empty/default means that the file works correctly. On Jan 28, 7:45 pm, iWalsh iain.d.wa...@googlemail.com wrote: Hi Thanks for the reply. The methods are both returning correctly. It's the only thing I write to the file. They are also open in binary mode I think, I'll have to double check the binary mode part. Regards Iain -- 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.comprotobuf%2bunsubscr...@googlegroups.com protobuf%2bunsubscr...@googlegroups.comprotobuf%252bunsubscr...@googlegroups.com protobuf%2bunsubscr...@googlegroups.comprotobuf%252bunsubscr...@googlegroups.com protobuf%252bunsubscr...@googlegroups.comprotobuf%25252bunsubscr...@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.comprotobuf%2bunsubscr...@googlegroups.com protobuf%2bunsubscr...@googlegroups.comprotobuf%252bunsubscr...@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.comprotobuf%2bunsubscr...@googlegroups.com protobuf%2bunsubscr...@googlegroups.comprotobuf%252bunsubscr...@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.comprotobuf%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.
[protobuf] Re: Problems de-serialising a string, C++
Hi I'm working on a self contained example, I'll have to edit it because it's a bit sensitive for work. I also checked and the files are open in binary mode. Regards Iain On Jan 28, 8:48 pm, Kenton Varda ken...@google.com wrote: There's a bug in your code, but I don't know what. Can you please reduce it to a small, self-contained example and send it to the list? On Thu, Jan 28, 2010 at 11:47 AM, iWalsh iain.d.wa...@googlemail.comwrote: Ah Sorry I should also mention that leaving the mac address field empty/default means that the file works correctly. On Jan 28, 7:45 pm, iWalsh iain.d.wa...@googlemail.com wrote: Hi Thanks for the reply. The methods are both returning correctly. It's the only thing I write to the file. They are also open in binary mode I think, I'll have to double check the binary mode part. Regards Iain -- 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.comprotobuf%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.
Re: [protobuf] Re: Problems de-serialising a string, C++
Sorry, I can only debug something small, but your example is 1000 lines of code, most of it unrelated to protobufs. Please reduce this to a program that simply initializes your message, writes it to a file, reads back the same file, and print the message. It should be only one C++ source file and a .proto file. On Fri, Jan 29, 2010 at 10:09 AM, Iain Walsh iain.d.wa...@googlemail.comwrote: Hi I've provided a slightly silly example in a zip file. I had to rename everything for work security reasons. I'm using 2.3.0 RC2 To create the problem remove the comment from line 146 main.cpp then it will start crashing. Regards Iain On 29 January 2010 11:49, iWalsh iain.d.wa...@googlemail.com wrote: Hi I'm working on a self contained example, I'll have to edit it because it's a bit sensitive for work. I also checked and the files are open in binary mode. Regards Iain On Jan 28, 8:48 pm, Kenton Varda ken...@google.com wrote: There's a bug in your code, but I don't know what. Can you please reduce it to a small, self-contained example and send it to the list? On Thu, Jan 28, 2010 at 11:47 AM, iWalsh iain.d.wa...@googlemail.com wrote: Ah Sorry I should also mention that leaving the mac address field empty/default means that the file works correctly. On Jan 28, 7:45 pm, iWalsh iain.d.wa...@googlemail.com wrote: Hi Thanks for the reply. The methods are both returning correctly. It's the only thing I write to the file. They are also open in binary mode I think, I'll have to double check the binary mode part. Regards Iain -- 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.comprotobuf%2bunsubscr...@googlegroups.com protobuf%2bunsubscr...@googlegroups.comprotobuf%252bunsubscr...@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.comprotobuf%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.comprotobuf%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.
[protobuf] Re: Problems de-serialising a string, C++
Hi Thanks for the reply. The methods are both returning correctly. It's the only thing I write to the file. They are also open in binary mode I think, I'll have to double check the binary mode part. Regards Iain -- 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: Problems de-serialising a string, C++
Ah Sorry I should also mention that leaving the mac address field empty/default means that the file works correctly. On Jan 28, 7:45 pm, iWalsh iain.d.wa...@googlemail.com wrote: Hi Thanks for the reply. The methods are both returning correctly. It's the only thing I write to the file. They are also open in binary mode I think, I'll have to double check the binary mode part. Regards Iain -- 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: Problems de-serialising a string, C++
There's a bug in your code, but I don't know what. Can you please reduce it to a small, self-contained example and send it to the list? On Thu, Jan 28, 2010 at 11:47 AM, iWalsh iain.d.wa...@googlemail.comwrote: Ah Sorry I should also mention that leaving the mac address field empty/default means that the file works correctly. On Jan 28, 7:45 pm, iWalsh iain.d.wa...@googlemail.com wrote: Hi Thanks for the reply. The methods are both returning correctly. It's the only thing I write to the file. They are also open in binary mode I think, I'll have to double check the binary mode part. Regards Iain -- 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.comprotobuf%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.