question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OOM crash when typing on url bar

See original GitHub issue

Short description

Describe what you were doing that could’ve led to the crash.

Steps to reproduce

  1. Go to ‘web browser’
  2. Type anything in url bar
  3. See crash

Environment information

  • FlorisBoard Version: 0.3.13 (56)
  • Device: Samsung SM-G960F
  • Android: 10 (cn=Q sdk=29)

Features enabled

smartbar = true
suggestions = true
suggestions_clipboard = true
suggestions_next_word = true
glide = true
clipboard_internal = true
clipboard_history = true

Attached stacktrace files

1630272233846.stacktrace
java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 624688 free bytes and 610KB until OOM, target footprint 268435456, growth limit 268435456; failed due to fragmentation (largest possible contiguous allocation 93323264 bytes)
	at java.lang.StringFactory.newStringFromBytes(StringFactory.java:125)
	at dev.patrickgold.florisboard.ime.dictionary.Flictionary$Companion.load-B7oiUAE(Flictionary.kt:134)
	at dev.patrickgold.florisboard.ime.dictionary.DictionaryManager.loadDictionary-pqiQ7go(DictionaryManager.kt:94)
	at dev.patrickgold.florisboard.ime.text.TextInputManager$onWordHistoryChanged$1.invokeSuspend(TextInputManager.kt:1009)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

1630272233854.stacktrace
java.lang.OutOfMemoryError: Failed to allocate a 56 byte allocation with 22424 free bytes and 21KB until OOM, target footprint 268435456, growth limit 268435456; failed due to fragmentation (largest possible contiguous allocation 49545216 bytes)
	at java.util.Arrays.copyOf(Arrays.java:3136)
	at java.util.Arrays.copyOf(Arrays.java:3106)
	at java.util.ArrayList.grow(ArrayList.java:275)
	at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:249)
	at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:241)
	at java.util.ArrayList.add(ArrayList.java:467)
	at dev.patrickgold.florisboard.ime.dictionary.Flictionary$Companion.load-B7oiUAE(Flictionary.kt:141)
	at dev.patrickgold.florisboard.ime.dictionary.DictionaryManager.loadDictionary-pqiQ7go(DictionaryManager.kt:94)
	at dev.patrickgold.florisboard.ime.text.TextInputManager$onWordHistoryChanged$1.invokeSuspend(TextInputManager.kt:1009)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

1630272233861.stacktrace
java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 59408 free bytes and 58KB until OOM, target footprint 268435456, growth limit 268435456; failed due to fragmentation (largest possible contiguous allocation 93323264 bytes)
	at dev.patrickgold.florisboard.ime.dictionary.NgramNode.<init>(temp_suggestion_code.kt:188)
	at dev.patrickgold.florisboard.ime.dictionary.Flictionary$Companion.load-B7oiUAE(Flictionary.kt:135)
	at dev.patrickgold.florisboard.ime.dictionary.DictionaryManager.loadDictionary-pqiQ7go(DictionaryManager.kt:94)
	at dev.patrickgold.florisboard.ime.text.TextInputManager$onWordHistoryChanged$1.invokeSuspend(TextInputManager.kt:1009)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

1630272233853.stacktrace
java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 2187024 free bytes and 2135KB until OOM, target footprint 268435456, growth limit 268435456; failed due to fragmentation (largest possible contiguous allocation 103546880 bytes)
	at android.os.VibrationEffect.createOneShot(VibrationEffect.java:177)
	at dev.patrickgold.florisboard.ime.keyboard.InputFeedbackManager.performHapticFeedback(InputFeedbackManager.kt:135)
	at dev.patrickgold.florisboard.ime.keyboard.InputFeedbackManager.keyPress(InputFeedbackManager.kt:49)
	at dev.patrickgold.florisboard.ime.text.keyboard.TextKeyboardView.onTouchDownInternal(TextKeyboardView.kt:450)
	at dev.patrickgold.florisboard.ime.text.keyboard.TextKeyboardView.onTouchEventInternal(TextKeyboardView.kt:309)
	at dev.patrickgold.florisboard.ime.keyboard.KeyboardView$1.invokeSuspend(KeyboardView.kt:52)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:227)
	at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined(DispatchedTask.kt:190)
	at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:161)
	at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:362)
	at kotlinx.coroutines.CancellableContinuationImpl.completeResume(CancellableContinuationImpl.kt:479)
	at kotlinx.coroutines.channels.AbstractChannel$ReceiveHasNext.completeResumeReceive(AbstractChannel.kt:940)
	at kotlinx.coroutines.channels.ArrayChannel.offerInternal(ArrayChannel.kt:84)
	at kotlinx.coroutines.channels.AbstractSendChannel.offer(AbstractChannel.kt:141)
	at kotlinx.coroutines.channels.ChannelsKt__ChannelsKt.sendBlocking(Channels.kt:21)
	at kotlinx.coroutines.channels.ChannelsKt.sendBlocking(Unknown Source:1)
	at dev.patrickgold.florisboard.ime.keyboard.KeyboardView.onTouchEvent(KeyboardView.kt:83)
	at android.view.View.dispatchTouchEvent(View.java:14368)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3857)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3535)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3863)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3492)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3863)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3492)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3863)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3492)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3863)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3492)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3863)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3492)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3863)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3492)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3863)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3492)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3863)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3492)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3863)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3492)
	at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:770)
	at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1952)
	at android.app.Dialog.dispatchTouchEvent(Dialog.java:1156)
	at android.inputmethodservice.SoftInputWindow.dispatchTouchEvent(SoftInputWindow.java:177)
	at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:728)
	at android.view.View.dispatchPointerEvent(View.java:14636)
	at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6579)
	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6357)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5793)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5846)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5812)
	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5968)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5820)
	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6025)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5793)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5846)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5812)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5820)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5793)
	at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:9029)
	at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8886)
	at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8839)
	at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:9166)
	at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:194)
	at android.os.MessageQueue.nativePollOnce(Native Method)
	at android.os.MessageQueue.next(MessageQueue.java:336)
	at android.os.Looper.loop(Looper.java:197)
	at android.app.ActivityThread.main(ActivityThread.java:8167)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
castrikcommented, Aug 30, 2021
  1. I’m using bromite
  2. yes, they do show up(the keyboard crashed after I typed a few letters and I don’t remember if suggestions showed up, but they do now
  3. It only crashed in the browser url bar, not even in duckduckgo’s search area

I’ve restarted my phone and it is stable for now if it happens again, I’ll let you know

0reactions
patrickgoldcommented, Mar 19, 2022

OOM issues occur in the old word suggestions and also one spot in the glide logic (although the glide typing logic only rarely produces this). Both are connected to suggestions though and thus until 0.4.0 I think all OOM issues should be closed, because these duplicates don’t help at all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Google Chrome's Out of Memory Error
You can fix many minor issues with this method. You can restart Chrome by typing the following in the browser's address bar and...
Read more >
OOM crash (or hang) when clicking link with a huge URL length
Thanks for the link. Yes, that's just a safe OOM crash. It sounds like a check should be made there so that it...
Read more >
Here are the ways to fix 'Google Chrome Is Out of Memory' error
1. Restart your device. 2. Update Google Chrome. 3. Clear the browser's cache.
Read more >
Consistent OOM Crash while searching short string #133348
My machine has 16GB of ram, and is sitting with 5GB free at the time of this crash. This out of memory crash...
Read more >
Fix: Google Chrome Ran Out Of Memory - Appuals.com
Open Google Chrome; Type chrome://chrome in the address bar and press Enter; Select the About section (if it isn't already selected) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found