smallcloudai / refact-intellij

Refact AI: Open-source AI Code assistant with autocompletion, chat, refactoring and more for IntelliJ JetBrains IDEs
https://refact.ai
BSD 3-Clause "New" or "Revised" License
37 stars 13 forks source link

[JB plugin] Internal error: AssertionError #159

Open StormSister opened 4 months ago

StormSister commented 4 months ago

An internal error happened in the IDE plugin.

Message: (no message)

Stack trace

java.lang.AssertionError: getService(...) must not be null
    at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:83)
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:436)
    at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.setException(SchedulingWrapper.java:288)
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:275)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:244)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:222)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.NullPointerException: getService(...) must not be null
    at com.smallcloud.refactai.modes.ModeProvider.getStats(ModeProvider.kt:55)
    at com.smallcloud.refactai.modes.ModeProvider.checkAndSendEvents(ModeProvider.kt:92)
    at com.smallcloud.refactai.modes.ModeProvider._init_$lambda$0(ModeProvider.kt:63)
    at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
    ... 13 more

Environment

Additional information