[libvoikko] voikkogc causing segfault on MacOSX

Francis Tyers ftyers at prompsit.com
Tue Oct 8 19:54:16 EEST 2013


El dt 08 de 10 de 2013 a les 19:37 +0300, en/na Harri Pitkänen va
escriure:
> On Tuesday 08 October 2013 17:13:46 Sjur Moshagen wrote:
> > Program received signal EXC_BAD_ACCESS, Could not access memory.
> > Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
> > ...
> 
> Thanks. This backtrace suggests that grammarChecker was initialized but 
> grammarChecker->paragraphAnalyser was null. Looking from the code only 
> NullGrammarChecker could have been in such state.
> 
> I fixed NullGrammarChecker so it should not crash anymore. But to get the 
> grammar checker working you need to use CgGrammarChecker. If I understand 
> correctly this will be the case if you have a file named 
> "/Users/smo036/.voikko/4/se-x-standard/gramchk.bin". So this file is probably 
> missing?

Hmm, it should accept any file ending in gramchk.bin, not necessarily
called "gramchk.bin". For example, the file I have is called
"sme-gramchk.bin".

   if (fileName.find("gramchk.bin") != std::string::npos) {
     grammarPath = mainPath + "/" + dirName + "/" + fileName;
     grammarBackend = "vislcg3";
   }

This is the code I'm using, and on my machine it works with the file
just called "sme-gramchk.bin".

Fran




More information about the Libvoikko mailing list