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

Segmentation Violation #8

Closed
sam-cts opened this issue Aug 11, 2020 · 4 comments · Fixed by #9
Closed

Segmentation Violation #8

sam-cts opened this issue Aug 11, 2020 · 4 comments · Fixed by #9
Assignees
Labels
bug Something isn't working

Comments

@sam-cts
Copy link

sam-cts commented Aug 11, 2020

I went into segmentation violation while running detection.

then I located it happened in following line:

network_predict_ptr(n, sized.data); in line 17, network.c

I simply switch it to network_predict_image(n, sized); and it works fine

here's the segmentation error that I got before the change

`fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x2 addr=0x7f87d443c000 pc=0x7f8a45518d8f]

runtime stack:
runtime.throw(0x53d64e, 0x2a)
/usr/local/go/src/runtime/panic.go:1116 +0x72
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:679 +0x46a

goroutine 1 [syscall]:
runtime.cgocall(0x4f04f0, 0xc00006dbc0, 0xc00007a028)
/usr/local/go/src/runtime/cgocall.go:133 +0x5b fp=0xc00006db90 sp=0xc00006db58 pc=0x405b3b
github.com/LdDl/go-darknet._Cfunc_perform_network_detect(0x116e1f0, 0xc00007a028, 0x3e80000000000001, 0x3ee666663f000000, 0x0, 0x0, 0x0)
_cgo_gotypes.go:869 +0x4d fp=0xc00006dbc0 sp=0xc00006db90 pc=0x4cd2dd
github.com/LdDl/go-darknet.(*YOLONetwork).Detect.func1(0xc00006de78, 0xc00007a000, 0x0, 0x0)
/home/idx/go/src/github.com/LdDl/go-darknet/network.go:72 +0x117 fp=0xc00006dc30 sp=0xc00006dbc0 pc=0x4cf5b7
github.com/LdDl/go-darknet.(*YOLONetwork).Detect(0xc00006de78, 0xc00007a000, 0xc00007a000, 0x0, 0x0)
/home/idx/go/src/github.com/LdDl/go-darknet/network.go:72 +0x8e fp=0xc00006dd40 sp=0xc00006dc30 pc=0x4cec1e
main.main()
/home/idx/go/src/github.com/LdDl/go-darknet/example/main.go:66 +0x339 fp=0xc00006df88 sp=0xc00006dd40 pc=0x4ef9a9
runtime.main()
/usr/local/go/src/runtime/proc.go:203 +0x1fa fp=0xc00006dfe0 sp=0xc00006df88 pc=0x4353ea
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc00006dfe8 sp=0xc00006dfe0 pc=0x45fb71
exit status 2`

@LdDl LdDl self-assigned this Aug 11, 2020
@LdDl LdDl added the bug Something isn't working label Aug 11, 2020
@LdDl
Copy link
Owner

LdDl commented Aug 11, 2020

Hello
Thanks for the issue.
Can your provide hash of used version of AlexeyAB's darknet?

Latest tested by me: 08bc0c9373158da6c42f11b1359ca2c017cef1b5

@sam-cts
Copy link
Author

sam-cts commented Aug 11, 2020

Currently I am using: 9dc897d2c77d5ef43a6b237b717437375765b527

@LdDl
Copy link
Owner

LdDl commented Aug 11, 2020

Currently I am using: 9dc897d2c77d5ef43a6b237b717437375765b527

Seems like breaking changes for us.
I'm getting this one

Calloc error - possibly out of CPU RAM 

I'll make update soon.

@LdDl LdDl mentioned this issue Aug 11, 2020
@LdDl LdDl linked a pull request Aug 11, 2020 that will close this issue
@LdDl LdDl closed this as completed in #9 Aug 11, 2020
@LdDl
Copy link
Owner

LdDl commented Aug 11, 2020

Can you check current version of go-darknet for your environment now?
I haven't used network_predict_image because of internal resizing image (which have done already before object detection), but used network_predict (which accepts *net instead &net)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants