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

IntelliJ error "Assertion failed: Too many element types registered. Out of (short) range." #28

Closed
jfehrle opened this issue Jan 10, 2018 · 5 comments

Comments

@jfehrle
Copy link
Collaborator

jfehrle commented Jan 10, 2018

I just noticed this exception in IntelliJ. It's happened 81 times, last time on Jan 1. I'm working with the Coq source code, which is quite large.

image

Assertion failed: Too many element types registered. Out of (short) range.
java.lang.Throwable
	at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:168)
	at com.intellij.psi.tree.IElementType.<init>(IElementType.java:104)
	at com.intellij.psi.tree.IElementType.<init>(IElementType.java:88)
	at com.reason.lang.CommonParser.<init>(CommonParser.java:20)
	at com.reason.lang.ocaml.OclParser.<init>(OclParser.java:18)
	at com.reason.lang.ocaml.OclParserDefinition.createParser(OclParserDefinition.java:50)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:87)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:49)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:192)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:240)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:39)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.isReplaceWholeNode(BlockSupportImpl.java:331)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.mergeTrees(BlockSupportImpl.java:277)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.makeFullParse(BlockSupportImpl.java:216)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.reparseRange(BlockSupportImpl.java:92)
	at com.intellij.psi.impl.DocumentCommitThread.doCommit(DocumentCommitThread.java:752)
	at com.intellij.psi.impl.DocumentCommitThread.lambda$commitUnderProgress$4(DocumentCommitThread.java:533)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1148)
	at com.intellij.psi.impl.DocumentCommitThread.commitUnderProgress(DocumentCommitThread.java:558)
	at com.intellij.psi.impl.DocumentCommitThread.lambda$pollQueue$1(DocumentCommitThread.java:375)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:548)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.psi.impl.DocumentCommitThread.pollQueue(DocumentCommitThread.java:375)
	at com.intellij.psi.impl.DocumentCommitThread.run(DocumentCommitThread.java:326)
	at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:212)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
@giraud giraud self-assigned this Jan 11, 2018
@giraud
Copy link
Owner

giraud commented Jan 11, 2018

Thank you for your report.
I've spotted a problem in the code, but I have difficulties reproducing the bug.

when does it happen ? does it happen after opening a lot of them ?
which version of idea ? are you using a recent (2017) one ?

@giraud
Copy link
Owner

giraud commented Jan 11, 2018

I hope it is fixed in 0.34.
I will let this issue open a few days. If you don't see the assertion again during that period, I'll close the bug then.

@jfehrle
Copy link
Collaborator Author

jfehrle commented Jan 11, 2018

I'm using the Community Edition 2017.2.5.

I don't know what is triggering it. IntelliJ doesn't make it easy to notice these: exceptions are logged but all the user sees is a tiny red icon is the lower right hand corner of the IJ screen. So alas, I'm almost guaranteed not to notice it right away. I'll let you know if I see more exceptions.

Thanks.

@giraud giraud removed their assignment Jan 12, 2018
@giraud
Copy link
Owner

giraud commented Jan 25, 2018

@jfehrle did it happen again ?

@jfehrle
Copy link
Collaborator Author

jfehrle commented Jan 25, 2018 via email

@giraud giraud closed this as completed Jan 25, 2018
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

2 participants