Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Can't serialize more than 28 fields in a message when built with VS 2010 64 bit compile setup
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dave  
View profile   Translate to Translated (View Original)
 More options Aug 24 2012, 4:52 pm
From: Dave <dmiss...@gmail.com>
Date: Fri, 24 Aug 2012 13:52:48 -0700 (PDT)
Local: Fri, Aug 24 2012 4:52 pm
Subject: Can't serialize more than 28 fields in a message when built with VS 2010 64 bit compile setup

As you can see the 28th field has a bit mask setup in the generated code:
// optional int32 StateSequence = 28;
inline bool Order::has_statesequence() const {
  return (_has_bits_[0] & 0x88000000u) != 0;

}

inline void Order::set_has_statesequence() {
  _has_bits_[0] |= 0x88000000u;
}

inline void Order::clear_has_statesequence() {
  _has_bits_[0] &= ~0x88000000u;

}

The 29th field does not:
// optional .OXObjects.OrderStates OrderState = 29;
inline bool Order::has_orderstate() const {
  return (_has_bits_[0] & 0x00000000u) != 0;
}

inline void Order::set_has_orderstate() {
  _has_bits_[0] |= 0x00000000u;
}

inline void Order::clear_has_orderstate() {
  _has_bits_[0] &= ~0x00000000u;

}

Anyone have a fix for this in the protoc.exe code generator?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave  
View profile  
 More options Aug 27 2012, 3:51 pm
From: Dave <dmiss...@gmail.com>
Date: Mon, 27 Aug 2012 12:51:48 -0700 (PDT)
Local: Mon, Aug 27 2012 3:51 pm
Subject: Re: Can't serialize more than 28 fields in a message when built with VS 2010 64 bit compile setup

This is caused by a bug in protoc.exe not generating code correctly.  Oddly
enough if I use the debug build of protoc.exe it does generate the code
correctly.  So I'm using that until someone can figure out what's wrong
with protoc.exe.  FYI, this is a duplicate of another post I made and can
be deleted by someone that knows how.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Graham  
View profile  
 More options Nov 2 2012, 5:40 pm
From: Robert Graham <robertgraham1...@gmail.com>
Date: Fri, 2 Nov 2012 14:40:36 -0700 (PDT)
Local: Fri, Nov 2 2012 5:40 pm
Subject: Re: Can't serialize more than 28 fields in a message when built with VS 2010 64 bit compile setup

Are you still experiencing this problem? I am currently build 32/64 bit
files. I am using the 64 bit protoc when building under a 64 bit host
machine. Are you only experiencing this using the 64-bit protoc? Or when
linking against the 64-bit google protocol libraries?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave  
View profile  
 More options Nov 8 2012, 2:53 pm
From: Dave <dmiss...@gmail.com>
Date: Thu, 8 Nov 2012 11:53:46 -0800 (PST)
Local: Thurs, Nov 8 2012 2:53 pm
Subject: Re: Can't serialize more than 28 fields in a message when built with VS 2010 64 bit compile setup

The code snippet I posted above is the result of using the protc.exe that
was built 64-bit release mode and code generating a message with more than
28 fields.  The snippet is the code that was generated by that protc.exe.  
Like I explained you are ok as long as you don't use the 64 bit build of
protc.exe.   Which we do not.  Now there are many other little things you
need to do if you want to use a full 64 bit version of the code.  There are
alot of warning you need to deal with, plus if your using VS2012 you've got
to fix all the c++11 incompatibilities.   So yes we still experience the
problem but we work around it.  This whole project really needs some time
dedicated to 64 bit build support and the new c++11 standard along with
VS2012.

 Friday, November 2, 2012 4:40:36 PM UTC-5, Robert Graham wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Graham  
View profile  
 More options Nov 30 2012, 7:45 pm
From: Robert Graham <robertgraham1...@gmail.com>
Date: Fri, 30 Nov 2012 16:45:05 -0800 (PST)
Local: Fri, Nov 30 2012 7:45 pm
Subject: Re: Can't serialize more than 28 fields in a message when built with VS 2010 64 bit compile setup

I am having problems where my message fails to serialize. A fatal exception
is thrown for the ' ResponseMessage.SerializeToCodedStream(coded_output);'.
ResponseMessage contains all the required fields, and is 104 bytes without
the varint....

I am compiling this for 64 bit windows, using the 32bit protoc.exe.

// Send the response message

         // Get the byte size of the response message
         uint32_t response_message_size = ResponseMessage.ByteSize();

         // Add the varint size to the total message size
         uint32_t response_message_total_size = response_message_size
+ google::protobuf::io::CodedOutputStream::VarintSize32(response_message_size );

         boost::asio::streambuf buffer_stream;
         std::ostream output_stream(&buffer_stream);

         google::protobuf::io::ZeroCopyOutputStream* raw_output =
            new google::protobuf::io::OstreamOutputStream(&output_stream);

         google::protobuf::io::CodedOutputStream* coded_output =
            new google::protobuf::io::CodedOutputStream(raw_output);

         try
         {
            coded_output->WriteVarint32(response_message_size);
            ResponseMessage.SerializeToCodedStream(coded_output);

            delete coded_output;
            delete raw_output;

            bytes_sent = m_Socket.send(buffer_stream.data());
         }
         catch( google::protobuf::FatalException )
         {
            assert(false);

            delete raw_output;
            delete coded_output;
            bytes_sent = 0;
         }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Feng Xiao  
View profile  
 More options Dec 3 2012, 1:51 pm
From: Feng Xiao <xiaof...@google.com>
Date: Mon, 3 Dec 2012 10:51:42 -0800 (PST)
Local: Mon, Dec 3 2012 1:51 pm
Subject: Re: Can't serialize more than 28 fields in a message when built with VS 2010 64 bit compile setup

Could you create issues for these problems? Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »