Memory leak in ktlintFormat task
See original GitHub issueProbably related with #447
I’m running git rebase -i develop --exec "./gradlew ktlintFormat"
on a branch with 40 commits and I’m getting this error on my local machine (macOS):
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
> Java heap space
It seems like a leak to me. The first 5 coomits ok, then the next failed. I reran the task manually on that commit and it worked. But then the 8th commit failed. and the pattern continued until the commit 15th. I can’t run the task any more. It fails every single time with the error I pasted above. As soon as I killed the daemon ./gradlew --stop
it worked.
I’m using v10.1.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:18 (3 by maintainers)
Top Results From Across the Web
Kotlin: Is this a good way to avoid memory leaks? [closed]
Well, this is my possible solution and I would like to know Android gurus from SO opinion about it. Maybe I'm leaking memory...
Read more >Android Kotlin/Java Code Guidelines
ktlintCheck - checks all SourceSets and project Kotlin script files,; ktlintFormat - tries to format according to the code style all SourceSets Kotlin...
Read more >a resolved google play services library dependency depends on ...
At that moment, the View reference might be destroyed or might be an old activity that is no longer visible, generating a memory...
Read more >Ktlint: An Anti-Bikeshedding Kotlin Linter with Built-in Formatter
Gradle plugin that automatically creates check and format tasks for project ... dependsOn ktlint task ktlintFormat(type: JavaExec, group: "formatting") ...
Read more >How to detect and fix Memory Leaks on Android ... - YouTube
Check out my 15+ hours Video Course "Kotlin Coroutines and Flow for Android Development" Get it here: ...
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
Yes, for some unknown reason (Kotlin update) Ktlint 0.41.0 uses more memory then before…
Okay, so I’ve been running with version 0.43.0 since this was last updated, and I just now started seeing this issue again.