Kelsey Bekkedahl | 22 Oct 16:43 2014
Picon

How to link against debug build for protocol buffers

In the README file for Protocol Buffers for Visual studio, it states "To avoid conflicts between the MSVC debug and release runtime libraries, when compiling a debug build of your application, you may need to link against a debug build of libprotobuf.lib. Similarly, release builds should link against release libs." How do I link against a debug build of libprotobuf in Visual Studio 2012? Thanks ahead of time!

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Feng Xiao | 22 Oct 01:31 2014
Picon

Protocol Buffers 2.6.1

Hi all,

I just published Protocol Buffers v2.6.1:
https://github.com/google/protobuf/releases/tag/2.6.1

2014-10-20 version 2.6.1:

  C++
  * Added atomicops support for Solaris.
  * Released memory allocated by InitializeDefaultRepeatedFields() and
    GetEmptyString(). Some memory sanitizers reported them as memory leaks.

  Java
  * Updated DynamicMessage.setField() to handle repeated enum values
    correctly.
  * Fixed a bug that caused NullPointerException to be thrown when
    converting manually constructed FileDescriptorProto to
    FileDescriptor.

  Python
  * Fixed WhichOneof() to work with de-serialized protobuf messages.
  * Fixed a missing file problem of Python C++ implementation.

I'll soon upload it to Maven and pypi for Java and Python respectively.

Cheers,
Feng

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
protobuf | 21 Oct 21:32 2014

Issue 676 in protobuf: protoc does not warn for Java keyword "super"

Status: New
Owner: liujisi <at> google.com
Labels: Type-Defect Priority-Medium

New issue 676 by klocksve... <at> gmail.com: protoc does not warn for Java  
keyword "super"
https://code.google.com/p/protobuf/issues/detail?id=676

What steps will reproduce the problem?
1. Be mindless and forget that super is a keyword and try to use it as an  
enum identifier.
2. Create protofile:
enum SuperEnum {
   super = 1;
}

message SuperMessage {
   required SuperEnum super = 1;
}

3. compile with protoc
4. compile with javac
5. Get confused, because a moment ago before some copy and paste  
acrobatics, everything worked just fine and the cause is obfuscated by  
unrelated errors.

What is the expected output? What do you see instead?
protoc should warn or deny to use identifier "super", instead it does not  
show any warning.

