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.Throwable: Too many element types registered. #25

Open
bradleyjkemp opened this issue May 8, 2024 · 2 comments
Open

java.lang.Throwable: Too many element types registered. #25

bradleyjkemp opened this issue May 8, 2024 · 2 comments

Comments

@bradleyjkemp
Copy link

I'm getting this error popping up a couple times a day.

Seems unlikely that this plugin is registering >7000 different element types, so perhaps there's duplicates being registered?

java.lang.Throwable: Too many element types registered. Out of (short) range. Most of element types (7640) were registered for 'Language: templ': FILE, TemplElementType.COMPONENT, TemplElementType.COMPONENT_CHILDREN, TemplElementType.COMPONENT_PARAMS, TemplElementType.COMPONENT_STRUCT_LITERAL, TemplElementType.CSS_DECL, TemplElementType.ELSE, TemplElementType.ELSE_IF, TemplElementType.EXPR, TemplElementType.FOR_LOOP, TemplElementType.GO_ROOT,...
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at com.intellij.psi.tree.IElementType.<init>(IElementType.java:115)
	at com.intellij.psi.tree.IElementType.<init>(IElementType.java:92)
	at com.templ.templ.psi.TemplLeafElementType.<init>(TemplLeafElementType.kt:9)
	at com.templ.templ.file.TemplFileViewProvider.<init>(TemplFileViewProvider.kt:22)
	at com.templ.templ.file.TemplFileViewProviderFactory.createFileViewProvider(TemplFileViewProviderFactory.kt:13)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.createFileViewProvider(FileManagerImpl.java:265)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.shouldResurrect(FileManagerImpl.java:630)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.evaluateValidity(FileManagerImpl.java:600)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.findCachedViewProvider(FileManagerImpl.java:224)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.findViewProvider(FileManagerImpl.java:181)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:359)
	at com.intellij.psi.impl.PsiManagerImpl.findFile(PsiManagerImpl.java:163)
	at com.intellij.psi.impl.file.PsiDirectoryImpl.processChildren(PsiDirectoryImpl.java:190)
	at com.intellij.ide.projectView.impl.nodes.ProjectViewDirectoryHelper.directoryChildrenInProject(ProjectViewDirectoryHelper.java:284)
	at com.intellij.ide.projectView.impl.nodes.ProjectViewDirectoryHelper.getDirectoryChildren(ProjectViewDirectoryHelper.java:197)
	at com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode.getChildrenImpl(PsiDirectoryNode.java:191)
	at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.doGetChildren(AbstractPsiBasedNode.java:93)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:129)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:118)
	at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.getChildren(AbstractPsiBasedNode.java:78)
	at com.intellij.ide.util.treeView.AbstractTreeStructureBase.getChildElements(AbstractTreeStructureBase.java:38)
	at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:411)
	at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:329)
	at com.intellij.ui.tree.StructureTreeModel.getNode(StructureTreeModel.java:323)
	at com.intellij.ui.tree.StructureTreeModel.getChildren(StructureTreeModel.java:343)
	at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.computeNode(AsyncTreeModel.java:613)
	at com.intellij.ui.tree.AsyncTreeModel$Command.computeNode(AsyncTreeModel.java:489)
	at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:381)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:73)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:73)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:111)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:108)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:73)
	at com.intellij.util.concurrency.Invoker.startTask(Invoker.java:238)
	at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:194)
	at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:177)
	at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:508)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:244)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:222)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)
@mraron
Copy link

mraron commented May 20, 2024

I get this exception frequently too.

java.lang.Throwable: Too many element types registered. Out of (short) range. Most of element types (6138) were registered for 'Language: templ': TemplElementType.COMPONENT, TemplElementType.COMPONENT_CHILDREN, TemplElementType.COMPONENT_PARAMS, TemplElementType.COMPONENT_STRUCT_LITERAL, TemplElementType.CSS_DECL, TemplElementType.ELSE, TemplElementType.ELSE_IF, TemplElementType.EXPR, TemplElementType.FOR_LOOP, TemplElementType.GO_ROOT, Templ...
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at com.intellij.psi.tree.IElementType.<init>(IElementType.java:115)
	at com.intellij.psi.tree.IElementType.<init>(IElementType.java:92)
	at com.templ.templ.psi.TemplLeafElementType.<init>(TemplLeafElementType.kt:9)
	at com.templ.templ.file.TemplFileViewProvider.<init>(TemplFileViewProvider.kt:22)
	at com.templ.templ.file.TemplFileViewProvider.cloneInner(TemplFileViewProvider.kt:58)
	at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.createCopy(MultiplePsiFilesPerDocumentFileViewProvider.java:125)
	at com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.createCopy(MultiplePsiFilesPerDocumentFileViewProvider.java:29)
	at com.intellij.psi.impl.BlockSupportImpl.makeFullParse(BlockSupportImpl.java:277)
	at com.intellij.psi.impl.BlockSupportImpl.reparse(BlockSupportImpl.java:90)
	at com.intellij.psi.impl.DocumentCommitThread.doCommit(DocumentCommitThread.java:265)
	at com.intellij.psi.impl.DocumentCommitThread.commitUnderProgress(DocumentCommitThread.java:130)
	at com.intellij.psi.impl.DocumentCommitThread.lambda$commitAsynchronously$0(DocumentCommitThread.java:81)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:851)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:883)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:604)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$4(NonBlockingReadActionImpl.java:567)
	at com.intellij.openapi.application.impl.RwLockHolder.tryRunReadAction(RwLockHolder.kt:310)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:958)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:93)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:66)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:155)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:138)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:100)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:217)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:100)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:135)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:93)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:567)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:466)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$2(NonBlockingReadActionImpl.java:481)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:244)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:222)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

@daniel-oliveiravas
Copy link

I'm getting this a couple of times everyday too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants