Panic !!! index out of FlattenPixels
zokypesch opened this issue · 0 comments
hello guys, i found some panic case details below:
OS: Mac OS & Ubuntu 18.0.4
short description:
- index out of range in file transforms/pixels.go line 35
- index out of range in file hashcompute.go func ExtDifferenceHash line 177
- index out of range in file hashcompute.go func ExtAverageHash line 146
example error:
github.com/corona10/goimagehash/transforms.FlattenPixels(0xc000f8e000, 0x3f, 0x3f, 0x38, 0x3f, 0x4a74e40, 0xc0029ec280, 0xc0000da030)
/Users/maulanaoktofitriadi/go/pkg/mod/github.com/corona10/goimagehash@v1.0.3/transforms/pixels.go:35 +0xe1
github.com/corona10/goimagehash.ExtAverageHash(0x4a74e40, 0xc00004a100, 0x38, 0x3f, 0x0, 0x0, 0xc002566780)
/Users/maulanaoktofitriadi/go/pkg/mod/github.com/corona10/goimagehash@v1.0.3/hashcompute.go:133 +0xbf
gitlab.com/prakerja/worker-check-ktp/handler.ProcessingData.func2(0xc0023faf20, 0xc00241b9e0, 0xc0001c4000, 0xc00242fda0, 0x1f)
/Users/maulanaoktofitriadi/go/src/gitlab.com/pr/worker-check-ktp/handler/worker.go:83 +0x5ee
created by gitlab.com/pr/worker-check-ktp/handler.ProcessingData
/Users/maulanaoktofitriadi/go/src/gitlab.com/pr/worker-check-ktp/handler/worker.go:48 +0x339
somehow when iam using ExtAverageHash or ExtDifferenceHash function then i got index out of range