On Thu, Jan 30, 2014 at 6:48 AM, Øyvind Bakken <oyv...@gmail.com> wrote:

> We have a protobuf message defined in the following way:
>
> message ModuleEntry
> {
>     optional uint32 id = 1;
>     optional string name = 2;
>     optional uint32 type = 3;
>     repeated ParameterEntry parameter = 4;
>     repeated ModuleEntry subModules = 5;
>     optional uint32 usage = 6;
>     optional string description = 7;
> }
>
> The message ModuleEntry can include several other ModuleEntrys
> (submodules). One of these submodules can again include several
> ParameterEntrys:
>
> message ParameterEntry
> {
>     required uint32 id = 1;
>     optional ParameterDataType dataType = 2;
>     optional ParameterType type = 3 [default = MEASUREMENT];
>     optional string name = 4;
>     optional int32 integerData = 5;
>     optional double doubleData = 6;
>     optional string unit = 7;
>
>     enum DynamicSimulation
>     {
>         STATIC = 0;
>         DYNAMIC = 1;
>     }
>     enum ParameterType
>     {
>         MEASUREMENT = 0;
>         CONFIGURABLE = 1;
>         INPUT = 2;
>     }
> }
>
> Our issue is appearing when we are increasing the number of
> ParameterEntrys for a submodule over a certain limit (from 18 to 19). The
> program then crashes with the following error message:
>
> libprotobuf FATAL ../build/include/google/protobuf/repeated_field.h:659]
> CHECK failed: (index) < (size()): terminate called after throwing an
> instance of 'google::protobuf::FatalException'
>
> what(): CHECK failed: (index) < (size()):
>
You should check the stack trace and see why it's called with an
out-of-band index.


>
>
> I have searched our code to find if we have set any constraints on array
> size or similar, but it does not seem so. Is there any limitation to
> Protobuf that is causing this behavior, i.e. a max number of repeated
> fields?
>
There is no such limit in protobuf.


> It seems that the number of repeated fields for messages that are not
> submodules can be higher though, without crashes occuring. Also, decreasing
> the number of the given submodule, or the number of its parent module (to
> decrease the total data size) have no effect.
>
>
> We are using Protobuf version 2.4.1. (I guess this version is kind of
> outdated, is it recommendable to upgrade to the latest version?)
>

> Regards
>
>  --
> 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.
>

-- 
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.

Reply via email to