IntelliJ highlights errors that don't exist Follow
These last days, IntelliJ is not working properly. For instance:
The method receives a String as parameter but it shows an error there. Compilation works fine, but it's annoying to have error markers on my code everywhere. Sometimes restarting the IDE makes it work (closing the file and reopening does not help)... so, is there a way to fix this problem?
Please sign in to leave a comment.
try to recreate project jdk, then invalidate caches. Also make sure you didn't configure classpath with different version of the same class.
Thanks... I tried that but it didn't have any effect :(
My co-worker and I have noticed the same issue with IntelliJ 10.5.1 since recently upgrading to this version that bogus highlighted errors are occuring. I have seen the bad error highlights go away after doing control+alt+L to reformat the code which seems to refresh the file, or Invalidating Caches or restarting IDEA - but this should not be necessary - certainly on a regular basis. I haven't seen IDEA have this issue in the past. Our projects are auto created by importing a top level Maven pom.xml so we do not modify the classpath directly.
I've been seeing this issue on and off for a while now. There doesn't seem to be much of a pattern around when it comes and goes.. restarting, clearing the cache... luckily it's been pretty solid for a few days... fingers crossed.
Looks very similar to IDEA-72043. Feel free to track its progress.
Two of my coworkers and I have seen the same problem since updating to IDEA 10.5.1, on both Windows 7 and Mac OS X 10.6. When I wrote in to JetBrains support, they responded "File | Invalidate Caches should help, if it doesn't help, please
provide ~/Library/Logs/IntelliJIdea10/idea.log ." I invalidated my caches, and that solved the problem for me for a few days, but the problem subsequently returned (once good imports marked as gray, another time good code marked red). I haven't submitted my log files yet, but will try to do so the next time I see the error. Invalidating caches + rebuilding my project takes over 15 minutes, so it's not that useful as a workaround if I have to keep doing it. My coworkers and I never saw this problem before 10.5.1, but we restructured our IMLs about the same time and weren't sure what was causing the problem. Since we have seen others with the same problem, maybe it is related to IDEA itself and not our new configuration.
I also have this problem. I'm pretty sure I first saw it in 10.5.1. I'm on a Mac if it matters, using Java 1.6.0_26 on 10.6.8 with all the latest of everything.
I really really wish that you fix this for 10.5.2 since it's driving me nuts.
I get it after 5-60 minutes and when it starts it marks maybe 10% of the lines I edit as errors. Compile shows no errors though.
Invalidate caches fixes it but that's not a good solution since it takes a while to restart. Timewise maybe not a super big problem, but what's worse is that it throws my out of my mental coding zone.. ;)
I tried to get a hold of 10.5.0 but was unable to get it from the download page. Maybe it's hidden somewhere but I would very much appreciate it if you made it available until this is fixed.
I also can confirm this bug with 10.5.1 (Windows 7).
Trying to find similar issues to track this.
IDEA-71782 Code remains invalid after correction [severe]
IDEA-71905 Code highlighting/inspections stop working
IDEA-71793 Code analysis sometimes gets out of sync
Seems like there is a pattern here with people experiencing invalid error highlighting in 10.5.1. Would like to see a fix in 10.5.2 soon. I will likely need to revert to 10.5 because of this.
I rolled back to IDEA 10.5 #IU-107.105 and haven't seen the problem for several days, so it seems like the problem was introduced between 10.5 and 10.5.1.
Happen to know where we can download 10.5.0?
I downloaded a copy from this link:
I'm not sure where to find the link for community edition.
Changing the extension to dmg works for mac if anyone else needs to rollback.
This problem makes IDEA 10.5.1 impossible to work with.
Our entire team has rolled back to IDEA 10.5.0.
When can we expect a fix?
No sooner than we can find the root cause for the problem. Unfortunately
we do not know it yet.
The new 10.5.2 EAP build has additional diagnostics that will help us diagnose
"Develop with Pleasure!"
those of you having these problems are running idea under a non standard jdk/jre. i and my coworker have an almost identical configuration - only our jres differ. once i switched from random eap 1.7.0 back to 1.6.0_24, the problems were gone. he never had them (and was never using java 7)
A "non standard jdk/jre" is not the case in my team's experience. I'm using Java 1.6.0_26 on Mac OS 10.6.8. Others on my team are using a standard 1.6 release on Windows 7 and XP. All of us were experiencing identical issues. After weeks of trying various workaround, we reverted to IDEA 10.5.0.
EXACTLY the same here.
Though this smells like a concurrency problem to me and I do have a 4 core processor, not that it should matter. But the likelyhood of concurrency problems might be higher on multi core?
I've been using the bundled JRE with IDEA ultimate versions, not a non-standard version.
I also tried the EAP 107.481 since Dmitry said it had additional diagnostics to help diagnose the problem. After about 5 hours of problem-free usage, the highlight error occurred and the "IDE fatal error" red icon started blinking. I submitted a report using the built-in facility, but noticed that Mikael Grev suggested it might be related to concurrency earlier in this thread. Good guess! The stack trace contained java.util.concurrent, com.intellij.concurrency and com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass, so this might be the culprit (though I don't know if all IDEA stack traces start with these concurrency calls). Here's one of the stack traces I reported:
com.intellij.psi.PsiInvalidElementAccessException: Element: class com.intellij.psi.impl.source.tree.java.PsiLocalVariableImpl
Now I am seeing a highlighting error in 107.481 but IDEA reports "no new IDE fatal errors". I didn't invalidate my caches since the last run, but this is all new code AFAIK. I'll try "invalidate and restart" and see what happens.
Haven't seen this problem after using 10.5.2 for about 2 weeks, thanks JetBrains!
Same error here, but it's 2018...
Try disabling all 3rd plugins, then File | Invalidate Caches/Restart.. | Invalidate and Restart and full project rebuild. If issue remains, please file an issue at https://youtrack.jetbrains.com/issues/IDEA with an isolated reproducible sample.
There are already a lot of plugins disabled...
File | Invalidate Caches/Restart: already tried
Full project rebuild: already tried
Issue: opened before comment here.
Have the same problem with version 2018.1.2. Restart works, but very annoying problem.
Hi. Could you please provide a code example to reproduce the problem?
I have to right now with version 17.2.5
1. add is hightlisted as "canno't reslove symbol add"
2. ? : seems to bother idea, the tip is "expected ';' Pure nonsense at both.
Please file a bug at https://youtrack.jetbrains.com/issues/IDEA and attach a sample project to reproduce.
File | Invalidate Caches | Invalidate and Restart may help.
Invalidate cache and restart helpped. thanks :) Didn't what was the exact name of option, now I googled it and it's all back to normal.
I was to eager. After a while problem came back.
Update to 2018.1also dosne't help.
This is big issue then, to work furhter I may rollback.
Rolback to 2016 doesn't help. Intelij has to solve it. It's critical! I'll stop using it for some simplier editor if simple spell check disabled my work for entire freaking evening!
findal update day later:
It worked, but not alone. Standard only core, non apache application totaly solved the problem + generated packege info I was missing, what Idea compiler totaly missed. Now I finnaly have litle green arrow and my sorrow is throught with it. Finall compiled without compiler or any runtime error.
So seteps to victory:
1.Go to https://start.spring.io/
2. Switch to full version
3.Checked DevTools, Lombock(optional)
4. Compiler errors solved, finally simple green arrow run works without (Unknown)
5. Happy ever after with correct strucuter and Maven happy to work in good environment.
I sadly find that IntelliJ often changes settings on its own