I have a strange behavior of intellij.
It is constantly trying to reindex my project, as soon as i focus a src file like *.java.
This happens for any project. Even if i have a new project with a single src file.
I have resetted it to manufacturer state and it still tries to reindex.
I am on Ubuntu 18.04
Log output:
2020-08-18 05:02:02,004 [ 260523] INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to index
2020-08-18 05:02:02,602 [ 261121] INFO - pl.ProjectRootManagerComponent - project roots have changed (stacktrace has been already reported with trace_hash = 676357740)
2020-08-18 05:02:02,609 [ 261128] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 3ms; general responsiveness: ok; EDT responsiveness: ok
I found this exception in logs which seems to be the root cause
2020-08-18 05:11:52,721 [ 126435] INFO - pl.ProjectRootManagerComponent - project roots have changed (trace_hash = 30135350)
java.lang.Throwable
at com.intellij.openapi.roots.impl.ProjectRootManagerComponent.synchronizeRoots(ProjectRootManagerComponent.java:306)
at com.intellij.openapi.roots.impl.ProjectRootManagerComponent.fireRootsChangedEvent(ProjectRootManagerComponent.java:210)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.fireRootsChanged(ProjectRootManagerImpl.java:428)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.access$200(ProjectRootManagerImpl.java:37)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl$BatchSession.rootsChanged(ProjectRootManagerImpl.java:96)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.makeRootsChange(ProjectRootManagerImpl.java:371)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl$RootProviderChangeListener.rootSetChanged(ProjectRootManagerImpl.java:668)
at jdk.internal.reflect.GeneratedMethodAccessor532.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:123)
at com.intellij.util.EventDispatcher.lambda$createMulticaster$1(EventDispatcher.java:86)
at com.sun.proxy.$Proxy174.rootSetChanged(Unknown Source)
at com.intellij.openapi.roots.impl.RootProviderBaseImpl.fireRootSetChanged(RootProviderBaseImpl.java:47)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:980)
at com.intellij.openapi.projectRoots.impl.ProjectJdkImpl$MyRootProvider.rootsChanged(ProjectJdkImpl.java:291)
at com.intellij.openapi.projectRoots.impl.ProjectJdkImpl.copyTo(ProjectJdkImpl.java:267)
at com.intellij.openapi.projectRoots.impl.ProjectJdkImpl.commitChanges(ProjectJdkImpl.java:309)
at com.intellij.codeInspection.magicConstant.MagicConstantInspection.lambda$attachAnnotationsLaterTo$1(MagicConstantInspection.java:182)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:201)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:322)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:132)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:188)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:967)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:450)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:449)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:497)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
It is known issue: IDEA-247322. The workaround is to disable Preferences | Editor | Inspections | Java | Probable bugs | Magic Constant inspection.
UPD: It is fixed with the 2020.2.3 IDE update.
I found the issue, but i cannot explain it to myself.
I installed intellij over snap. This installation (not the settings) itself was causing this. This was reproducable by reinstalling over snap.
If i install the same build of intellij without snap, the issue does not occur.
I have defined color highlighting in my logback appender configuration:
<encoder>
<pattern>[%thread] %highlight(%-5level) %cyan(%logger{15}) - %msg %n</pattern>
</encoder>
However, logs in IDEA Intellij 14 console are still black and white with ANSI color not escaped:
[main] [39mDEBUG[0;39m [36mo.o.x.XMLConfigurator[0;39m - Loading configuration from XML Document
I use OSX 10 (Yosemite). How can I fix it?
OS X 10.10 and XCode 6.1.1.
Probably I messed up something in the project settings, as now unnecessary logs associated with AVFoundation.framework appears in the console. The first block appears while init, settings and playing music in AVPlayer.
[01:08:32.915] FigLimitedDiskCacheProvider_CopyProperty signalled err=-12784 (kFigBaseObjectError_PropertyNotFound) (no such property) at /SourceCache/CoreMedia/CoreMedia-1562.19/Prototypes/FigByteStreamPrototypes/FigLimitedDiskCacheProvider.c line 947
Jan 14 01:08:32 MacBook-Air-Roman.local rtcreporting[6668] <Info>: logging starts...
Jan 14 01:08:32 MacBook-Air-Roman.local rtcreporting[6668] <Debug>: setMessageLoggingBlock: called<
Jan 14 01:08:32 MacBook-Air-Roman.local rtcreporting[6668] <Debug>: startConfigurationWithCompletionHandler: Cached 0 enabled backends
Jan 14 01:08:32 MacBook-Air-Roman.local rtcreporting[6668] <Debug>: setUserInfoDict: enabled backends: ( )
These logs appear when I pause or play.
Jan 14 01:08:35 MacBook-Air-Roman.local rtcreporting[6668] <Debug>: sendMessageWithCategory: (null)
Jan 14 01:08:35 MacBook-Air-Roman.local rtcreporting[6668] <Debug>: sendMessageWithCategory: (null)
There's also a lot of other notices that I do not need, because all these errors are not critical, and I have never seen them before. I don't understand - how to disable this debug logs? What is it?
You can't hide them unfortunately, the best thing to do if you are analysing the logs is to paste them into notes and get rid of the rubbish by hand before analysing them.
I'm using SBT 0.13.2-M3 for Lift 2.6-M2 development. I'm also using sbt-escalante 0.2.0 which allows me to start a different application server than Jetty. Now I tried to integrate JRebel 5.2.2 to avoid application restarts. When I run escalante-run I get a lot of JRebel exceptions and the JBoss application server starts but there's no class reloading.
There are so many exceptions that I just list two of them and hope someone has a clue how to fix it.
JRebel: Class 'org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex' could not be processed by org.zeroturnaround.javarebel.jboss7.cbp.DeploymentReflectionIndexCBP#sbt.PluginManagement$PluginClassLoader#411f8c70
2014-03-27 23:02:40 JRebel: ERROR org.zeroturnaround.bundled.javassist.NotFoundException: org.zeroturnaround.javarebel.jboss7.JrDeploymentReflectionIndex
at org.zeroturnaround.bundled.javassist.ClassPool.get(JRebel:450)
at org.zeroturnaround.javarebel.jboss7.cbp.DeploymentReflectionIndexCBP.process(DeploymentReflectionIndexCBP.java:22)
at org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor.process(JRebel:70)
at com.zeroturnaround.javarebel.xB.a(JRebel:257)
at com.zeroturnaround.javarebel.xB.a(JRebel:246)
at com.zeroturnaround.javarebel.xB.a(JRebel:224)
at com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:128)
at com.zeroturnaround.javarebel.xl.transform(JRebel:45)
at java.lang.ClassLoader.defineClass(ClassLoader.java)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)
JRebel: Class 'org.jboss.as.web.deployment.component.WebComponentInstantiator$1' could not be processed by org.zeroturnaround.javarebel.jboss7.as.cbp.web.WebComponentInstantiator$1CBP#sbt.PluginManagement$PluginClassLoader#411f8c70
2014-03-27 23:02:48 JRebel: ERROR org.zeroturnaround.bundled.javassist.NotFoundException: org.zeroturnaround.javarebel.jboss7.as.contracts.JrServletReinjector
at org.zeroturnaround.bundled.javassist.ClassPool.get(JRebel:450)
at org.zeroturnaround.javarebel.jboss7.as.cbp.web.WebComponentInstantiator$1CBP.process(WebComponentInstantiator$1CBP.java:31)
at org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor.process(JRebel:70)
at com.zeroturnaround.javarebel.xB.a(JRebel:257)
at com.zeroturnaround.javarebel.xB.a(JRebel:246)
at com.zeroturnaround.javarebel.xB.a(JRebel:224)
at com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:128)
at com.zeroturnaround.javarebel.xl.transform(JRebel:45)
When I make an Intellij project, I keep getting the following out of memory error.
I already increased my heap size in idea.vmoptions:
-Xms128m
-Xmx2048m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=64m
-ea
But I still get this error:
Information:The system is out of resources.
Information:Consult the following stack trace for details.
Information:java.lang.OutOfMemoryError: Java heap space
Information: at com.sun.tools.javac.util.Position$LineMapImpl.build(Position.java:139)
Information: at com.sun.tools.javac.util.Position.makeLineMap(Position.java:63)
Information: at com.sun.tools.javac.parser.Scanner.getLineMap(Scanner.java:1105)
Information: at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:512)
Information: at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:550)
Information: at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:804)
Information: at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
Information: at com.sun.tools.javac.main.Main.compile(Main.java:353)
Information: at com.sun.tools.javac.main.Main.compile(Main.java:279)
Information: at com.sun.tools.javac.main.Main.compile(Main.java:270)
Information: at com.sun.tools.javac.Main.compile(Main.java:69)
Information: at com.sun.tools.javac.Main.main(Main.java:54)
Information: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Information: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Information: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Information: at java.lang.reflect.Method.invoke(Method.java:597)
Information: at com.intellij.rt.compiler.JavacRunner.main(JavacRunner.java:71)
Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
Error:Compiler internal error. Process terminated with exit code 3
What am I missing?
Current version:
Settings (Preferences on Mac) | Build, Execution, Deployment | Compiler |
Build process heap size.
Older versions:
Settings (Preferences on Mac) | Compiler | Java Compiler | Maximum heap size.
Compiler runs in a separate JVM by default so IDEA heap settings that you set in idea.vmoptions have no effect on the compiler.
Since IntelliJ 2016, the location is File | Settings | Build, Execution, Deployment | Compiler | Build process heap size.
I had a similar problem with Ant build (started by hand from IDEA GUI). In my case there was the right solution to right click on the Ant task, choose properties and set a higher value to "Maximum heap space (Mb):" and "Maximum stack space (Mb):" input fields.
To resolve this issue follow the below given steps-
1). In inteli Go to File> Setting Option and Search for Vm Option In the field of Vm Option for Importer give value -Xmx512m.
Intelij Setting Options
2). Go to Control Pannel Select View by :Large icons then Go to Java one promp window will appear with name java control pannel then go to java
Java VM Options
select view option.
java view options
In Java Run time Environment Setting pass Run time Parameters as -Xmx1024m.
3). If above given options does not work then change the size of pom.xml
GWT in Intellij 12
FWIW, I was getting a similar error with my GWT application during 'Build | Rebuild Project'.
This was caused by Intellij doing a full GWT compile which I didn't like because it is also a very lengthy process.
I disabled GWT compile by turning off the module check boxes under 'Project Structure | Facets | GWT'.
Alternatively there is a 'Compiler maximum heap size' setting in that location as well.
I was facing "java.lang.OutOfMemoryError: Java heap space" error while building my project using maven install command.
I was able to get rid of it by changing maven runner settings.
Settings | Build, Execution, Deployment | Build Tools | Maven | Runner | VM options to -Xmx512m
In my case the error was caused by the insufficient memory allocated to the "test" lifecycle of maven. It was fixed by adding <argLine>-Xms3512m -Xmx3512m</argLine> to:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<argLine>-Xms3512m -Xmx3512m</argLine>
Thanks #crazycoder for pointing this out (and also that it is not related to IntelliJ; in this case).
If your tests are forked, they run in a new JVM that doesn't inherit Maven JVM options. Custom memory options must be provided via the test runner in pom.xml, refer to Maven documentation for details, it has very little to do with the IDE.
I like to share a revelation that I had. When you build a project, Intellij Idea runs a java process that resides in its core(ex: C:\Program Files\JetBrains\IntelliJ IDEA 2020.3\jbr\bin). The "build process heap size", as mentioned by many others, changes the heap size of this java process. However, the main java process is triggered later by the Idea's java process, hence have different VM arguments. I noticed that the max heap size of this process is 1/3 of the Idea's java process, while min heap is the half of max(1/6). To round up:
When you set 9g heap on "build process heap size" the actual heap size for the compiler is max 3g and min 1,5g. And no need for restart is neccessary.
PS: tested on version 2020.3
On android studio 4.2 or newer Arctic fox version you will option under appearance & behavior
Windows: file > settings > appearance & behavior > system settings > memory settings
Mac: file > preferences > appearance & behavior > system settings > memory settings
https://i.stack.imgur.com/PEqBK.png
There is a
idea64.exe
starter in
IntelliJ IDEA 13.1.5\bin
so you can address more space.