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

fix: Prevent from telemetry crash when language servers starts #1210

Merged

Conversation

angelozerr
Copy link
Contributor

In EAP, tlemetry is unloaded (I need to investigate that) and when language servers are started the telemetry crashes. This PR catch the the call of telemetry to show the following stack trace and give the capability to start language servers even if telemetry crashes.

Error while consuming telemetry service

java.lang.NullPointerException: Cannot invoke "com.redhat.devtools.intellij.telemetry.core.service.TelemetryServiceFactory.create(java.lang.ClassLoader)" because "factory" is null
	at com.redhat.devtools.intellij.telemetry.core.service.TelemetryMessageBuilder$ServiceFacade.createService(TelemetryMessageBuilder.java:260)
	at com.redhat.devtools.intellij.telemetry.core.service.TelemetryMessageBuilder$ServiceFacade.send(TelemetryMessageBuilder.java:251)
	at com.redhat.devtools.intellij.telemetry.core.service.TelemetryMessageBuilder$Message.send(TelemetryMessageBuilder.java:236)
	at com.redhat.devtools.intellij.telemetry.core.service.TelemetryMessageBuilder$ActionMessage.send(TelemetryMessageBuilder.java:174)
	at com.redhat.devtools.intellij.qute.lsp.QuteServer.<init>(QuteServer.java:54)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:95)
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:928)
	at com.redhat.devtools.intellij.lsp4ij.LanguageServersRegistry$ExtensionLanguageServerDefinition.createConnectionProvider(LanguageServersRegistry.java:131)
	at com.redhat.devtools.intellij.lsp4ij.LanguageServerWrapper.lambda$start$0(LanguageServerWrapper.java:316)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

@sonarcloud
Copy link

sonarcloud bot commented Oct 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@angelozerr angelozerr self-assigned this Oct 8, 2023
@angelozerr angelozerr added bug Something isn't working qute Qute support quarkus Quarkus support labels Oct 8, 2023
@angelozerr angelozerr added this to the 1.29.0 milestone Oct 8, 2023
@angelozerr angelozerr merged commit 5cc54ca into redhat-developer:main Oct 8, 2023
12 of 13 checks passed
@angelozerr
Copy link
Contributor Author

I created the issue #1211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working quarkus Quarkus support qute Qute support
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant