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

NPE periodically #296

Closed
jimpil opened this issue Mar 5, 2014 · 3 comments
Closed

NPE periodically #296

jimpil opened this issue Mar 5, 2014 · 3 comments
Milestone

Comments

@jimpil
Copy link

jimpil commented Mar 5, 2014

HI all,
I'm using the latest IDEA (community) and the latest cursive plugin (0.1.16). Every time I type something I get the following NPE...Idea doesn't crash and seems to continue to work fine, but the exception messages are rather annoying!

java.lang.NullPointerException
at cursive.psi.impl.ns.NamespaceUtil$MyClSyntheticNamespace.processDeclarations(NamespaceUtil.java:114)
at plugin.resolve.namespaces$process_synthetic_ns_decls.invoke(namespaces.clj:17)
at clojure.lang.Var.invoke(Var.java:431)
at cursive.psi.impl.ns.NamespaceUtil$MyClSyntheticNamespace.processDeclarations(NamespaceUtil.java:84)
at plugin.resolve$process_declarations.invoke(resolve.clj:37)
at plugin.resolve.symbol$resolve_normal_symbol$fn__3241.invoke(symbol.clj:285)
at clojure.core$map$fn__4207.invoke(core.clj:2487)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:60)
at clojure.lang.RT.seq(RT.java:484)
at clojure.core$seq.invoke(core.clj:133)
at clojure.core.protocols$seq_reduce.invoke(protocols.clj:30)
at clojure.core.protocols$fn__6026.invoke(protocols.clj:54)
at clojure.core.protocols$fn__5979$G__5974__5992.invoke(protocols.clj:13)
at clojure.core$reduce.invoke(core.clj:6177)
at plugin.resolve$all_of.invoke(resolve.clj:25)
at plugin.resolve.symbol$resolve_normal_symbol.invoke(symbol.clj:287)
at plugin.resolve.symbol$resolve_symbol.invoke(symbol.clj:320)
at clojure.lang.Var.invoke(Var.java:419)
at cursive.psi.impl.symbols.ClSymbolImpl$MyResolver.resolve(ClSymbolImpl.java:163)
at cursive.psi.impl.symbols.ClSymbolImpl$MyResolver.resolve(ClSymbolImpl.java:160)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:103)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:131)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:123)
at cursive.psi.impl.symbols.ClSymbolImpl.multiResolve(ClSymbolImpl.java:118)
at plugin.annotator$annotate_symbol.invoke(annotator.clj:180)
at plugin.annotator$fn__1842.invoke(annotator.clj:216)
at plugin.annotator$fn__1823$G__1818__1830.invoke(annotator.clj:207)
at plugin.annotator$initialise$reify__1846.annotate(annotator.clj:231)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:160)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:103)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$5.run(GeneralHighlightingPass.java:296)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:383)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$300(GeneralHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$6.run(GeneralHighlightingPass.java:389)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:87)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:386)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$300(GeneralHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$6.run(GeneralHighlightingPass.java:389)
at com.intellij.codeInsight.daemon.impl.RefCountHolder.analyze(RefCountHolder.java:298)
at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:160)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:386)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:374)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:214)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:86)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:380)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1150)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:371)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:368)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:344)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask.exec(JobLauncherImpl.java:194)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)

any ideas anyone? I 've spent a good 2-3 hours looking for a similar issue but was unsuccessful. Thanks in advance...

@cursive-ide
Copy link
Owner

Hmm, this looks like you have a symbol defined somewhere in your project in a file with no namespace. Clearly you should be able to do that. By lucky chance, this bug is fixed in the next build anyway (no namespace now defaults to "user", which is what scripts do).

@cursive-ide cursive-ide added this to the Shortlist milestone Mar 6, 2014
@jimpil
Copy link
Author

jimpil commented Mar 6, 2014

this is strange as I am opening a proper .ipr project and navigating to a particular namespace...in any case, it is good news that is has already been addressed.

@jimpil
Copy link
Author

jimpil commented Mar 6, 2014

I've got some news...it turns out that as soon as I load a file the NPE stops occurring. This morning I spent close to an hour without a single one. My guess is I should close this issue and wait for the update. Frankly, it wasn't a big issue in the first place since it's not leading to a crash of IDEA.

@jimpil jimpil closed this as completed Mar 6, 2014
@cursive-ide cursive-ide modified the milestones: 0.1.17, Shortlist Mar 9, 2014
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