WarningImHack3r / npm-update-dependencies

Update NPM dependencies from your IDE
https://plugins.jetbrains.com/plugin/21105-npm-update-dependencies
9 stars 2 forks source link

[crash] Null `WindowManager.getStatusBar(Project)` #99

Closed WarningImHack3r closed 4 months ago

WarningImHack3r commented 4 months ago

What is the issue?

Crash

What are the steps to reproduce this issue?

I don't really know, navigate between projects, open/close some

What were you expecting to happen?

Not to crash, getStatusBar() is not even supposed to be able to be null

Paste any relevant logs, error output, etc.

com.intellij.diagnostic.PluginException: annotator: com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator@7bd64515 (class com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator) [Plugin: com.github.warningimhack3r.npmupdatedependencies]
Caused by: java.lang.NullPointerException: Cannot invoke "com.intellij.openapi.wm.StatusBar.getWidget(String)" because the return value of "com.intellij.openapi.wm.WindowManager.getStatusBar(com.intellij.openapi.project.Project)" is null
    at com.github.warningimhack3r.npmupdatedependencies.ui.statusbar.StatusBarHelper.updateWidget(StatusBarHelper.kt:16)
    at com.github.warningimhack3r.npmupdatedependencies.backend.engine.NUDState.setScannedUpdates(NUDState.kt:34)
    at com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator$doAnnotate$2.invokeSuspend(UpdatesAnnotator.kt:70)
    at com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator$doAnnotate$2.invoke(UpdatesAnnotator.kt)
    at com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator$doAnnotate$2.invoke(U

<TRIMMED STACKTRACE>

What OS are you experiencing the problem on?

Linux

Additional platform information

Build version: IntelliJ IDEA 2024.1 Build: #IU-241.14494.240 March 28, 2024 JRE: 17.0.10+8-b1207.12, JetBrains s.r.o. JVM: 17.0.10+8-b1207.12, OpenJDK 64-Bit Server VM, JetBrains s.r.o. Operating System: Linux 3.10.0-1160.108.1.el7.x86_64 (amd64)

=== Plugins === Custom plugins: [NPM Update Dependencies (2.2.1), VSCode Keymap (241.14494.150), Go (241.14494.240), Go Template (241.14494.150), PlantUML Integration (7.7.0-IJ2023.2), Svelte (241.14494.140), SonarLint (10.4.1.77998), Rainbow Brackets (2024.2.2-241)] Disabled plugins:[]

Duplicates