[voikko] Vfst-morfologia kaatuu myös C:llä

Hannu Väisänen Hannu.Vaisanen at uef.fi
Tue Dec 9 14:42:34 EET 2014


int main()
{
  const char *error = 0;
  VoikkoHandle *handle = voikkoInit
(&error,"fi","/polku/vfst/morfologian/sanastoon");
  if (error) {
    std::cout << error << std::endl;
    return 1;
  }

  voikko_mor_analysis **a = voikkoAnalyzeWordCstr (handle, "meikä-r");


Debuggeri sanoo

Program terminated with signal SIGSEGV, Segmentation fault.
#0  libvoikko::morphology::createDefaultStructure
(charsMissing=18446744073709528233,
charsMissing at entry=18446744073709551612, 
    defaultTitleCase=@0x7ffff4b114c7: false,
structure=structure at entry=0x1dc7280 L"=pppppppppp-=", 'q' <repeats 187
times>..., 
    structurePos=@0x7ffff4b114c8: 23393, isAbbr=true) at
morphology/VfstAnalyzer.cpp:151
151				structure[structurePos++] = isAbbr ? L'q' : L'p';
(gdb) where
#0  libvoikko::morphology::createDefaultStructure
(charsMissing=18446744073709528233,
charsMissing at entry=18446744073709551612, 
    defaultTitleCase=@0x7ffff4b114c7: false,
structure=structure at entry=0x1dc7280 L"=pppppppppp-=", 'q' <repeats 187
times>..., 
    structurePos=@0x7ffff4b114c8: 23393, isAbbr=true) at
morphology/VfstAnalyzer.cpp:151
#1  0x000000000041ed17 in parseStructure (wlen=7, fstOutput=<optimized
out>) at morphology/VfstAnalyzer.cpp:273
#2  libvoikko::morphology::VfstAnalyzer::analyze (this=0x1d96740,
word=<optimized out>, wlen=7) at morphology/VfstAnalyzer.cpp:797
#3  0x00000000004031ed in libvoikko::morphology::voikkoAnalyzeWordUcs4
(options=options at entry=0x1d96010, word=word at entry=0x1d96340 L"meikä-r")
    at morphology/interface.cpp:45
#4  0x0000000000403364 in libvoikko::morphology::voikkoAnalyzeWordCstr
(options=0x1d96010, word=<optimized out>) at morphology/interface.cpp:92
#5  0x0000000000402fac in main () at v.cc:14




More information about the voikko mailing list