(take-nth 0 coll) redux...


  • Type: Enhancement Enhancement
  • Status: In Progress In Progress
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: Backlog
  • Component/s: None
  • Labels:
  • Approval:


I dont seem to be able make the old ticket uninvalid so here goes
(take-nth 0 coll) causes (at least on Solaris) infinite space and time consumption
It's not a printout error as the following code causes the problem too

(let [j 0
firstprod (apply * (doall (map #(- 1 %) (take-nth j (:props mix)))))]) ; from my parameter update function

I used jvisualvm and the jvm is doing some RNI call - no clojure code is running at all
If left alone it will crash the jvm with all heap space consumed
0 is an InvalidArgument for take-nth
I wouldnt mind if it produced an infinite lazy sequence of nils even though thats wrong
It doesnt do this though it actively destroys the JVM
Its a bug nasty destructive and it took me half a day to figure out what was going on
please let someone fix it!


Stuart Halloway made changes -
Field Original Value New Value
Issue Type Defect [ 1 ] Enhancement [ 4 ]
Assignee Stuart Halloway [ stu ]
Reporter Assembla Importer [ importer ]
Priority Minor [ 4 ]
Stuart Halloway made changes -
Assignee Stuart Halloway [ stu ]
Approval Test Incomplete
Alexander Redington made changes -
Fix Version/s Approved Backlog [ 10034 ]
Fix Version/s Release.Next [ 10038 ]
Alex Miller made changes -
Fix Version/s Backlog [ 10035 ]
Fix Version/s Approved Backlog [ 10034 ]
Alex Miller made changes -
Approval Incomplete [ 10006 ] Vetted [ 10003 ]


Vote (0)
Watch (1)


  • Created: