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

image/draw: Panic when writing GIF file #9177

Closed
ernestoalejo opened this issue Nov 27, 2014 · 2 comments
Closed

image/draw: Panic when writing GIF file #9177

ernestoalejo opened this issue Nov 27, 2014 · 2 comments
Milestone

Comments

@ernestoalejo
Copy link

@ernestoalejo ernestoalejo commented Nov 27, 2014

What does 'go version' print?
I'm checking with the bleeding edge code.


What steps reproduce the problem?

1. go get github.com/nfnt/resize
2. go get github.com/oliamb/cutter
3. go run foo.go


What happened?
panic: runtime error: invalid memory address or nil pointer dereference

image/draw.clip(...)
    /go/src/pkg/image/draw/draw.go:86 +0x43e
image/draw.floydSteinberg.Draw(...)
    /go/src/pkg/image/draw/draw.go:62 +0x87
image/draw.floydSteinberg.Draw·i(...)
    <autogenerated>:7 +0x89
image/gif.Encode(...)
    /go/src/pkg/image/gif/writer.go:316 +0x521


What should have happened instead?
Write the GIF to the output file.

Please provide any additional information below.
https://code.google.com/p/go/source/browse/src/image/draw/draw.go#62 it's calling the
clip function with nil and then it tries to
https://code.google.com/p/go/source/browse/src/image/draw/draw.go#86 write to that nil

Attachments:

  1. sample.gif (431976 bytes)
  2. foo.go (783 bytes)
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Nov 27, 2014

Comment 1:

Labels changed: added repo-main, release-go1.5.

Loading

@bradfitz bradfitz added this to the Go1.5 milestone Dec 16, 2014
@bradfitz bradfitz added this to the Go1.5 milestone Dec 16, 2014
@jeffallen
Copy link
Contributor

@jeffallen jeffallen commented Dec 19, 2014

The attachment, fetched from code.google.com/p/go instead of github.

sample

Loading

@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants