[Fluxus] Collada import error related to " </p>" instead of "</p>"
Scott
alcoholiday at gmail.com
Wed Mar 11 16:31:09 PDT 2009
Folks,
Yes - I realize that I probably need to pick up v16 from git and
perhaps this is fixed in the latest build, but that said.
There is a bug that is triggered when a <p> ... </p> form has a space
before the closing </p>. This bug causes the parser to stick in a #f
at the end of parsing the array, which causes map to blowup on the >=
with (length vertex-data-list). I've marked the section below.
It is also dying somewhere else, but when I deleted all the leading
spaces, it ran to completion.
-S
(define (reorder-vertex-data indices data)
(define (loop vertex-data n dst)
(cond
((null? vertex-data) dst)
(else
(let ((vertex-data-list (car (cdr (car vertex-data)))))
(loop (cdr vertex-data) (+ n 1)
(cons (cons (car (car vertex-data)) ; stick the fluxus
name back on
(list
(map
(lambda (subindices)
(let ((data-index (list-ref subindices
n))) ; the actual index for this data type
(printf "~a : ~a / " data-index (length vertex-data-list))
>>>BANG! (cond
((>= data-index (length vertex-data-list))
;; todo, occasionally tripping up
here, not sure why
;; (e.g. window in collada complex
moon buggy example)
(printf "index too large: ~a from
~a~n" data-index subindices)
(list-ref (car (cdr (car vertex-data))) 0))
(else
(list-ref vertex-data-list
data-index))))) ; (need to get the list from ("p" positions) etc)
indices)))
dst))))))
(reverse (loop data 0 '())))
More information about the Fluxus
mailing list