Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pngload fails to load #1584

Open
paulapatience opened this issue May 15, 2024 · 4 comments
Open

pngload fails to load #1584

paulapatience opened this issue May 15, 2024 · 4 comments
Labels

Comments

@paulapatience
Copy link
Contributor

Loading pngload on clasp-boehmprecise-2.5.0-130-gc4a56ca22 fails like so:

; Compiling file: /home/paul/.local/share/common-lisp/source/pngload/src/chunk-types.lisp
;   (IN-PACKAGE #:PNGLOAD)
;   (DEFMACRO DEFINE-CHUNK ...)
;   (DEFINE-CHUNK IDAT ...)
;   (DEFINE-CHUNK IHDR ...)
;   (DEFINE-CHUNK IEND ...)
;   (DEFINE-CHUNK PLTE ...)
;   (DEFINE-CHUNK CHRM ...)
;   (DEFINE-CHUNK GAMA ...)
;   (DEFINE-CHUNK ICCP ...)
;   (DEFINE-CHUNK SBIT ...)
;   (DEFINE-CHUNK SRGB ...)
;   (DEFINE-CHUNK BKGD ...)
;   (DEFINE-CHUNK HIST ...)
;   (DEFINE-CHUNK TRNS ...)
;   (DEFINE-CHUNK PHYS ...)
;   (DEFINE-CHUNK SPLT ...)
;   (DEFINE-CHUNK TIME ...)
;   (DEFINE-CHUNK ITXT ...)
;   (DEFINE-CHUNK TEXT ...)
;   (DEFINE-CHUNK ZTXT ...)
;   (DEFINE-CHUNK OFFS ...)
;   (DEFINE-CHUNK PCAL ...)
;   (DEFINE-CHUNK SCAL ...)
;   (DEFINE-CHUNK GIFG ...)
;   (DEFINE-CHUNK GIFX ...)
;   (DEFINE-CHUNK STER ...)
;   (DEFINE-CHUNK EXIF ...)
;   (DEFINE-CHUNK UNKNOWN ...)
; caught ERROR:
;   No applicable method for CLEAVIR-BIR::REACHEDP with arguments
;    (NIL)
;     at /home/paul/.local/share/common-lisp/source/pngload/src/chunk-types.lisp 223:0
; 
; caught ERROR:
;   No applicable method for CLEAVIR-BIR::REACHEDP with arguments
;    (NIL)
;     at /home/paul/.local/share/common-lisp/source/pngload/src/chunk-types.lisp 165:0
; 
; caught ERROR:
;   No applicable method for CLEAVIR-BIR::REACHEDP with arguments
;    (NIL)
;     at /home/paul/.local/share/common-lisp/source/pngload/src/chunk-types.lisp 122:0
; 

Condition of type: COMPILE-FILE-ERROR
COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "pngload" "chunk-types">
@paulapatience
Copy link
Contributor Author

paulapatience commented May 16, 2024

One of the places in pngload which signals the error is the (UB8) call in (DEFINE-CHUNK PLTE ...): Replacing the call with NIL fixes the compilation error. Also, when repeatedly interactively evaluating the DEFINE-CHUNK form, sometimes the error is signaled, sometimes not.

@paulapatience
Copy link
Contributor Author

Here is a minimal reproducible example which causes the error:

(defun parse-chunk/plte ()
  (let ((v (make-array 0)))
    (labels ((ub8 ()
               (aref v 0))
             (read-bytes ()
               (map-into (make-array 0) #'ub8)))
      (ub8))))

(The naming is a relic of my having started from (DEFINE-CHUNK PLTE ...) and having progressively macroexpanded and removed unnecessary parts.)

@paulapatience
Copy link
Contributor Author

The same error is still present on latest Clasp, but I cannot reproduce it with the above minimal reproducible example. It might be easier to debug starting from c4a56ca.

@Bike
Copy link
Member

Bike commented May 17, 2024

Reproduced. As you said, it's intermittent, and that's due to the occasionally nondeterministic nature of Cleavir. The error is during flow order recomputation during meta evaluation, so I'm going to guess this is another instance of #1442, which I am working towards fixing comprehensively at the moment. Alternately it could be due to something going wrong while deleting the unused function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants