slyrus / opticl

An image processing library for Common Lisp
Other
182 stars 35 forks source link

Heap exhausted #38

Closed C-Entropy closed 3 years ago

C-Entropy commented 3 years ago
(ql:quickload :opticl)

1. (defparameter *temp* (opticl:read-jpeg-file "/home/null/mpv-shot0002.jpg")) ==> looks good

2.(setf *temp* `(opticl:read-jpeg-file` "/home/null/mpv-shot0002.jpg")) ==>
 Lisp connection closed unexpectedly: connection broken by remote peer(by emacs)
While it keeps print three dimensional arrary in *inferior-lisp*

I'm using sbcl/2.1.3

slyrus commented 3 years ago

You do realize that the second form returns the value that you setf'ed temp too? So your SLIME buffer is attempting to print the array that contains the pixels of the image. This indeed fails but this isn't an opticl bug.

I'm not sure what the backticks are there for, but can you try:

(setf *temp* (make-array '(4000 4000)))

And you'll likely see a similar error.

C-Entropy commented 3 years ago

I see, is there anyway to avoid this? Just not use setf, but something like let/defparameter? Or is there a way to close the print? Thank you!