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

StackOverflowError when @inheritDoc is incorrectly applied #2171

Open
prempalsingh opened this issue Sep 28, 2021 · 2 comments
Open

StackOverflowError when @inheritDoc is incorrectly applied #2171

prempalsingh opened this issue Sep 28, 2021 · 2 comments
Labels
enhancement An issue for a feature or an overall improvement

Comments

@prempalsingh
Copy link

Describe the bug
I am getting a StackOverflowError on a fairly large project (~45 modules) of mine when generating the documentation using dokkaHtmlMultiModule. The issue is reproducible on both Dokka version 1.4.32 and 1.5.30. The issue only occurs when running dokkaHtmlPartial for one particular module and doesn't occur if I exclude that module by not applying the dokka plugin to that module.

Exception -

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':pesdk-mobile_ui-core:dokkaHtmlPartial'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:205)	
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)	
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:203)	
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:184)	
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)	
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)	
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)	
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)	
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)	
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)	
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)	
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)	
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)	
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)	
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)	
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)	
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)	
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)	
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)	
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)	
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)	
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)	
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372)	
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359)	
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352)	
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338)	
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)	
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)	
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)	
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)	
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)	
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)	
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)

Caused by: java.lang.StackOverflowError: (No message provided)
at com.intellij.util.CachedValueBase.isDependencyOutOfDate(CachedValueBase.java:120)	
at com.intellij.psi.impl.PsiCachedValue.isDependencyOutOfDate(PsiCachedValue.java:112)	
at com.intellij.util.CachedValueBase.isUpToDate(CachedValueBase.java:110)	
at com.intellij.psi.impl.PsiCachedValue.isUpToDate(PsiCachedValue.java:106)	
at com.intellij.util.CachedValueBase.getUpToDateOrNull(CachedValueBase.java:92)	
at com.intellij.psi.impl.PsiCachedValueImpl.getUpToDateOrNull(PsiCachedValueImpl.java:28)	
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:144)	
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:120)	
at com.intellij.psi.impl.PsiSuperMethodImplUtil.getHierarchicalMethodSignature(PsiSuperMethodImplUtil.java:350)	
at com.intellij.psi.impl.PsiSuperMethodImplUtil.getHierarchicalMethodSignature(PsiSuperMethodImplUtil.java:345)	
at com.intellij.psi.impl.source.PsiMethodImpl.getHierarchicalMethodSignature(PsiMethodImpl.java:140)	
at com.intellij.psi.impl.search.MethodSuperSearcher.processQuery(MethodSuperSearcher.java:31)	
at com.intellij.psi.impl.search.MethodSuperSearcher.processQuery(MethodSuperSearcher.java:19)	
at com.intellij.openapi.application.QueryExecutorBase.execute(QueryExecutorBase.java:77)	
at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:28)	
at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:96)	
at com.intellij.util.AbstractQuery.delegateProcessResults(AbstractQuery.java:119)	
at com.intellij.util.UniqueResultsQuery.processResults(UniqueResultsQuery.java:35)	
at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:96)	
at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:88)	
at com.intellij.util.AbstractQuery.findAll(AbstractQuery.java:30)	
at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethodSignatures(PsiSuperMethodImplUtil.java:72)	
at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethodsInternal(PsiSuperMethodImplUtil.java:56)	
at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethods(PsiSuperMethodImplUtil.java:51)	
at com.intellij.psi.impl.PsiSuperMethodImplUtil.findSuperMethods(PsiSuperMethodImplUtil.java:41)	
at com.intellij.psi.impl.source.PsiMethodImpl.findSuperMethods(PsiMethodImpl.java:92)	
at org.jetbrains.dokka.base.translators.psi.parsers.InheritDocResolver.lowestMethodsWithTag(InheritDocResolver.kt:129)	
at org.jetbrains.dokka.base.translators.psi.parsers.InheritDocResolver.lowestMethodWithTag(InheritDocResolver.kt:125)	
at org.jetbrains.dokka.base.translators.psi.parsers.InheritDocResolver.resolveGenericTag(InheritDocResolver.kt:46)	
at org.jetbrains.dokka.base.translators.psi.parsers.InheritDocResolver.resolveFromContext$base(InheritDocResolver.kt:40)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:340)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
<snip>	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:224)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringify(JavadocParser.kt:229)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.convertInlineDocTag(JavadocParser.kt:342)	
at org.jetbrains.dokka.base.translators.psi.parsers.JavadocParser$Parse.stringifySimpleElement(JavadocParser.kt:246)

Expected behaviour
Documentation is created successfully

To Reproduce
I am unable to reproduce the issue on a simpler sample project. Also, as mentioned above, the issue only happens with one particular module and the documentation is created successfully for all the other modules if I exclude that particular module.

Dokka configuration
Configuration of dokka used to reproduce the bug

tasks.named("dokkaHtmlMultiModule") {
    outputDirectory.set(file("build/api_docs/"))
}

subprojects {
    apply plugin: "org.jetbrains.dokka"
}

Installation

  • Operating system: macOS
  • Build tool: Gradle v6.1.1
  • Dokka version: 1.5.30

Are you willing to provide a PR?
I can try if somebody can guide me where to look at.

@prempalsingh
Copy link
Author

I am closing this issue as this was an issue with my project and not dokka. Looking at the stacktrace closely, I found that the issue had something to do with the tag @inheritDoc. Looking at the usages of @inheritDoc one by one in the module for which dokka was failing, I found a couple of instances where the tag was incorrectly added to methods which were not overridden.

@prempalsingh
Copy link
Author

Re-opening the issue as I think we can definitely make the error more descriptive instead of a StackOverflowError.

@prempalsingh prempalsingh reopened this Sep 28, 2021
@vmishenev vmishenev added enhancement An issue for a feature or an overall improvement and removed bug labels Oct 12, 2021
@yalishevant yalishevant added this to the Stable milestone Mar 24, 2022
@yalishevant yalishevant modified the milestones: Stable, Backlog Nov 7, 2022
@IgnatBeresnev IgnatBeresnev changed the title StackOverflowError when using dokkaHtmlMultiModule StackOverflowError when @inheritDoc is incorrectly applied Nov 17, 2022
@IgnatBeresnev IgnatBeresnev removed this from the Backlog milestone Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An issue for a feature or an overall improvement
Projects
None yet
Development

No branches or pull requests

4 participants