[CLJ-1053] Locals still cleared too aggressively on delay in specific cases Created: 30/Aug/12 Updated: 03/Sep/13 Resolved: 03/Sep/13
|Affects Version/s:||Release 1.4|
|Fix Version/s:||Release 1.6|
|Reporter:||Jean Niklas L'orange||Assignee:||Unassigned|
This seems to be an extension of #CLJ-232. Locals are still cleared too aggressively in some specific instances: If the delay throws an exception when realized, and you dereference a local within the delay, the local may or may not be cleared depending on its need in the tail positions (without any obvious pattern). Examples of functions which works as intended and doesn't work as intended follows.
By "works", d will throw "ArithmeticException Divide by zero" every single time it is dereferenced. By "does not work", d will throw "ArithmeticException Divide by zero" on first dereferencing, but from second and onwards it will throw "NullPointerException [trace missing]".
|Comment by Jean Niklas L'orange [ 09/Apr/13 11:55 AM ]|
With Clojure 1.5.1, the trace is given and returns NullPointerException clojure.core/deref-future (core.clj:2NullPointerException clojure.core/deref-future (core.clj:2108)108), which refers to a .get call. The stacktrace reveals the following:
|Comment by Alex Miller [ 03/Sep/13 12:17 PM ]|
This was fixed by