Closed louis030195 closed 2 days ago
memory is very poorly managed atm, tons of optims there anyway
likely memory leak (only happen after running screenpipe for 20h)
i solved the problem, not pushing until i tested a bit for longer times, lmk if anyone wanna try too
suspecting it's not even a memory issue, just apple deciding to kill the process because it's not signed and run for a while :)
https://stackoverflow.com/questions/51833310/what-is-killed9-and-how-to-fix-in-macos-terminal
maybe related
somehow the vision logic seems to stop running after long running overnight with sleep etc
simple workaround now is to have program reboot itself after a while
suspecting it's not even a memory issue, just apple deciding to kill the process because it's not signed and run for a while :)
https://stackoverflow.com/questions/51833310/what-is-killed9-and-how-to-fix-in-macos-terminal
this was the issue
signing the executable solved problem
:)
A "Killed: 9" error typically indicates that your program was forcibly terminated by the operating system, often due to excessive memory usage or other resource constraints. This is also known as the "SIGKILL" signal.
Based on the log messages and the error, here are a few potential reasons for this issue:
FFmpeg not found: The warning message suggests that FFmpeg wasn't found in the expected resources directory. This could lead to unexpected behavior if the program relies on a specific FFmpeg version.
Memory usage: The save_frames_as_video function (lines 14-128 in the first code block) seems to be handling video encoding. If this process is consuming too much memory, it might trigger the OS to kill the program.
Resource exhaustion: The program is using thread pools and multiple threads for video capture and encoding. If too many resources are being used simultaneously, it could lead to the program being terminated.
To address this issue:
For more detailed debugging:
top
orhtop
to monitor resource usage while the program is running.If you need more specific advice, please provide more details about the exact circumstances when this error occurs.