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

Non Bazel project always throw an exception on opening (CLion). #5201

Closed
nickph7 opened this issue Aug 4, 2023 · 4 comments
Closed

Non Bazel project always throw an exception on opening (CLion). #5201

nickph7 opened this issue Aug 4, 2023 · 4 comments
Labels
more-data-needed Awaiting response from issue author product: CLion CLion plugin type: bug

Comments

@nickph7
Copy link

nickph7 commented Aug 4, 2023

Description of the bug:

Everytime I open CLion with a non bazel project (tested with a CMake project, a python project, and a typescript project), the same exception is thrown. See stacktrace for more details, (it's always about openapi.vfs.VirtualFile being null).

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

See above

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

CLion 2023.2

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

C++, Python

What Bazel plugin version are you using?

2023.07.21.0.1-api-version-232

Have you found anything relevant by searching the web?

No

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

Stacktrace:

com.intellij.diagnostic.PluginException: Cannot invoke "java.util.function.Function.apply(Object)" because the return value of "com.jetbrains.cidr.cpp.cmake.workspace.CMakeNotificationProvider.collectNotificationData(com.intellij.openapi.project.Project, com.intellij.openapi.vfs.VirtualFile)" is null [Plugin: com.google.idea.bazel.clwb]
	at com.intellij.ui.EditorNotificationsImpl$updateEditors$job$1.invokeSuspend(EditorNotificationsImpl.kt:226)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.function.Function.apply(Object)" because the return value of "com.jetbrains.cidr.cpp.cmake.workspace.CMakeNotificationProvider.collectNotificationData(com.intellij.openapi.project.Project, com.intellij.openapi.vfs.VirtualFile)" is null
	at com.google.idea.sdkcompat.cpp.CMakeNotificationProviderWrapper.createNotificationPanel(CMakeNotificationProviderWrapper.java:20)
	at com.google.idea.blaze.plugin.CMakeNotificationFilter.createNotificationPanel(CMakeNotificationFilter.java:55)
	at com.intellij.ui.EditorNotifications$Provider.lambda$collectNotificationData$0(EditorNotifications.java:60)
	at com.intellij.ui.EditorNotificationsImpl$updateEditors$job$1$2.invokeSuspend(EditorNotificationsImpl.kt:218)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:193)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
	at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:478)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:121)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:789)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:740)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:734)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:759)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:685)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:589)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:992)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:992)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Build #CL-232.8660.186, built on July 26, 2023

Runtime version: 17.0.7+7-b1000.6 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

@nickph7 nickph7 added awaiting-maintainer Awaiting review from Bazel team on issues type: bug labels Aug 4, 2023
@Pavank1992
Copy link
Contributor

Hi @nickph7, Could you please help us to reproduce the issue with minimal steps?

@Pavank1992 Pavank1992 added more-data-needed Awaiting response from issue author and removed awaiting-maintainer Awaiting review from Bazel team on issues labels Aug 7, 2023
@Pavank1992 Pavank1992 added the product: CLion CLion plugin label Aug 7, 2023
@nickph7
Copy link
Author

nickph7 commented Aug 8, 2023

I have created a temporary repo with a project which produces this issue (minus the virtual environment, and some model files): https://github.com/nickph7/bazel-issue-temp

It usually occurs whenever I open a first project on Ubuntu 20.04 (have not test on mac or windows yet but I could), it also occurs whenever I open other non-cmake projects (like typescripts), and cmake projects. Opening other projects when a project is already opened will not always cause the issue. Project with bazel (like mediapipe or protobuf) will not cause the issue. Let me know if you can reproduce, or if you need any more information to help you investigate.

@fredyw
Copy link

fredyw commented Sep 1, 2023

This looks like a dupe of #5247.

@tpasternak
Copy link
Collaborator

Exactly, and it's already fixed, the fix will land in the upcoming relase. Thank you for reporting it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-data-needed Awaiting response from issue author product: CLion CLion plugin type: bug
Projects
Development

No branches or pull requests

6 participants