Hey guys I'm hitting an error while trying to query my RAM tables - the table definition has vectors of custom structs in it, and for some reason throws an error regardless of the datatype in the structure, and whether the vector even includes any entries. The error is:
Unable to unpack built-in type 'name' while processing 'tableobj.vectorobj[1].description'
read datastream of length 45 over by -3
error unpacking uint64_t
Error unpacking field value
error unpacking eosio::chain::name
(description was previously a string, I just updated to name to see if data type was the issue, but received same error, just unable to unpack built-in type string instead of name)
The table structure is:
struct [[eosio::table]] tableobj{
name creator;
name platform;
std::vector<vectorstruct> vectorobj;
auto primary_key() const {return creator.value;}
};
and the structure:
struct vectorstruct{
name username;
name description;
EOSLIB_SERIALIZE( vectorstruct, (username)(description) )
};
The error always throws on the vector index that's empty (non-existent) - if I put one entry into the vector, then it fails on [1], if it's empty, it fails on [0] etc
Can build/push the object into the table without issue, issue only occurs on attempting to query it using cleos get table or zeus get-table-row (tested in both vRAM through a DSP and normal RAM in EOSIO)
Thank you in advance for any help on this, been banging my head against the wall on it