javac does not compile with error
SuperEnumMessage.java:13: error: <identifier> expected
       implements com.google.protobuf.ProtocolMessageEnum {
and tons of subsequent errors.

What version of the product are you using? On what operating system?
protoc 2.5.0, java hotspot 1.8.0_25, Linux 64-bit

-- 
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Aijing Sun | 19 Oct 15:58 2014
Picon

can protobuf cost less bytes?

1.if a int value is -1,then through varint 128 serialze is 10 bytes.
2. a bool true is none 0,and false is 0,but it cost 1 byte .

I hope -1 just cost 1 byte,and bool cost no byte.
and it can cost less byte when serialize
and I suggest change wire type:
0(000) --- positive varint
1(001) --- negative  varint
2(010) ---- true
3(011) ---- false
4(100) ---- bit32
5(101) ---- bit64
6(110) ---- Length-delimited


 

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
protobuf | 20 Oct 03:54 2014

Issue 675 in protobuf: memory leak

Status: New
Owner: liujisi <at> google.com
Labels: Type-Defect Priority-Medium

New issue 675 by vxm... <at> gmail.com: memory leak
https://code.google.com/p/protobuf/issues/detail?id=675

A memory leak is detected by vld(visual leak detector).
I think the problem is caused by this function:
void InitEmptyString() {
   empty_string_ = new string;
}
empty_string_ will not be deleted later.

In previous version protobuf-2.5.0, empty string is a global std::string
const ::std::string kEmptyString;

protobuf version: protobuf-2.6.0
OS: windows 8.1
build env: visual studio 2013

Some output generated by vld:
d:\sdk\protobuf\protobuf-2.6.0\src\google\protobuf\generated_message_util.cc  
(55):  
ChatServerd.exe!google::protobuf::internal::InitEmptyString + 0x7  
bytes
d:\sdk\protobuf\protobuf-2.6.0\src\google\protobuf\stubs\common.h (876):  
ChatServerd.exe!google::protobuf::internal::FunctionClosure0::Run + 0xA  
bytes
d:\sdk\protobuf\protobuf-2.6.0\src\google\protobuf\stubs\once.cc (83):  
ChatServerd.exe!google::protobuf::GoogleOnceInitImpl + 0xF bytes
d:\sdk\protobuf\protobuf-2.6.0\src\google\protobuf\stubs\once.h (127):  
ChatServerd.exe!google::protobuf::GoogleOnceInit + 0xD bytes
d:\sdk\protobuf\protobuf-2.6.0\src\google\protobuf\generated_message_util.h  
(84): ChatServerd.exe!google::protobuf::internal::GetEmptyString + 0xF bytes

-- 
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

protobuf | 18 Oct 21:45 2014

Issue 674 in protobuf: protoc: can't control output directory

Status: New
Owner: liujisi <at> google.com
Labels: Type-Defect Priority-Medium

New issue 674 by weegreen... <at> gmail.com: protoc: can't control output  
directory
https://code.google.com/p/protobuf/issues/detail?id=674

May be related to #693.

What steps will reproduce the problem?

1. unzip project

2. change dir
     $ cd protobuf_bug

3. execute expected use case:
     $ protoc -Isrc --cpp_out=. src/audacity/messages/pb/Emitter.proto

4. observe output is unexpected:
     $ find .
     .
     ./audacity
     ./audacity/messages
     ./audacity/messages/pb
     ./audacity/messages/pb/Emitter.pb.h
     ./audacity/messages/pb/Emitter.pb.cc
     ./src
     ./src/audacity
     ./src/audacity/messages
     ./src/audacity/messages/pb
     ./src/audacity/messages/pb/Type.proto
     ./src/audacity/messages/pb/Emitter.proto

5. clean up mess:
     $ rm -rf ./audacity

6. execute next expected use case:
     $ protoc -Isrc --cpp_out=src src/audacity/messages/pb/Emitter.proto

7. observe expected output:
     $ find .
     .
     ./src
     ./src/audacity
     ./src/audacity/messages
     ./src/audacity/messages/pb
     ./src/audacity/messages/pb/Emitter.pb.h
     ./src/audacity/messages/pb/Emitter.pb.cc
     ./src/audacity/messages/pb/Type.proto
     ./src/audacity/messages/pb/Emitter.proto

What is the expected output? What do you see instead?

     From my learning experience with documenting issue #693, I thought  
--cpp_out=. would always work, but once I started getting more complicated,  
when using -Isrc, everything gets hosed.  It seems like -IDIR and  
--cpp_out=DIR must always occur in pairs, this is very unexpected as gcc  
and visual studio compilers have no such behavior.  If multiple -I flags  
are specified, I have no idea how to manipulate --cpp_out.

What version of the product are you using? On what operating system?
     See #693.

Please provide any additional information below.
     See #693.

Attachments:
	protobuf_bug.zip  1.6 KB

-- 
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

protobuf | 18 Oct 21:17 2014

Issue 673 in protobuf: protoc: can't control output directory

Status: New
Owner: liujisi <at> google.com
Labels: Type-Defect Priority-Medium

New issue 673 by weegreen... <at> gmail.com: protoc: can't control output  
directory
https://code.google.com/p/protobuf/issues/detail?id=673

I am working on integrating the protoc compiler to my build system, however  
I'm finding it difficult to control where the output files are saved.

What steps will reproduce the problem?

1. unzip project

2. change directories
     $ cd protobuf_bug

3. execute expected use case:
     $ protoc --cpp_out=src/audacity/messages/pb  
src/audacity/messages/pb/Type.proto

4. observe output files not placed in specified output directory:
     $ find .
     .
     ./src
     ./src/audacity
     ./src/audacity/messages
     ./src/audacity/messages/pb
     ./src/audacity/messages/pb/src
     ./src/audacity/messages/pb/src/audacity
     ./src/audacity/messages/pb/src/audacity/messages
     ./src/audacity/messages/pb/src/audacity/messages/pb
     ./src/audacity/messages/pb/src/audacity/messages/pb/Type.pb.h
     ./src/audacity/messages/pb/src/audacity/messages/pb/Type.pb.cc
     ./src/audacity/messages/pb/Type.proto

5. clean up the mess
     $ rm -rf src/audacity/messages/pb/src

6. execute next expected use case:
     $ protoc --cpp_out=. src/audacity/messages/pb/Type.proto

7. observe correct output:
     $ find .
     .
     ./src
     ./src/audacity
     ./src/audacity/messages
     ./src/audacity/messages/pb
     ./src/audacity/messages/pb/Type.pb.h
     ./src/audacity/messages/pb/Type.pb.cc
     ./src/audacity/messages/pb/Type.proto

What is the expected output? What do you see instead?

     I expect the generated files to be placed in the directory specified,  
instead funny path manipulation is occurring.

What version of the product are you using? On what operating system?

     $ protoc --version
     libprotoc 2.5.0
     $ lsb_release -a
     No LSB modules are available.
     Distributor ID:	Ubuntu
     Description:	Ubuntu 14.04.1 LTS
     Release:	14.04
     Codename:	trusty

Please provide any additional information below.

     Please add some option to explicitly place the generated files to  
specified location, similar to how gcc -o works, as protoc is advertised as  
a compiler.
     The location where protoc places output files isn't explained in the  
documentation, if the default is to always place the output files next to  
the .proto file, then there should be a set of --cpp, --python, --java  
switches which does this, rather some --XXX_out=DIR switch.

Attachments:
	protobuf_buf.zip  1.2 KB

-- 
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Evan Fraser | 17 Oct 23:43 2014
Picon

seralizetostring and parsefromstring

protoc will not add these two methods to my class for some reason. Please let me know what I may be missing and
what's going wrong.

--

-- 
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

protobuf | 17 Oct 01:26 2014

Re: Issue 476 in protobuf: Officially support Maven protoc plugin

Updates:
	Summary: Officially support Maven protoc plugin
	Status: Accepted
	Owner: xiaof... <at> google.com

Comment #10 on issue 476 by xiaof... <at> google.com: Officially support Maven  
protoc plugin
https://code.google.com/p/protobuf/issues/detail?id=476

(No comment was entered for this change.)

-- 
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Tamás Somhegyi | 15 Oct 12:01 2014
Picon

Message encoding question

Hello,

I am quite new to Protocol Buffers but I have read the tutorials. There is one part of the encoding which I don't understand.
How the message types are encoded? As I see the tutorial mentions the field encoding but the field id is unique only in the message.

Best regards,
Tamas

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Tamás Somhegyi | 15 Oct 12:05 2014
Picon

Message encoding question

Hello,

I am quite new to Protocol Buffers but I have read the tutorials. There is one part of the encoding which I don't understand.
How the message types are encoded? As I see the tutorial mentions the field encoding but the field id is unique only in the message.

Best regards,
Tamas

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Gmane