[libvoikko] Strange bug in the interface between hfst-ospell and libvoikko

Gaup Børre borre.gaup at uit.no
Tue Dec 17 01:02:47 EET 2013


On Monday 16. of December 2013 22.05.56 Sjur Moshagen wrote:
> 16. des. 2013 kl. 20:03 skrev Harri Pitkänen <hatapitk at iki.fi>:
> > I think the problem is not there but in the implementation of
> > extract_to_mem. That is where the infinite loop occurs on Windows. The
> > current implementation has multiple problems (uses size_t instead of
> > signed ssize_t and thus cannot handle error codes) and seems to have
> > problems with buffer positions if it loops more than once. I failed to
> > fix it though. I think something like this
> > should work:
> [...]
> 
> > But it does not. It will error out with ARCHIVE_FAILED on Windows. Don't
> > know what it would do on Linux.
> 
> At least on MacOSX 10.9 it seems to work equally good/bas as the old code:
> 
> * seems to work fine with hfst-ospell on its own
> * crashes voikkospell with the same error:
> 
> $ voikkospell -l -p tools/spellcheckers/fstbased/hfst/
> libc++abi.dylib: terminating with uncaught exception of type
> hfst_ol::ZHfstXmlParsingError Abort trap: 6
> 

Output from MacOSX 10.8

voikkospell + hfst-ospell with libxmlpp backend

sma $ voikkospell -l -p tools/spellcheckers/fstbased/hfst -d sma
sma-x-standard: Giellatekno/Divvun/UiT fst-based speller for Southern Sami
sma $ voikkospell -L -p tools/spellcheckers/fstbased/hfst -d sma
spell:sma
sma $ voikkospell -p tools/spellcheckers/fstbased/hfst -d sma
Entity: line 29: parser error : Extra content at the end of the document
tor type="general" id="acceptor.default.hfst">
^
libc++abi.dylib: terminate called throwing an exception
Abort trap: 6
sma $ voikkospell -s -p tools/spellcheckers/fstbased/hfst -d sma
Entity: line 29: parser error : Extra content at the end of the document
tor type="general" id="acceptor.default.hfst">
^
libc++abi.dylib: terminate called throwing an exception
Abort trap: 6

voikkospell + hfst-ospell with tinyxml2 backend

sma $ voikkospell -L -p tools/spellcheckers/fstbased/hfst -d sma
spell:sma
sma $ voikkospell -l -p tools/spellcheckers/fstbased/hfst -d sma
sma-x-standard: Giellatekno/Divvun/UiT fst-based speller for Southern Sami
sma $ voikkospell -s -p tools/spellcheckers/fstbased/hfst -d sma
libc++abi.dylib: terminate called throwing an exception
Abort trap: 6


Børre


More information about the Libvoikko mailing list