relType = graph->NewEdgeType(RelationshipType, CNode, CNode);
RSText = graph->NewAttribute(relType, L"RSTEXT", String, Basic);
RDataset = graph->NewAttribute(relType, L"RDATASET", String, Indexed);
attr_t RDatasetId = graph->FindAttribute(relType, L"RDATASET");
std::wcout << "RDatasetId = " << RDatasetId << std::endl;
value->SetString(RelDataset);
graph->SetAttribute(anEdge, RDatasetId, *value);
When importing the pair of nodes, the edge between them with the attached two attributes, for the first couple of nodes, RDatasetId has value > 0, while the second time, RDatasetId is 0 and then the software crashes:
g++ -O3 -std=c++11 -I /home/frank/sparkseecpp-5.2.0/includes/sparksee objJsonParser.cpp CGraph.cpp -o CGraph -L /home/frank/sparkseecpp-5.2.0/lib/linux64 -lsparksee
export LD_LIBRARY_PATH=/home/frank/sparkseecpp-5.2.0/lib/linux64/
time ./CGraph
CNODE already present
jsonParsingWResult= backyard_in,AtLocation,house_in_suburb,You are likely to find [[a backyard in]] behind [[a house in the suburbs]],cnet
lineCounter= 1
RelationshipType= AtLocation
relTypeId= 9
AtLocation already present
HeadNodeName= backyard_in
headOid= 1024
TailNodeName= house_in_suburb
tailOid= 1025
RelDataset= conceptnet
RDatasetId = 11
real 0m0.253s
user 0m0.009s
sys 0m0.005s
CNODE already present
jsonParsingWResult= CapableOf,TranslationOf -,fly_with_wing,[[???????????????????????????????????????]] in Japanese means [[birds can fly with wings.]] in English.,globalmind
jsonParsingWResult.size()= 154
lineCounter= 2
RelationshipType= TranslationOf -
relTypeId= 10
TranslationOf - already present
HeadNodeName= CapableOf
headOid= 1026
TailNodeName= fly_with_wing
tailOid= 1027
RelDataset= globalmind
RDatasetId = 0
terminate called after throwing an instance of 'sparksee::gdb::Error'
**** CRITICAL ERROR (SIGNAL NUM 6)
------- Begin of call stack ------
/home/frank/sparkseecpp-5.2.0/lib/linux64/libsparksee.so(_ZN13sparksee_core21CallStackTraceHandler13SignalHandlerEi+0x28) [0x7f5f11b199a8]
/lib/x86_64-linux-gnu/libc.so.6(+0x36d40) [0x7f5f1112cd40]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7f5f1112ccc9]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7f5f111300d8]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x15d) [0x7f5f1173b6dd]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x67746) [0x7f5f11739746]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x67791) [0x7f5f11739791]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x679a8) [0x7f5f117399a8]
/home/frank/sparkseecpp-5.2.0/lib/linux64/libsparksee.so(_ZN8sparksee3gdb5Graph12SetAttributeExiRNS0_5ValueE+0x74) [0x7f5f11ad1aa4]
./CGraph() [0x403c9f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f5f11117ec5]
./Cgraph() [0x4049ee]
-------- End of call stack -------
So...I ask you... in which cases FindAttribute gives 0 (zero) as output?