[cl-gd-devel] cl-gd on 64 bit Lisp with do-pixel
Hi, I'm trying to use cl-gd on a 64 bit platform and I have a problem with DO-PIXELS applied to a truecolor image: (with-image-from-file (image "/home/hans/affe.jpg") (do-pixels (image) (format t "~A~%" (raw-pixel)))) fails with a memory access violation error, both on openmcl and on sbcl on FreeBSD/amd64. Do others see this, too, on 64 bit Lisps? I want to rule out that it is a problem with gd on FreeBSD or the fact that I am using CFFI-UFFI-COMPAT. I have only quickly looked at cl-gd/misc.lisp and I saw that it uses :int as type specifier where I think a more specific data type like uint32 or some such would have been required. But it could all be me. So, does anyone here run cl-gd on a 64 bit Lisp? Thanks, Hans
Hi, sure enough, my problem was not rooted in CL-GD, but rather in the fact that I was using CFFI-UFFI-COMPAT. I'll try to avoid that now! -Hans On Feb 11, 2008 1:09 PM, Hans Hübner <hans@huebner.org> wrote:
Hi,
I'm trying to use cl-gd on a 64 bit platform and I have a problem with DO-PIXELS applied to a truecolor image:
(with-image-from-file (image "/home/hans/affe.jpg") (do-pixels (image) (format t "~A~%" (raw-pixel))))
fails with a memory access violation error, both on openmcl and on sbcl on FreeBSD/amd64. Do others see this, too, on 64 bit Lisps? I want to rule out that it is a problem with gd on FreeBSD or the fact that I am using CFFI-UFFI-COMPAT.
I have only quickly looked at cl-gd/misc.lisp and I saw that it uses :int as type specifier where I think a more specific data type like uint32 or some such would have been required. But it could all be me.
So, does anyone here run cl-gd on a 64 bit Lisp?
Thanks, Hans
I'm still having problems with true color images on my 64 bit Lisps, so if anyone with experience in that direction is reading, please speak up! :) Thanks, Hans On Feb 11, 2008 1:09 PM, Hans Hübner <hans@huebner.org> wrote:
Hi,
I'm trying to use cl-gd on a 64 bit platform and I have a problem with DO-PIXELS applied to a truecolor image:
(with-image-from-file (image "/home/hans/affe.jpg") (do-pixels (image) (format t "~A~%" (raw-pixel))))
fails with a memory access violation error, both on openmcl and on sbcl on FreeBSD/amd64. Do others see this, too, on 64 bit Lisps? I want to rule out that it is a problem with gd on FreeBSD or the fact that I am using CFFI-UFFI-COMPAT.
I have only quickly looked at cl-gd/misc.lisp and I saw that it uses :int as type specifier where I think a more specific data type like uint32 or some such would have been required. But it could all be me.
So, does anyone here run cl-gd on a 64 bit Lisp?
Thanks, Hans
For the records: cl-gd just works fine on 64 bit Lisps (SBCL and CCL) if one uses UFFI, not CFFI-UFFI-COMPAT. UFFI works fine on CCL with a small patch to support pointers to pointers. If you read this in the archive and have problems compiling cl-gd with UFFI on CCL, contact me. -Hans On Tue, Feb 12, 2008 at 4:02 PM, Hans Hübner <hans@huebner.org> wrote:
I'm still having problems with true color images on my 64 bit Lisps, so if anyone with experience in that direction is reading, please speak up! :)
Thanks, Hans
On Feb 11, 2008 1:09 PM, Hans Hübner <hans@huebner.org> wrote:
Hi,
I'm trying to use cl-gd on a 64 bit platform and I have a problem with DO-PIXELS applied to a truecolor image:
(with-image-from-file (image "/home/hans/affe.jpg") (do-pixels (image) (format t "~A~%" (raw-pixel))))
fails with a memory access violation error, both on openmcl and on sbcl on FreeBSD/amd64. Do others see this, too, on 64 bit Lisps? I want to rule out that it is a problem with gd on FreeBSD or the fact that I am using CFFI-UFFI-COMPAT.
I have only quickly looked at cl-gd/misc.lisp and I saw that it uses :int as type specifier where I think a more specific data type like uint32 or some such would have been required. But it could all be me.
So, does anyone here run cl-gd on a 64 bit Lisp?
Thanks, Hans
"Hans Hübner" <hans@huebner.org> writes:
For the records: cl-gd just works fine on 64 bit Lisps (SBCL and CCL) if one uses UFFI, not CFFI-UFFI-COMPAT.
FWIW, I haven't tested this but I suspect the problem with 64-bit SBCL and CFFI relates to a bogus declaration wrt pointer types which has been fixed for a while in a separate branch and, as of a few minutes ago, pushed to the main tree. -- Luís Oliveira http://student.dei.uc.pt/~lmoliv/
participants (2)
-
Hans Hübner -
Luis Oliveira