Back to LanguageTool Homepage - Privacy - Imprint

Reminder: feature freeze for LT 4.7

Hi, this is a reminder that we’re now in feature freeze for LT 4.7. Please don’t make major changes and don’t introduce strings that need to be translated. The release is planned for next week: (http://wiki.languagetool.org/roadmap), but will be delayed 2-4 days

Regards,
Daniel

Hi Daniel, just right now, I found a bug while running the office extension. It only happens there because the extension don’t use the LT spelling functionality and does not contain the spelling dictionary. The extension uses the LT spell check instead.
But the bug is produced by the German ProhibitedCompoundRule. Here is the exception output:
java.lang.RuntimeException: java.lang.RuntimeException: Could not check sentence (language: German (Germany)): ‘»Wir sollten uns nicht nur nach Bauwerken, sondern auch nach Verkehrsruten umsehen.«’
at org.languagetool.JLanguageTool.performCheck(JLanguageTool.java:819)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:755)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:731)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:714)
at org.languagetool.openoffice.SwJLanguageTool.check(SwJLanguageTool.java:169)
at org.languagetool.openoffice.SingleDocument.checkSentence(SingleDocument.java:968)
at org.languagetool.openoffice.SingleDocument.getCheckResults(SingleDocument.java:194)
at org.languagetool.openoffice.MultiDocumentsHandler.getCheckResults(MultiDocumentsHandler.java:152)
at org.languagetool.openoffice.Main.doProofreading(Main.java:133)
Caused by: java.lang.RuntimeException: Could not check sentence (language: German (Germany)): ‘»Wir sollten uns nicht nur nach Bauwerken, sondern auch nach Verkehrsruten umsehen.«’
at org.languagetool.JLanguageTool$TextCheckCallable.getOtherRuleMatches(JLanguageTool.java:1356)
at org.languagetool.JLanguageTool$TextCheckCallable.call(JLanguageTool.java:1247)
at org.languagetool.JLanguageTool$TextCheckCallable.call(JLanguageTool.java:1208)
at org.languagetool.JLanguageTool.performCheck(JLanguageTool.java:815)
… 8 more
Caused by: java.lang.NullPointerException
at org.languagetool.rules.spelling.hunspell.HunspellRule.isMisspelled(HunspellRule.java:284)
at org.languagetool.rules.de.ProhibitedCompoundRule.match(ProhibitedCompoundRule.java:233)
at org.languagetool.JLanguageTool.checkAnalyzedSentence(JLanguageTool.java:847)
at org.languagetool.JLanguageTool$TextCheckCallable.getOtherRuleMatches(JLanguageTool.java:1313)
… 11 more

The rule should be fixed before LT 4.7 is released, I think.

Regards, Fred

If there is will to fix Java code, it would be advisable to fix the potential vulnerability reported by the compiler as well.


I believe it is related with the language sorting code, and removing this sorting code will probably fix it as well.

P.S. - I haven’t checked. If I recall correctly, word2vec also uses google dependencies.
P.S.2 - Correction, not language sorting, but Morfologik suggestion sorting

I cannot reproduce the issue, but I have committed a potential fix. Could you confirm it helps?

The fix prevent LT to produce the nullpointer exception. So I think, we could leave it for the LT 4.7 as it is.
The real problem behind this bug is that the ProhibitedCompoundRule always tries to call the LT internal spell checker. When it is called by the office extension, it should use the LO internal spellcheck.
I could implement this, but I have to add a UserConfig to the rule. This concerns some more classes, which have to be adapted. I think it is better to leave this for LT 4.8