boot-clj / boot-clj/boot-cljs

NullPointerException from adzerk.boot-cljs.impl/handle-ex

Open
#193 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
176
Forks
40
PR merge metrics
No merged PRs in 30d

Description

I encountered a NullPointerException today:

```
java.lang.Thread.run Thread.java: 748
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 624
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1149
java.util.concurrent.FutureTask.run FutureTask.java: 266
...
clojure.core/binding-conveyor-fn/fn core.clj: 2022
adzerk.boot-cljs/compile-1/fn boot_cljs.clj: 160
adzerk.boot-cljs/compile boot_cljs.clj: 72
boot.pod/call-in* pod.clj: 413
...
org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke ClojureRuntimeShimImpl.java: 102
org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke ClojureRuntimeShimImpl.java: 109
...
boot.pod/call-in* pod.clj: 410
boot.pod/eval-fn-call pod.clj: 359
clojure.core/apply core.clj: 657
...
adzerk.boot-cljs.impl/compile-cljs impl.clj: 163
adzerk.boot-cljs.impl/handle-ex impl.clj: 107
adzerk.boot-cljs.impl/escape-format-string impl.clj: 64
clojure.string/replace string.clj: 101
java.lang.NullPointerException:
clojure.lang.ExceptionInfo:
file: "/tmp/boot.user5150054472668965626.clj"
line: 49
```

I figure that `ensure-ends-in-newline` should always return a string even if it is `"\n"`?

Contributor guide

Open the contributing guide

Research direction

Start in impl.clj around handle-ex, escape-format-string, and ensure-ends-in-newline, following the compilation path shown in the stack trace. Verify that the reported input no longer causes a NullPointerException and that the helper returns a newline-containing string when needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, javascript
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.