Closed tekktonic closed 5 years ago
If you could create a skeletal project where you can reproduce the problem it would go a long way to finding a solution.
I can see what I can do once I'm off work. I never use java if I can avoid it but I can probably get something to cause the NPE together :)
On August 8, 2019 11:27:12 AM EDT, Scott McLeod notifications@github.com wrote:
If you could create a skeletal project where you can reproduce the problem it would go a long way to finding a solution.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/mopemope/meghanada-emacs/issues/153#issuecomment-519567162
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Seems to have fixed itself before I got around to creating a test case.
I don't mean to necro a closed issue but I ran into this today. In case anyone else runs into this, what seemed to fix it was using open-jdk 8.
Occasionally when meghanada encounters a source cache miss it crashes with an NPE and the following stack trace: meghanada.com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException at meghanada.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2050) ~[meghanada-1.0.13.jar:?] at meghanada.com.google.common.cache.LocalCache.get(LocalCache.java:3952) ~[meghanada-1.0.13.jar:?] at meghanada.com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) ~[meghanada-1.0.13.jar:?] at meghanada.com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958) ~[meghanada-1.0.13.jar:?] at meghanada.cache.GlobalCache.getSource(GlobalCache.java:94) ~[meghanada-1.0.13.jar:?] at meghanada.utils.FileUtils.getSource(FileUtils.java:399) ~[meghanada-1.0.13.jar:?] at meghanada.docs.declaration.DeclarationSearcher.searchDeclaration(DeclarationSearcher.java:267) ~[meghanada-1.0.13.jar:?] at meghanada.session.Session.showDeclaration(Session.java:844) ~[meghanada-1.0.13.jar:?] at meghanada.server.CommandHandler.showDeclaration(CommandHandler.java:361) ~[meghanada-1.0.13.jar:?] at meghanada.server.emacs.EmacsServer.lambda$dispatch$21(EmacsServer.java:265) ~[meghanada-1.0.13.jar:?] at com.leacox.motif.matching.Matching1.lambda$get$15(Matching1.java:45) ~[meghanada-1.0.13.jar:?] at com.leacox.motif.matching.Pattern$1.apply(Pattern.java:40) ~[meghanada-1.0.13.jar:?] at com.leacox.motif.matching.FluentMatchingR.getMatch(FluentMatchingR.java:118) ~[meghanada-1.0.13.jar:?] at meghanada.server.emacs.EmacsServer.dispatch(EmacsServer.java:363) ~[meghanada-1.0.13.jar:?] at meghanada.server.emacs.EmacsServer.lambda$acceptConnection$36(EmacsServer.java:444) ~[meghanada-1.0.13.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222] Caused by: java.lang.NullPointerException at meghanada.project.Project.parseFile(Project.java:421) ~[meghanada-1.0.13.jar:?] at meghanada.cache.JavaSourceLoader.load(JavaSourceLoader.java:75) ~[meghanada-1.0.13.jar:?] at meghanada.cache.JavaSourceLoader.load(JavaSourceLoader.java:20) ~[meghanada-1.0.13.jar:?] at meghanada.com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3528) ~[meghanada-1.0.13.jar:?] at meghanada.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2277) ~[meghanada-1.0.13.jar:?] at meghanada.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154) ~[meghanada-1.0.13.jar:?] at meghanada.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044) ~[meghanada-1.0.13.jar:?] ... 19 more
I unfortunately can't provide the project since it's for work, but it's triggered on most of my work projects by this point, so it may affect all my projects. Currently on emacs 27.0.50, also triggered on emacs 26.1 and 26.2, slackware 14.1