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

multiple (prn "something") produces a NPE #48

Open
geraldodev opened this issue Feb 12, 2014 · 1 comment
Open

multiple (prn "something") produces a NPE #48

geraldodev opened this issue Feb 12, 2014 · 1 comment

Comments

@geraldodev
Copy link

I have discovered that when my onchange handler on an input elementet that uses prn to debug, was fired many times.

That will raise an exception

java.lang.RuntimeException: Agent is failed, needs restart
    at clojure.lang.Util.runtimeException(Util.java:223)
    at clojure.lang.Agent.dispatch(Agent.java:238)
    at clojure.core$send_via.doInvoke(core.clj:1915)
    at clojure.lang.RestFn.applyTo(RestFn.java:146)
    at clojure.core$apply.invoke(core.clj:623)
    at clojure.core$send_off.doInvoke(core.clj:1937)
    at clojure.lang.RestFn.invoke(RestFn.java:464)
    at cemerick.austin$constrain_order.invoke(austin.clj:238)
    at cemerick.austin$eval3275$fn__3277.invoke(austin.clj:244)
    at clojure.lang.MultiFn.invoke(MultiFn.java:227)
    at cemerick.austin$handle_request.invoke(austin.clj:282)
    at cemerick.austin$create_server$reify__3178.handle(austin.clj:25)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
    at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:80)
    at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:677)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
    at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:649)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
    at clojure.core$fn__5420.invoke(core_print.clj:187)
    at clojure.lang.MultiFn.invoke(MultiFn.java:231)
    at clojure.core$pr_on.invoke(core.clj:3322)
    at clojure.core$pr.invoke(core.clj:3334)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.core$apply.invoke(core.clj:617)
    at clojure.core$print.doInvoke(core.clj:3379)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at cemerick.austin$eval3275$fn__3277$fn__3279$fn__3280.invoke(austin.clj:247)
    at cemerick.austin$eval3275$fn__3277$fn__3279.invoke(austin.clj:246)
    at cemerick.austin$run_in_order.invoke(austin.clj:230)
    at clojure.core$binding_conveyor_fn$fn__4107.invoke(core.clj:1839)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.lang.Agent$Action.doRun(Agent.java:114)
    at clojure.lang.Agent$Action.run(Agent.java:163)
@cemerick
Copy link
Owner

The failure is that the :print dispatch for handle-post is attempting to read the content that was printed; this is yielding some value that print on the Clojure side is apparently unable to handle.

That part of Austin is largely unchanged from its roots in the stock ClojureScript browser REPL implementation. I'll need to re-familiarize myself with what the objectives are there, because I can't think of why we'd be wanting to read what was printed browser-side.

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