[sword-devel] Crash when looking up module key in Nave module
Tobias Klein
contact at tklein.info
Tue Sep 28 08:55:25 EDT 2021
Hi Troy,
When trying to look up the key for the /Nave/ dictionary I got a crash.
I am using a recent SWORD revision.
Program received signal SIGSEGV, Segmentation fault.
0x00007fc7c47dab82 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007fc7c47dab82 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fc7c05c9f3c in sword::SWLD::hasEntry(sword::SWKey const*)
const () from
/home/tobi/dev/ezra_project/node-sword-interface-git/build/Release/node_sword_interface.node
#2 0x00007fc7c0526188 in
NodeSwordInterface::getRawModuleEntry(Napi::CallbackInfo const&) () from
/home/tobi/dev/ezra_project/node-sword-interface-git/build/Release/node_sword_interface.node
The swordModule is /Nave/ and I set an arbitrary key (like 'Jacob').
Then this code let to a seg fault.
swordModule->setKey(string(key).c_str());
boolentryExisting= swordModule->hasEntry(swordModule->getKey())
Aside from that ... when I did not use the /hasEntry/ function, it did
not crash anymore, but I was still not able to successfully look up
content based on the example above (Using the key 'Jacob').
When setting the key for /Nave/ to /Jacob/ I simply got an empty string
when invoking /getRawEntry/.
Thanks for your support!
Best regards,
Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20210928/0bed2dc9/attachment.html>
More information about the sword-devel
mailing list