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.

Java out of memory crash

See original GitHub issue

Short description

The keyboard started slowing down and lagging, and then it crashed with a Java OOM error. Log at the bottom

Steps to reproduce

No clue i was talking to someone on snapchat

Environment information

  • FlorisBoard Version: v0.3.10-beta04
  • Install Source: F-Droid beta
  • Device: Samsung S20 FE 5G
  • Android version, ROM: 11 OneUI 3.1

java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 960624 free bytes and 938KB until OOM, target footprint 268435456, growth limit 268435456; failed due to fragmentation (largest possible contiguous allocation 52166656 bytes)
	at java.util.ArrayList.iterator(ArrayList.java:834)
	at dev.patrickgold.florisboard.ime.nlp.NgramNode.listAllSameOrderWords(FlorisLanguageModel.kt:162)
	at dev.patrickgold.florisboard.ime.nlp.NgramNode.listAllSameOrderWords(FlorisLanguageModel.kt:163)
	at dev.patrickgold.florisboard.ime.nlp.NgramNode.listAllSameOrderWords(FlorisLanguageModel.kt:163)
	at dev.patrickgold.florisboard.ime.nlp.NgramNode.listAllSameOrderWords(FlorisLanguageModel.kt:163)
	at dev.patrickgold.florisboard.ime.nlp.NgramNode.listAllSameOrderWords(FlorisLanguageModel.kt:163)
	at dev.patrickgold.florisboard.ime.nlp.NgramNode.listAllSameOrderWords(FlorisLanguageModel.kt:163)
	at dev.patrickgold.florisboard.ime.nlp.NgramNode.listAllSameOrderWords(FlorisLanguageModel.kt:163)
	at dev.patrickgold.florisboard.ime.nlp.NgramNode.listAllSameOrderWords(FlorisLanguageModel.kt:163)
	at dev.patrickgold.florisboard.ime.nlp.FlorisLanguageModel.matchAllNgrams(FlorisLanguageModel.kt:253)
	at dev.patrickgold.florisboard.ime.dictionary.Flictionary.getTokenPredictions(Flictionary.kt:308)
	at dev.patrickgold.florisboard.ime.text.TextInputManager$onUpdateSelection$$inlined$let$lambda$1.invokeSuspend(TextInputManager.kt:353)
	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)

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
Glitchy-Toziercommented, Apr 11, 2021

This should be high up on the importance-list. It happens multiple times a day and is really annoying. ((LAGGGGGG))

0reactions
patrickgoldcommented, Apr 15, 2021

Due to the enormous amount of duplicates OutOfMemory errors are now handled in #677, please follow that thread for more info.

Read more comments on GitHub >

github_iconTop Results From Across the Web

3.2 Understand the OutOfMemoryError Exception
One common indication of a memory leak is the java.lang.OutOfMemoryError exception. Usually, this error is thrown when there is insufficient space to ...
Read more >
Java - shutting down on Out of Memory Error - Stack Overflow
OutOfMemoryError is just like any other error. If it escapes from Thread.run() it will cause thread to die. Nothing more.
Read more >
Java OutOfMemoryError Exceptions: Causes & Fixes [Tutorial]
Basically, the java.lang.OutOfMemoryError Java heap space tells that the heap of your application is not large enough or you are doing something ......
Read more >
Understanding OutOfMemoryError Exception in Java
This error indicates that the application attempted to allocate an array that is larger than the heap size. For example, if an application ......
Read more >
Recommendations for recovery upon Out Of Memory error
This error means that the GC tried to free memory but was pretty much unable to get anything done. By default, it happens...
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