-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
As discussed with @bbferka, how can i add a simple test string to the CAS do use it across different Annotators?
rs::SceneCas scas(tcas);
rs::Annotation someAnnotation = rs::create<rs::Annotation>(tcas);
std::string someStr("mytest");
someAnnotation.source.set(someStr);
someAnnotation.source.get(); // <- This call works
scas.set("example", someAnnotation);
// Read back for verification
rs::Annotation testAnno = rs::create<rs::Annotation>(tcas);
scas.get("example", testAnno);
testAnno.source.get(); // <- This call crashes
This is the error message:
Program received signal SIGSEGV, Segmentation fault.
uima::FeatureStructure::isValid (
this=0x7ffff7b16db4 <uima::FeatureStructure::getStringValue(uima::Feature const&) const+20>,
this@entry=0x7fffffffc5f0) at ../cas/featurestructure.cpp:237
237 return iv_tyFS != 0 && ( iv_cas->getHeap()->isValid(iv_tyFS));
As @bbferka pointed out, a quick fix for this seems to be to use getFS() instead of get() in the second code block. But why is get() crashing?
Metadata
Metadata
Assignees
Labels
No labels