Friends, our project uses hunspell to get suggestion for words, below is the git hub link of the hunspell library.
Each word is iterated to get sugggestion using hunspell library for which below method ('Hunspell_suggest ' method in above URL).
public int Hunspell_suggest(Pointer pHunspell, PointerByReference slst, byte word);
When there are certain special UTF-8 characters the method "Hunspell_suggest" throws run time error & which causes Java run time throws fatal error and brings server down (JVM error below). Since this is third party library we may need to upgrade the library to support & trying to get help from them as well. Before throwing run time error Hunspell is sending below message which indicates its limited support for UTF-8 support & requires library up-gradation.
This UTF-8 encoding can't convert to UTF-16:ð?‘? <= this message indicates hunspell limitation on certain UTF-8 conversion
However I am looking for help & suggestion to twist the logic & also as a best practice what can we do to safe guard our application getting terminated & avoid throwing error like below when dealing with such third party library since we have limited insight on limitation & when the library will throw runtime error.
**JVM ERROR** # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000000321d3bf, pid=32624, tid=0x0000000000009698 # # JRE version: Java(TM) SE Runtime Environment (8.0_221-b11) (build 1.8.0_221-b11) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.221-b11 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [jna3287959182198759444.hunspell-win-x86-64.dll+0x2d3bf]
User contributions licensed under CC BY-SA 3.0