Clojure

print-doc triggers NPE in clojure.lang.Namespace.find

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: Release 1.2
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    windows xp / java 1.6.0_24

Description

In a swank repl I tried to invoke (print-doc ADefTypeInCurrentNamespace) and got the following exception:

No message.
[Thrown class java.lang.NullPointerException]

Restarts:
0: [QUIT] Quit to the SLIME top level

Backtrace:
0: java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
1: clojure.lang.Namespace.find(Namespace.java:188)
2: clojure.core$find_ns.invoke(core.clj:3180)
3: clojure.core$the_ns.invoke(core.clj:3208)
4: clojure.core$ns_name.invoke(core.clj:3214)
5: clojure.core$print_doc.invoke(core.clj:3831)
6: les$eval36576.invoke(NO_SOURCE_FILE:1)
7: clojure.lang.Compiler.eval(Compiler.java:5424)
8: clojure.lang.Compiler.eval(Compiler.java:5391)
9: clojure.core$eval.invoke(core.clj:2382)
10: swank.commands.basic$eval_region.invoke(basic.clj:47)
11: swank.commands.basic$eval_region.invoke(basic.clj:37)
12: swank.commands.basic$eval797$listener_eval__798.invoke(basic.clj:71)
13: clojure.lang.Var.invoke(Var.java:365)
14: les$eval36574.invoke(NO_SOURCE_FILE)
15: clojure.lang.Compiler.eval(Compiler.java:5424)
16: clojure.lang.Compiler.eval(Compiler.java:5391)
17: clojure.core$eval.invoke(core.clj:2382)
18: swank.core$eval_in_emacs_package.invoke(core.clj:90)
19: swank.core$eval_for_emacs.invoke(core.clj:237)
20: clojure.lang.Var.invoke(Var.java:373)
21: clojure.lang.AFn.applyToHelper(AFn.java:169)
22: clojure.lang.Var.applyTo(Var.java:482)
23: clojure.core$apply.invoke(core.clj:540)
24: swank.core$eval_from_control.invoke(core.clj:97)
25: swank.core$eval_loop.invoke(core.clj:102)
26: swank.core$spawn_repl_thread$fn_482$fn_483.invoke(core.clj:307)
27: clojure.lang.AFn.applyToHelper(AFn.java:159)
28: clojure.lang.AFn.applyTo(AFn.java:151)
29: clojure.core$apply.invoke(core.clj:540)
30: swank.core$spawn_repl_thread$fn__482.doInvoke(core.clj:304)
31: clojure.lang.RestFn.invoke(RestFn.java:398)
32: clojure.lang.AFn.run(AFn.java:24)
33: java.lang.Thread.run(Thread.java:619)

Activity

Hide
Philipp Meier added a comment -

The following steps reproduce the error:

(deftype Foo [])
(print-doc Foo)

Show
Philipp Meier added a comment - The following steps reproduce the error: (deftype Foo []) (print-doc Foo)
Hide
Stuart Sierra added a comment -

clojure.repl/print-doc is private in Clojure 1.3, and no longer throws NPE in the example case.

Show
Stuart Sierra added a comment - clojure.repl/print-doc is private in Clojure 1.3, and no longer throws NPE in the example case.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: