java.lang.AssertionError: This method should only be called in unit tests

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • GitHub comment 758#245258540
    via GitHub by jakud
    ,
  • IntelliJ IDEA constantly re-indexing
    via GitHub by human87
    ,
    • java.lang.AssertionError: This method should only be called in unit tests at org.intellij.erlang.psi.impl.ErlangFileImpl.getFileTypeForTests(ErlangFileImpl.java:316) at org.intellij.erlang.psi.impl.ErlangFileImpl.getFileType(ErlangFileImpl.java:307) at com.intellij.psi.codeStyle.DetectableIndentOptionsProvider.a(DetectableIndentOptionsProvider.java:104) at com.intellij.psi.codeStyle.DetectableIndentOptionsProvider.getIndentOptions(DetectableIndentOptionsProvider.java:62) at com.intellij.psi.codeStyle.CodeStyleSettings.getIndentOptionsByFile(CodeStyleSettings.java:664) at com.intellij.psi.codeStyle.CodeStyleSettings.getIndentOptionsByFile(CodeStyleSettings.java:630) at com.intellij.psi.codeStyle.CodeStyleSettings.getIndentOptionsByFile(CodeStyleSettings.java:625) at com.intellij.openapi.editor.impl.SettingsImpl.getTabSize(SettingsImpl.java:371) at com.intellij.openapi.editor.ex.util.EditorUtil.getTabSize(EditorUtil.java:522) at com.intellij.openapi.editor.impl.view.EditorView.getTabSize(EditorView.java:434) at com.intellij.openapi.editor.impl.view.LogicalPositionCache.reset(LogicalPositionCache.java:70) at com.intellij.openapi.editor.impl.view.EditorView.reinitSettings(EditorView.java:292) at com.intellij.openapi.editor.impl.EditorImpl.<init>(EditorImpl.java:569) at com.intellij.openapi.editor.impl.EditorFactoryImpl.a(EditorFactoryImpl.java:193) at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:169) at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.h(TextEditorComponent.java:165) at com.intellij.openapi.fileEditor.impl.text.TextEditorComponent.<init>(TextEditorComponent.java:100) at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.<init>(PsiAwareTextEditorImpl.java:93) at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl$PsiAwareTextEditorComponent.<init>(PsiAwareTextEditorImpl.java:86) at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.createEditorComponent(PsiAwareTextEditorImpl.java:71) at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.<init>(TextEditorImpl.java:52) at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.<init>(PsiAwareTextEditorImpl.java:44) at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorProvider.createEditor(PsiAwareTextEditorProvider.java:47) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.a(FileEditorManagerImpl.java:872) at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2418) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:971) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl3(FileEditorManagerImpl.java:788) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.a(FileEditorManagerImpl.java:770) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:129) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:100) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:86) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl2(FileEditorManagerImpl.java:770) at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileWithProviders(FileEditorManagerImpl.java:711) at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.openFile(FileEditorManagerEx.java:145) at com.intellij.ide.scratch.ScratchFileActions.doCreateNewScratch(ScratchFileActions.java:131) at com.intellij.ide.scratch.ScratchFileActions$NewFileAction.a(ScratchFileActions.java:75) at com.intellij.ide.scratch.LRUPopupBuilder$3.a(LRUPopupBuilder.java:192) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:199) at com.intellij.ui.popup.AbstractPopup.a(AbstractPopup.java:1390) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at com.intellij.ide.IdeEventQueue.i(IdeEventQueue.java:829) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:665) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:385) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    No Bugmate found.