xonixx / intellij-awk

The missing IntelliJ IDEA language support plugin for AWK
https://plugins.jetbrains.com/plugin/17037-awk-support
MIT License
45 stars 2 forks source link

Calling `ClassLoader#getResource` with leading slash doesn't work; strip #120

Closed xonixx closed 2 years ago

xonixx commented 2 years ago

image

p-Wave commented 2 years ago

have the same problem. here's my stack trace:

Calling `ClassLoader#getResource` with leading slash doesn't work; strip

com.intellij.diagnostic.PluginException: /std.awk [Plugin: intellij-awk]
    at com.intellij.ide.plugins.cl.PluginClassLoader.doFindResource(PluginClassLoader.java:490)
    at com.intellij.ide.plugins.cl.PluginClassLoader.getResourceAsStream(PluginClassLoader.java:460)
    at intellij_awk.AwkDocumentationProvider.getResourceAsStream(AwkDocumentationProvider.java:170)
    at intellij_awk.AwkDocumentationProvider.getStdLibFile(AwkDocumentationProvider.java:154)
    at intellij_awk.AwkDocumentationProvider.getBuiltInFunctionDocumentation(AwkDocumentationProvider.java:132)
    at intellij_awk.AwkDocumentationProvider.generateDoc(AwkDocumentationProvider.java:29)
    at com.intellij.lang.documentation.DocumentationProvider.generateHoverDoc(DocumentationProvider.java:125)
    at com.intellij.lang.documentation.CompositeDocumentationProvider.generateHoverDoc(CompositeDocumentationProvider.java:153)
    at com.intellij.codeInsight.documentation.DocumentationManager$MyCollector.doGetDocumentation(DocumentationManager.java:1740)
    at com.intellij.codeInsight.documentation.DocumentationManager$MyCollector.lambda$getDocumentation$2(DocumentationManager.java:1732)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:486)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:75)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:115)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:112)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:75)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.executeSynchronously(NonBlockingReadActionImpl.java:421)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl.executeSynchronously(NonBlockingReadActionImpl.java:186)
    at com.intellij.codeInsight.documentation.DocumentationManager$MyCollector.getDocumentation(DocumentationManager.java:1732)
    at com.intellij.codeInsight.documentation.DocumentationManager.getDocumentationAndProvider(DocumentationManager.java:1080)
    at com.intellij.openapi.editor.EditorMouseHoverPopupManager$Context.documentationPsiHoverInfo(EditorMouseHoverPopupManager.java:547)
    at com.intellij.openapi.editor.EditorMouseHoverPopupManager$Context.documentationHoverInfo(EditorMouseHoverPopupManager.java:527)
    at com.intellij.openapi.editor.EditorMouseHoverPopupManager$Context.calcInfo(EditorMouseHoverPopupManager.java:515)
    at com.intellij.openapi.editor.EditorMouseHoverPopupManager.lambda$scheduleProcessing$7(EditorMouseHoverPopupManager.java:198)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
    at com.intellij.openapi.editor.EditorMouseHoverPopupManager.lambda$scheduleProcessing$8(EditorMouseHoverPopupManager.java:194)
    at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:240)
    at com.intellij.util.Alarm$Request.runSafely(Alarm.java:385)
    at com.intellij.util.Alarm$Request.run(Alarm.java:374)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:220)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:246)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:32)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:225)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:214)
    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)
    at java.base/java.lang.Thread.run(Thread.java:829)
xonixx commented 2 years ago

@p-Wave Thank you for the report. This error to my knowledge is totally harmless and doesn’t prevent from plug-in usage. I will fix in upcoming version.