Dushistov / sdcv

https://dushistov.github.io/sdcv/
GNU General Public License v2.0
289 stars 42 forks source link

Crashing dictionary #53

Open Frenzie opened 4 years ago

Frenzie commented 4 years ago

Apologies for the non-descriptive title but I wasn't able to get an angle on it with a quick glance. It's the one from here: https://www.mobileread.com/forums/showthread.php?p=3900775

Without a newline at the end of the ifo file (which seems a bit suspicious):

$ sdcv test
Internal error: basic_string::_M_replace

With a newline added to the end of the file:

$ sdcv test
save to cache /home/frans/.stardict/dic/stardict-en-wordnet-3.1/dictd_wwwdictorg_wn.idx
Segmentation fault

Something about memmove.

Dushistov commented 4 years ago

I can not reproduce this issue.

./sdcv -u 'WordNet (r) 3.1 (2011)' test

works without any crash.

Can you try sdcv from master branch?

Frenzie commented 4 years ago

That was with master. Note that the dictionaries were changed the day after I created this issue with specific reference to sdcv. I'd have uploaded it to GH, but it rejected it as being too large.

Update (2019-10-18): Used makedict utility rather than pyglossary to manage conversion from dictd to stardict format to workaround bugs in sdcv that make synonym look ups slow and where sdcv only returns one definition when there are multiple definitions for a word (useful for koreader). Attached xdxf version used to add <pre> tags to Kobo version to maintain original formatting. All files updated.

So it sounds like the issue manifests itself when converting dictd to stardict with pyglossary.

ilius commented 2 years ago

Please try again with latest version of pyglossary and let me know if there is still an issue.