mirror of
https://github.com/gen2brain/cam2ip.git
synced 2026-04-26 22:55:53 +03:00
[GH-ISSUE #31] Random crash on Mac OS after running few minutes #23
Labels
No labels
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cam2ip#23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nvdhau-v2cloud on GitHub (Apr 22, 2021).
Original GitHub issue: https://github.com/gen2brain/cam2ip/issues/31
I tried the precompiled for Mac OS. It works but randomly crashes after a few minutes.
Command:
cam2ip' -bind-addr :62001 -delay 100OS: Mac OS 11.2.3
Logs:
Do you have any ideas about the issue?
Thanks!
@gen2brain commented on GitHub (Apr 25, 2021):
Some backtrace would maybe be useful, precompiled binary is built with OpenCV 2.x. Perhaps you can build with 4.x version on your machine. Also, macOS binary is cross-compiled on Linux, but that should not be an issue.
@nvdhau-v2cloud commented on GitHub (Apr 26, 2021):
How can I get some backtrace for you?
@gen2brain commented on GitHub (Apr 27, 2021):
Just install gdb, and
gdb ./cam2ip, thenrun, and after it crashesbt. But, it looks like it crashes in OpenCV cgo call, so I doubt I can do anything. I can do both OpenCV 2.x and 4.x builds when I do next release, but I don't have much time to do that right now.@nvdhau-v2cloud commented on GitHub (Apr 30, 2021):
I cannot run gdb, below is the gdb log
I tried to compile cam2ip with gocv (OpenCV 4.x) on MacOS by command
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -tags cv4 -o cam2ip-ldflags "-linkmode external -s -w" github.com/gen2brain/cam2ip/cmd/cam2ipwith different configs:I tested each cam2ip binary with a built-in webcam and a USB webcam Logitech C525 for about 20 minutes each webcam. I found that all of them crashes but with different frequencies; 1 and 2 crashed more frequently than 3 and 4. The binary number 3 is the most stable. In addition, the built-in webcam is more stable than the external USB webcam. Below are the logs of them
However, when I copied those cam2ip binaries to other Mac, none of them can run because they were compiled with dynamic shared libraries.
I tried altering the build command to make a static build but still cannot make it. Can you give me some instructions to compile the static cam2ip? Thanks!
@gen2brain commented on GitHub (Apr 30, 2021):
Try to just type
runin gdb console, then after it crashesbt. Anyway, seems strange there are so many crashes, people run this for months without any issues, e.g. on RPi. The only difference is that one can use the native build on Linux, while on macOS it must be cgo build.