[protobuf] Re: Issue 574 in protobuf: generated header function ::mutable_ attempts to initialize by dereferencing an uninitialized default
Comment #1 on issue 574 by sizefi...@gmail.com: generated header function ::mutable_ attempts to initialize by dereferencing an uninitialized default http://code.google.com/p/protobuf/issues/detail?id=574 Ooops tried to abstract the version field name with 'myfield' in the example code above and missed a couple entries before submitting... yes, myfield was actually version. Here's the proto line entry... required string version = 1 [default="0.0.0.0"]; -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Issue 574 in protobuf: generated header function ::mutable_ attempts to initialize by dereferencing an uninitialized default
Status: New Owner: liuj...@google.com Labels: Type-Defect Priority-Medium New issue 574 by sizefi...@gmail.com: generated header function ::mutable_ attempts to initialize by dereferencing an uninitialized default http://code.google.com/p/protobuf/issues/detail?id=574 What steps will reproduce the problem? 1. Create a global class instance whose constructor calls GPB's ParseFromArray on GPB object 2. ParseFromArray will attempt to initialize values to defaults 3. Default has not yet been assigned, e.g. _default__ is null What is the expected output? What do you see instead? _ value should be defaulted, instead an access violation error occurs (from new ::std::string(*null)) where _default is unassigned. What version of the product are you using? On what operating system? 2.5.0 on Windows 7 64-bit (32-bit build of GPB), VS2012 SP1 Please provide any additional information below. The timing of global and static object construction will ultimately affect whether or not this violation happens. I was able to avert disaster by checking for null on _default_version_ however it forced me to not assign the default. This probably may not be easily replicated unless static GPB initializers happenstance execute after the global object is created. // this is the generated function in the C++ header: inline ::std::string* mytype::mutable_myfield() { set_has_myfield(); if (version_ == _default_myfield_) { version_ = new ::std::string(*_default_myfield_); } return myfield_; } // this is the generated function in the C++ implementation which // is supposed to initialize the defaults, but happens after the above // is called. void protobuf_AddDesc_mytype_2eproto(); -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Re: Issue 573 in protobuf: how to install google protocol buffer on windows??
Updates: Status: Invalid Comment #1 on issue 573 by xiaof...@google.com: how to install google protocol buffer on windows?? http://code.google.com/p/protobuf/issues/detail?id=573 There isn't a installer version of protobuf. You just run the protoc binary directly to compile .proto files. Like other command line tools, "protoc --help" will give you some helpful information on how to run the tool. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Issue 573 in protobuf: how to install google protocol buffer on windows??
Status: New Owner: liuj...@google.com Labels: Type-Defect Priority-Medium New issue 573 by ar.vina...@gmail.com: how to install google protocol buffer on windows?? http://code.google.com/p/protobuf/issues/detail?id=573 I have downloaded the protoc-2.5.0-win32 ... In the readme.txt it just asks me to create a path for the binary. Please help me on How to compile a *.proto file ?? -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.