zielu / GitToolBox

GitToolBox IntelliJ plugin
GNU General Public License v3.0
604 stars 73 forks source link

[BUG] IDE Internal Errors #399

Closed PanjiNamjaElf closed 2 years ago

PanjiNamjaElf commented 2 years ago

Describe the bug When I open the PhpStorm app and switched to another project, I got this errors

To Reproduce Steps to reproduce the behavior:

  1. Opening PhpStorm App
  2. Select a project
  3. Close the project and switched to another project

Plugin version 212.9.0

IDE version PhpStorm 2022.1.1 Build #PS-221.5591.58, built on May 12, 2022

Screenshots image

Full Stacktrace.txt

java.util.concurrent.ExecutionException: java.lang.NullPointerException
    at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    at git4idea.fetch.GitFetchSupportImpl.waitForFetchTasks(GitFetchSupportImpl.kt:191)
    at git4idea.fetch.GitFetchSupportImpl.access$waitForFetchTasks(GitFetchSupportImpl.kt:47)
    at git4idea.fetch.GitFetchSupportImpl$fetch$1.invoke(GitFetchSupportImpl.kt:107)
    at git4idea.fetch.GitFetchSupportImpl$fetch$1.invoke(GitFetchSupportImpl.kt:47)
    at git4idea.fetch.GitFetchSupportImpl.withIndicator(GitFetchSupportImpl.kt:213)
    at git4idea.fetch.GitFetchSupportImpl.fetch(GitFetchSupportImpl.kt:103)
    at git4idea.fetch.GitFetchSupportImpl.fetchAllRemotes(GitFetchSupportImpl.kt:89)
    at zielu.gittoolbox.j.O.a(SourceFile:25)
    at zielu.gittoolbox.j.M.b(SourceFile:158)
    at com.codahale.metrics.Timer.timeSupplier(Timer.java:136)
    at zielu.a.h.a.e.a(SourceFile:14)
    at zielu.gittoolbox.j.M.a(SourceFile:158)
    at zielu.gittoolbox.j.M.b(SourceFile:144)
    at zielu.gittoolbox.j.M.a(SourceFile:132)
    at zielu.gittoolbox.j.M.b(SourceFile:230)
    at zielu.gittoolbox.j.M.run(SourceFile:215)
    at zielu.a.b.b.a(SourceFile:11)
    at zielu.a.b.e.run(SourceFile:15)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NullPointerException
    at java.base/java.util.Objects.requireNonNull(Objects.java:221)
    at git4idea.GitVcs.getInstance(GitVcs.java:82)
    at git4idea.commands.GitHandler.<init>(GitHandler.java:141)
    at git4idea.commands.GitHandler.<init>(GitHandler.java:89)
    at git4idea.commands.GitHandler.<init>(GitHandler.java:107)
    at git4idea.commands.GitTextHandler.<init>(GitTextHandler.java:45)
    at git4idea.commands.GitLineHandler.<init>(GitLineHandler.java:56)
    at git4idea.commands.GitImpl.lambda$fetch$3(GitImpl.java:613)
    at git4idea.commands.GitImplBase.run(GitImplBase.java:116)
    at git4idea.commands.GitImplBase.runCommand(GitImplBase.java:69)
    at git4idea.commands.GitImpl.fetch(GitImpl.java:612)
    at git4idea.fetch.GitFetchSupportImpl.doFetch(GitFetchSupportImpl.kt:225)
    at git4idea.fetch.GitFetchSupportImpl.access$doFetch(GitFetchSupportImpl.kt:47)
    at git4idea.fetch.GitFetchSupportImpl$fetchInParallel$future$1$1$1.invoke(GitFetchSupportImpl.kt:156)
    at git4idea.fetch.GitFetchSupportImpl$fetchInParallel$future$1$1$1.invoke(GitFetchSupportImpl.kt:47)
    at git4idea.fetch.GitRemoteOperationQueueImpl.executeForRemote(GitRemoteOperationQueueImpl.kt:26)
    at git4idea.fetch.GitFetchSupportImpl$fetchInParallel$future$1$1.run(GitFetchSupportImpl.kt:155)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at git4idea.fetch.GitFetchSupportImpl$fetchInParallel$future$1.call(GitFetchSupportImpl.kt:153)
    at git4idea.fetch.GitFetchSupportImpl$fetchInParallel$future$1.call(GitFetchSupportImpl.kt:47)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:241)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:214)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:203)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    ... 1 more
zielu commented 2 years ago

Hi, I think I know what is wrong - as auto-fetch is done in background it looks like the situation when project is closed by task is executing is not fully handled.

On it.

zielu commented 2 years ago

Please try 212.9.3 from EAP channel

zielu commented 2 years ago

Done in (211/212).9.6