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.

Possible memory leak in keyboard view

See original GitHub issue

Version: 0.3.5 Source: Playstore Android 10 Samsung Galaxy s9

~~~ 1611851663324.stacktrace ~~~

java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 2226872 free bytes and 2174KB until OOM, target footprint 268435456, growth limit 268435456; failed due to fragmentation (largest possible contiguous allocation 46399488 bytes)
	at java.lang.StringFactory.newStringFromChars(StringFactory.java:260)
	at java.lang.StringBuilder.toString(StringBuilder.java:413)
	at dev.patrickgold.florisboard.ime.media.emoji.EmojiKeyData.getCodePointsAsString(EmojiKeyData.kt:40)
	at dev.patrickgold.florisboard.ime.media.emoji.EmojiLayoutDataKt.parseRawEmojiSpecsFile(EmojiLayoutData.kt:139)
	at dev.patrickgold.florisboard.ime.media.emoji.EmojiKeyboardView$1.invokeSuspend(EmojiKeyboardView.kt:68)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
	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 3 years ago
  • Comments:36 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickgoldcommented, May 9, 2021

Kk, good job with 0.3.11, I’ll have to find new ways of breaking your app then 😉

The question is not if you find a new way to break the logic, but more when 😃

1reaction
patrickgoldcommented, Apr 19, 2021

EDIT: Also, it looked as if the last changes I made seconds before the crash were never implemented. I had to re-delete layouts.

Because the shared preference batch together changes to avoid writing to the disk too often, this issue occurs if the keyboard crashes seconds after setting a preference (deleting the subtype is settings a preference value).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Memory Leaks on keyboard show | Apple Developer Forums
I am seeing memory leaks in the following UIKit API in the application when the keyboard shows on the screen. It is 100%...
Read more >
Keyboard Extension Memory Leak? - Stack Overflow
I am building a custom keyboard extension (iOS 9+) and have found a more than annoying memory leak. When leaving an application (in...
Read more >
I believe I've figured out Google keyboards memory leak!
More specifically, a memory leak occurs when an application destroys all pointers to memory before deallocating it. That memory is still held by ......
Read more >
System Analyzer "an active process has a possible memory ...
I run scans daily on my laptop when I start up in the morning. I typically then run System Optimizer then an System...
Read more >
Simple Check Can Reveal Computer 'Memory Leak'
Click on the Performance tab and check System Resources for the percentage of free or available RAM. (Note: if your keyboard doesn't have ......
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