Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException: Cannot invoke "com.google.idea.blaze.base.toolwindow.ConsoleView.getContent()" because the return value of "java.util.Map.get(Object)" is null #5559

Closed
ujohnny opened this issue Oct 27, 2023 · 3 comments
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: CLion CLion plugin topic: sync Issues related to the sync operation type: bug

Comments

@ujohnny
Copy link
Collaborator

ujohnny commented Oct 27, 2023

Description of the bug:

Sometimes when Sync operation is invoked the following exception might occur. I checked briefly and it's caused by a race condition when event to select console in task tree arrives before the console is added to consolesOfTasks map.

java.lang.NullPointerException: Cannot invoke "com.google.idea.blaze.base.toolwindow.ConsoleView.getContent()" because the return value of "java.util.Map.get(Object)" is null
	at com.google.idea.blaze.base.toolwindow.TasksTreeConsoleView.treeSelectionChanged(TasksTreeConsoleView.java:95)
	at com.google.idea.common.ui.properties.Property.triggerChangeListeners(Property.java:97)
	at com.google.idea.common.ui.properties.Property.setValue(Property.java:80)
	at com.google.idea.blaze.base.toolwindow.TasksTreeView$TaskNodeAutoExpandingListener.treeNodesInserted(TasksTreeView.java:387)
	at com.intellij.util.ui.tree.TreeModelListenerList.treeNodesInserted(TreeModelListenerList.java:85)
	at com.intellij.ui.tree.AsyncTreeModel.treeNodesInserted(AsyncTreeModel.java:364)
	at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.setNode(AsyncTreeModel.java:663)
	at com.intellij.ui.tree.AsyncTreeModel$Command.accept(AsyncTreeModel.java:475)
	at com.intellij.ui.tree.AsyncTreeModel.lambda$submit$12(AsyncTreeModel.java:293)
	at com.intellij.util.concurrency.Invoker$Wrapper.get(Invoker.java:329)
	at com.intellij.util.concurrency.Invoker$Wrapper.get(Invoker.java:320)
	at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:306)
...stripped

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Invoke sync operation. Not 100% reproducible

Which Intellij IDE are you using? Please provide the specific version.

CLion-233.9802.5

What programming languages and tools are you using? Please provide specific versions.

No response

What Bazel plugin version are you using?

2a027bd

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@ujohnny ujohnny added type: bug awaiting-maintainer Awaiting review from Bazel team on issues labels Oct 27, 2023
@iancha1992 iancha1992 added product: CLion CLion plugin topic: sync Issues related to the sync operation more-data-needed Awaiting response from issue author labels Oct 27, 2023
@iancha1992
Copy link
Member

@ujohnny Could you please provide sample code to reproduce this issue? Thanks.

@iancha1992 iancha1992 removed the awaiting-maintainer Awaiting review from Bazel team on issues label Oct 27, 2023
@ujohnny
Copy link
Collaborator Author

ujohnny commented Oct 28, 2023

@iancha1992 sample code is not required. Any project from examples can be used to reproduce the issue.

@tpasternak
Copy link
Collaborator

Fixed in #5665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: CLion CLion plugin topic: sync Issues related to the sync operation type: bug
Projects
Development

No branches or pull requests

5 participants