On Dec 7, 9:39 pm, David Nolen <dnolen.li...@gmail.com> wrote: > http://github.com/jochu/swank-clojure/blob/master/src/main/clojure/sw... > > Is the offending line.
It's really hard to reason about it in clojure source code. I see, in jswat debbuger, the root cause of NPE appears around byte code (putfield ...) for a mutual recursive letfn form. Here is a simple way to reproduce it. I did it this time with latest master branch. Can anybody else reproduce it on different OS/JVM version? (ns test.letfn) (defn debug [n] (letfn [(even [n] (if (== n 0) true (odd (- n 1)))) (odd [n] (if (== n 0) false (even (- n 1))))] (odd n))) Listening for transport dt_socket at address: 6666 Clojure 1.1.0-master-SNAPSHOT user=> (require 'test.letfn) nil user=> (test.letfn/debug 5) java.lang.NullPointerException (NO_SOURCE_FILE:0) user=> (.. *e getCause printStackTrace) java.lang.NullPointerException at test.letfn$debug__17.invoke(letfn.clj:3) at user$eval__4.invoke(NO_SOURCE_FILE:2) at clojure.lang.Compiler.eval(Compiler.java:4642) at clojure.core$eval__5254.invoke(core.clj:2035) at clojure.main$repl__7403$read_eval_print__7415.invoke (main.clj:183) at clojure.main$repl__7403.doInvoke(main.clj:200) at clojure.lang.RestFn.invoke(RestFn.java:426) at clojure.main$repl_opt__7449.invoke(main.clj:254) at clojure.main$main__7484.doInvoke(main.clj:341) at clojure.lang.RestFn.invoke(RestFn.java:402) at clojure.lang.Var.invoke(Var.java:355) at clojure.lang.AFn.applyToHelper(AFn.java:171) at clojure.lang.Var.applyTo(Var.java:476) at clojure.main.main(main.java:37) nil user=> macbook-wifi:/ fenghou$ uname -a Darwin macbook-wifi 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386 macbook-wifi:/ fenghou$ java -version java version "1.5.0_19" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19- b02-306) Java HotSpot(TM) Client VM (build 1.5.0_19-138, mixed mode, sharing) - Feng > On Mon, Dec 7, 2009 at 9:34 PM, David Nolen <dnolen.li...@gmail.com> wrote: > > Looking at the stacktrace it looks like this is because of swank_fuzzy.clj. > > I can start up the SLIME Repl no problem, I see your exact same stack trace > > only if I try to trigger fuzzy completion via C-c TAB. > > > David > > > On Mon, Dec 7, 2009 at 9:24 PM, Feng <hou...@gmail.com> wrote: > > >> On Dec 7, 8:57 pm, David Nolen <dnolen.li...@gmail.com> wrote: > >> > I was getting this as well, but this was before the last 3 commits to > >> new. > >> > Did you wipe your old jars and class files and start afresh? > > >> Yes, just to make sure not waste Rich's time. I did doubt and triple > >> checks, ant clean, find $HOME -name clojure\*.jar |xargs rm ... > > >> I use Jeff's git master clone, not Phil's branch. No magic in emacs. I > >> load everything (clojure-*.jar, swank-clojure/src) in clojure.sh. And > >> always start swank from console repl in screen, then M-x slime- > >> connect. So I'm pretty sure where everything is. > > >> > David > > >> > On Mon, Dec 7, 2009 at 8:31 PM, Feng <hou...@gmail.com> wrote: > >> > > Hi, > > >> > > After git pull on new branch > > >> > > commit 1da63ad10d2531264e86eb705a10b3cebc9b1067 > >> > > Author: Rich Hickey <richhic...@gmail.com> > >> > > Date: Mon Dec 7 16:44:41 2009 -0500 > > >> > > init CLEAR_SITES > > >> > > Got NPE in slime > > >> > > java.lang.RuntimeException: java.lang.RuntimeException: > >> > > java.lang.RuntimeException: java.lang.RuntimeException: > >> > > java.lang.NullPointerException > >> > > [Thrown class java.lang.RuntimeException] > > >> > > Backtrace: > >> > > 0: clojure.lang.LazySeq.sval(LazySeq.java:47) > >> > > 1: clojure.lang.LazySeq.seq(LazySeq.java:56) > >> > > 2: clojure.lang.RT.seq(RT.java:440) > >> > > 3: clojure.core$seq__3970.invoke(core.clj:105) > >> > > 4: clojure.core$sort__4671.invoke(core.clj:1994) > >> > > 5: swank.commands.contrib.swank_fuzzy > >> > > $fuzzy_generate_matchings__1781.invoke(swank_fuzzy.clj:256) > >> > > 6: swank.commands.contrib.swank_fuzzy > >> > > $fuzzy_completion_set__1838$fn__1840.invoke(swank_fuzzy.clj:310) > >> > > 7: swank.commands.contrib.swank_fuzzy$call_with_timeout__1703.invoke > >> > > (swank_fuzzy.clj:127) > >> > > 8: swank.commands.contrib.swank_fuzzy > >> > > $fuzzy_completion_set__1838.invoke(swank_fuzzy.clj:309) > >> > > 9: swank.commands.contrib.swank_fuzzy > >> > > $eval__1849$fuzzy_completions__1851.invoke(swank_fuzzy.clj:323) > >> > > 10: clojure.lang.Var.invoke(Var.java:385) > >> > > 11: user$eval__2042.invoke(NO_SOURCE_FILE) > >> > > 12: clojure.lang.Compiler.eval(Compiler.java:5256) > >> > > 13: clojure.lang.Compiler.eval(Compiler.java:5224) > >> > > 14: clojure.core$eval__4688.invoke(core.clj:2036) > >> > > 15: swank.core$eval_in_emacs_package__399.invoke(core.clj:58) > >> > > 16: swank.core$eval_for_emacs__468.invoke(core.clj:126) > >> > > 17: clojure.lang.Var.invoke(Var.java:373) > >> > > 18: clojure.lang.AFn.applyToHelper(AFn.java:182) > >> > > 19: clojure.lang.Var.applyTo(Var.java:482) > >> > > 20: clojure.core$apply__4058.invoke(core.clj:437) > >> > > 21: swank.core$eval_from_control__401.invoke(core.clj:65) > >> > > 22: swank.core$eval_loop__403.invoke(core.clj:70) > >> > > 23: > >> swank.core$spawn_repl_thread__526$fn__557$fn__559.invoke(core.clj: > >> > > 179) > >> > > 24: clojure.lang.AFn.applyToHelper(AFn.java:172) > >> > > 25: clojure.lang.AFn.applyTo(AFn.java:164) > >> > > 26: clojure.core$apply__4058.invoke(core.clj:437) > >> > > 27: swank.core$spawn_repl_thread__526$fn__557.doInvoke(core.clj:176) > >> > > 28: clojure.lang.RestFn.invoke(RestFn.java:398) > >> > > 29: clojure.lang.AFn.run(AFn.java:37) > >> > > 30: java.lang.Thread.run(Thread.java:613) > > >> > > -- > >> > > You received this message because you are subscribed to the Google > >> > > Groups "Clojure" group. > >> > > To post to this group, send email to clojure@googlegroups.com > >> > > Note that posts from new members are moderated - please be patient > >> with > >> > > your first post. > >> > > To unsubscribe from this group, send email to > >> > > clojure+unsubscr...@googlegroups.com<clojure%2bunsubscr...@googlegroups.com> > >> <clojure%2bunsubscr...@googlegroups.com<clojure%252bunsubscr...@googlegroups.com> > > >> > > For more options, visit this group at > >> > >http://groups.google.com/group/clojure?hl=en > > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "Clojure" group. > >> To post to this group, send email to clojure@googlegroups.com > >> Note that posts from new members are moderated - please be patient with > >> your first post. > >> To unsubscribe from this group, send email to > >> clojure+unsubscr...@googlegroups.com<clojure%2bunsubscr...@googlegroups.com> > >> For more options, visit this group at > >>http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en