Memory Error & No Auto Complete when binary flict is large ~ 6mb
See original GitHub issueReferring to this feature
I generated a binary flict using the dict-tools
for en where size was 6.8 mb – about 3 times the default en binary flict. Size is larger due to more words and the highest dimension for n-grams used was 2. However when file is reduced to a small size, significantly fewer tokens, word-complete works fine.
Short description
Memory runs out when flict is too large
Steps to reproduce
- Generate large flict > 6mb
- Type an entire paragraph as quickly as possible
- No auto-complete will show and keyboard will quickly crash in seconds
- See error
Environment information
- FlorisBoard Version: current main branch, commit
38baac1af92fea80a86f5fdd8850bc677a27a3d2
. - Install Source: Github
- Device: Emulator Android Studio
- Android version, ROM: Android 11
~~~ 1614445172221.stacktrace ~~~
java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw an exception; no stack trace available
~~~ 1614445172167.stacktrace ~~~
java.lang.OutOfMemoryError: Failed to allocate a 80 byte allocation with 8 free bytes and 8B until OOM, target footprint 201326592, growth limit 201326592
at java.util.Arrays.copyOf(Arrays.java:3257)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448)
at java.lang.StringBuilder.append(StringBuilder.java:137)
at dev.patrickgold.florisboard.ime.core.FlorisBoard.onUpdateSelection(FlorisBoard.kt:388)
at android.inputmethodservice.InputMethodService$InputMethodSessionImpl.updateSelection(InputMethodService.java:906)
at android.inputmethodservice.IInputMethodSessionWrapper.executeMessage(IInputMethodSessionWrapper.java:104)
at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:44)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Issue Analytics
- State:
- Created 3 years ago
- Comments:26 (13 by maintainers)
Top Results From Across the Web
out of memory error while reading binary file
but when I read my binary file I get an out of memory error . I think it is because the fread function...
Read more >Solved: "Not enough Memory" error while writing a binary file
Problem: When i enable "file write", after writing more than 400000 records (approx), an error message (Not enough memory for the operation) ...
Read more >java
The java command supports a wide range of options that can be divided into the ... show how to set the size of...
Read more >Fix list for IBM WebSphere Application Server V7.0
The following is a complete listing of fixes for V7.0 with the most recent fix at ... Install, PI61290, An application error can...
Read more >Untitled
#sindikat Debora miranda ele nao estava la, Des arc high school football, ... Carmel referral code, Zero g flight europe, Remote utilities 5.3...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tsiflimagas Good to know, thanks for linking!
No the end bug is something I prefer to have included still in phase 1, because it reduces the file size and also reduces the amount of bytes read into memory in runtime when the binary file is cached.