Replies: 1 comment 1 reply
-
|
I'm not 100% sure (I don't recall the exact syntax), but the problem is likely: A vector can be created as its own type, like in C++ and other languages, and then added as a field. Or it can be created inline and automatically be added. I think you are trying to do both. The assertion is because the builder remembers the nesting levels, and each operation excepts something to be open, and you use an operation with the wrong thing (frame type). Consider: This uses the syntax So you want to call it after you have started the batch table and not store a temporary. I can dig into this some more if this is not enough. Minor nits:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using FlatCC (version 0.6.2) to serialize a batch of FlatBuffers tables in C. My schema defines a root table DataPacketBatch which contains a vector of DataPacket tables. When I try to build a batch (array) of tables, my code follows the FlatCC documentation: I create all the DataPacket tables, collect their offsets, then create the vector of tables before starting the root table. Then, inside the root table block, I add the vector and finish the root as shown in the FlatCC manual.
However, when I run my program, it crashes with the following assertion failure
flatcc_builder_table_add_offset: Assertion `(B->frame[0].type) == flatcc_builder_table' failed.
Here is the code schema
Here is the C file
Beta Was this translation helpful? Give feedback.
All reactions