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

GIF loading failure #9

Closed
lehitoskin opened this issue Jan 4, 2017 · 3 comments
Closed

GIF loading failure #9

lehitoskin opened this issue Jan 4, 2017 · 3 comments

Comments

@lehitoskin
Copy link
Contributor

I have a GIF file I'm trying to load into a bitmap and I get this failure:

> (define img (build-path "003.gif"))
> (define bmp
    (let ([in (open-input-file img)])
      (define bitmap (make-object bitmap% in 'gif/alpha))
      (close-input-port in)
      bitmap))
; vector-set!: index is out of range
;   index: 4096
;   valid range: [0, 4095]
;   vector: '#(-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
;     -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...
; [,bt for context]
> ,bt
; vector-set!: index is out of range
;   index: 4096
;   valid range: [0, 4095]
;   vector: '#(-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...
;   context...:
;    /usr/share/racket/pkgs/draw-lib/racket/draw/private/lzw.rkt:124:6: loop
;    /usr/share/racket/pkgs/draw-lib/racket/draw/gif.rkt:113:0: read-image
;    /usr/share/racket/pkgs/draw-lib/racket/draw/gif.rkt:141:6: loop
;    /usr/share/racket/pkgs/draw-lib/racket/draw/gif.rkt:128:0: read-gif
;    /usr/share/racket/pkgs/draw-lib/racket/draw/gif.rkt:182:0: gif->rgba-rows
;    /usr/share/racket/pkgs/draw-lib/racket/draw/private/bitmap.rkt:381:4: do-load-bitmap method in bitmap%
;    /usr/share/racket/pkgs/draw-lib/racket/draw/private/syntax.rkt:234:25
;    /usr/share/racket/pkgs/draw-lib/racket/draw/private/bitmap.rkt:156:2
;    /usr/share/racket/collects/racket/private/class-internal.rkt:3553:0: continue-make-object
;    /usr/share/racket/collects/racket/private/class-internal.rkt:3553:0: continue-make-object
;    /usr/share/racket/collects/racket/private/class-internal.rkt:3507:0: do-make-object
;    /usr/share/racket/pkgs/xrepl-lib/xrepl/xrepl.rkt:1443:0
; /usr/share/racket/collects/racket/private/misc.rkt:88:7

It appears to be a problem with gif->rgba-rows, but I'm not familiar enough with the internals to say for sure. For reference, here's the GIF I'm using.
003

@lehitoskin
Copy link
Contributor Author

lehitoskin commented Mar 19, 2018

For reference, this is still an issue in Racket v6.12 and it happens on just about half of the gifs I have in my library.

@jbclements
Copy link
Contributor

This is... an animated GIF? Does Racket support animated GIFs?

@mflatt mflatt closed this as completed in b539f84 Mar 20, 2018
@lehitoskin
Copy link
Contributor Author

lehitoskin commented Mar 20, 2018

@jbclements while the animation isn't handled, it'll still load a static image.

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

No branches or pull requests

2 participants