swank-clojure icon indicating copy to clipboard operation
swank-clojure copied to clipboard

Swank freezes on display of locals containing an infinite lazy sequence

Open neotyk opened this issue 15 years ago • 5 comments

Swank freezes on swank.core/break called from within 'for'. Sample can be found here: http://gist.github.com/403585#file_swank_break_freeze.clj Captured stack trace is here: http://gist.github.com/403585#file_freeze_stack.txt

neotyk avatar May 17 '10 09:05 neotyk

If I (def primes [1 3 5 7 11 13]), and try your example, then the break functionality works fine for me.

Which versions of clojure and swank-clojure?

hugoduncan avatar May 17 '10 14:05 hugoduncan

if I def primes like that, than it works for me as well. But my example was using clojure.contrib.lazy-seqs/primes and I suppose that similar definition would yield same freeze result.

[org.clojure/clojure "1.2.0-master-SNAPSHOT"] :dev [swank-clojure "1.2.1"]

neotyk avatar May 18 '10 07:05 neotyk

The dangers of use - I missed that one. However, it doesn't change anything here, I still get a functioning break with clojure.contrib.lazy-seqs/primes, and am using the same versions.

hugoduncan avatar May 18 '10 13:05 hugoduncan

Hit [enter] on first frame to see locals.

neotyk avatar May 18 '10 13:05 neotyk

OK, reproduced. The problem here is that it is trying to display the whole of the lazy sequence.

commands.basic/locals-for-emacs is calling str on the lazy sequence.

hugoduncan avatar May 18 '10 15:05 hugoduncan