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

Crash at usage of GaussianBlur with small images #40

Open
nbossard opened this issue Jul 21, 2023 · 1 comment
Open

Crash at usage of GaussianBlur with small images #40

nbossard opened this issue Jul 21, 2023 · 1 comment

Comments

@nbossard
Copy link

nbossard commented Jul 21, 2023

Hello, I have been facing an issue when using method GaussianBlur.

If used on images smaller than (around) 230 px of width the library will crash systematically with error like following:

Error: Output buffer gaussianblur is accessed at -384, which is before the min (0) in dimension 1
SIGABRT: abort
PC=0x7f896a72000b m=5 sigcode=18446744073709551610
signal arrived during cgo execution

goroutine 53 [syscall]:
runtime.cgocall(0xeaf440, 0xc00045b550)
        /usr/local/go/src/runtime/cgocall.go:157 +0x5c fp=0xc00045b528 sp=0xc00045b4f0 pc=0x41201c
github.com/octu0/blurry._Cfunc_libgaussianblur(0xc0002b6000, 0x27, 0x67, 0x43fa0000, 0xc000362000)
        _cgo_gotypes.go:651 +0x4c fp=0xc00045b550 sp=0xc00045b528 pc=0xe383ec
github.com/octu0/blurry.Gaussianblur(0xc000490300, 0x407f400000000000)
        /home/vagrant/go/pkg/mod/github.com/octu0/[email protected]/gaussianblur.go:48 +0x9d fp=0xc00045b5a0 sp=0xc00045b550 pc=0xe3873d

Increasing the image width at 240px "solves" the issue. Seems that Boxblur is impacted too.

@nbossard
Copy link
Author

nbossard commented Jul 21, 2023

Note too small height also makes crash, but can't find the formula, strange...
Globally if width*height<30K it crashes.

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

1 participant