Skip to content

IntelliJ plugin crashing. #568

@StokeMasterJack

Description

@StokeMasterJack

stacktrace:

com.facebook.ktfmt.format.ParseError: 1:86: error: Expecting an element
at com.facebook.ktfmt.format.Parser.throwParseError(Parser.kt:74)
at com.facebook.ktfmt.format.Parser.parse(Parser.kt:69)
at com.facebook.ktfmt.format.RedundantElementManager.addRedundantElements(RedundantElementManager.kt:99)
at com.facebook.ktfmt.format.Formatter.format(Formatter.kt:106)
at com.facebook.ktfmt.intellij.KtfmtFormattingService$KtfmtFormattingTask.run(KtfmtFormattingService.kt:62)
at com.intellij.formatting.service.AsyncDocumentFormattingService$FormattingRequestImpl.runTask(AsyncDocumentFormattingService.java:269)
at com.intellij.formatting.service.AsyncDocumentFormattingService.runAsyncFormat(AsyncDocumentFormattingService.java:107)
at com.intellij.formatting.service.AsyncDocumentFormattingService$FormattingProgressTask.run(AsyncDocumentFormattingService.java:388)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:498)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:119)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$7(CoreProgressManager.java:549)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:229)
at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:44)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:228)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:681)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:756)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:712)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:680)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:209)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:252)
at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:515)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:480)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:167)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:167)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:173)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:167)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:476)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
at java.base/java.lang.Thread.run(Thread.java:1583)

It is happening on all my files.

IntelliJ info:

IntelliJ IDEA 2025.2.4 (Ultimate Edition)
Build #IU-252.27397.103, built on October 22, 2025
Source revision: 9b31ba2c05b47
Licensed to David Ford
Subscription is active until January 18, 2026.
Runtime version: 21.0.8+9-b1038.73 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.7.1
GC: ZGC Minor Cycles, ZGC Minor Pauses, ZGC Major Cycles, ZGC Major Pauses
Memory: 12288M
Cores: 28
Metal Rendering is ON
Registry:
ide.experimental.ui=true
idea.ignore.disabled.plugins=true
Non-Bundled Plugins:
JavaScriptDebugger (252.27397.107)
ru.adelf.idea.dotenv (252.23892.201)
org.jetbrains.junie (252.406.235)
com.intellij.ml.llm (252.27397.130)
org.jetbrains.security.package-checker (252.27397.114)
hunspell (252.27397.129)
com.intellij.notebooks.core (252.27397.109)
intellij.jupyter (252.27397.109)
org.jetbrains.action-tracker (0.3.3)
com.github.xepozz.gitattributes (2025.1.2)
com.facebook.ktfmt_idea_plugin (1.3.0.59)
Docker (252.27397.129)
com.intellij.mcpServer (252.27397.106)
mobi.hsz.idea.gitignore (4.5.6)
org.toml.lang (252.27397.109)
com.intellij.properties (252.27397.107)
com.haulmont.jpab (252.26830.24)
dev.turingcomplete.intellij-gradle-utilities-plugin (1.3.0)
com.jetbrains.kmm (0.9-252.27397-IJ-134)
com.intellij.nativeDebug (252.26830.84)
org.jetbrains.amper (252.26199.7)
org.jetbrains.plugins.hocon (2025.1.0)
JavaScript (252.27397.106)
com.intellij.react (252.27397.106)
com.haulmont.rcb (252.23892.298)
Dart (252.25557.23)
deno (252.26199.7)
org.jetbrains.android (252.27397.103)
com.android.tools.design (252.27397.28)
androidx.compose.plugins.idea (252.26199.7)
Kotlin: 252.27397.103-IJ

Here are my settings:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions