Hi team!
I'm trying to write unit tests that test writing to and reading from FieldList containers. However, on the first reading access on populated containers, I'm getting a Segmentation Fault. The reason is that functions like "reset()" or "forth()" are de-referencing FieldList::_pDecoder, and this member seems not to be initialized.
Example:
void MyTest()
{
FieldList fieldList;
fieldList.addReal(22, 3990, OmmReal::ExponentNeg2Enum);
fieldList.complete();
while (fieldList.forth()) // <== SEGFAULT (FieldList::_pDecoder == NULL)
{
// ... check field entries ...
}
}
What am I doing wrong? What do I have to do to ensure that _pDecoder is initialized correctly?
Thank you in advance!
Helmut