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

Issue: Segmentation Fault After Building Screenpipe on Debian 12 #367

Open
justwove opened this issue Sep 27, 2024 · 2 comments
Open

Issue: Segmentation Fault After Building Screenpipe on Debian 12 #367

justwove opened this issue Sep 27, 2024 · 2 comments

Comments

@justwove
Copy link

Description

Hello, I've tried installing Screenpipe on my Linux machine. Besides the numerous errors I encountered while trying to build the app, when I finally managed to complete the build, the application crashes with a segmentation fault after running for no more than 10 seconds.

OS Info

  • Distro: Debian 12 GNOME

Steps Achieved

Here are the steps I followed to install the necessary dependencies and build the application:

sudo apt update -y && sudo apt upgrade -y 
sudo apt install gobjc++-mingw-w64 
sudo apt install --reinstall build-essential sudo apt install g++ 
sudo apt install gobjc++ gobjc 
sudo apt install libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev 
sudo apt install make cmake 
sudo apt install librust-alsa-sys-dev 
sudo apt install pkg-config sudo apt install -y libavformat-dev libavfilter-dev libavdevice-dev ffmpeg tesseract-ocr libtesseract-dev 
sudo apt update -y && sudo apt upgrade -y 
cargo build --release   # Also tried 'cargo build' for debug mode 
./target/release/screenpipe   # Also tried 'cargo run --release --bin screenpipe'

Steps to Reproduce

  1. Run cargo build to enable debug mode.
  2. Then run cargo run --bin screenpipe.

Output

The application builds successfully, but it crashes with a segmentation fault after about 10 seconds of running.

Full STDOUT with Errors and Warnings:

warning: unused import: `std::env`
 --> screenpipe-vision/build.rs:1:5
  |
1 | use std::env;
  |     ^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `std::path::PathBuf`
 --> screenpipe-vision/build.rs:2:5
  |
2 | use std::path::PathBuf;
  |     ^^^^^^^^^^^^^^^^^^

warning: `screenpipe-vision` (build script) generated 2 warnings
warning: unused variable: `name`
   --> screenpipe-audio/src/core.rs:332:37
    |
332 |     fn should_include_output_device(name: &str) -> bool {
    |                                     ^^^^ help: if this is intentional, prefix it with an underscore: `_name`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: `screenpipe-audio` (lib) generated 1 warning
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.28s
     Running `target/debug/screenpipe`
2024-09-27T08:54:56.880023Z  WARN screenpipe: screenpipe hasn't been extensively tested on this os. we'd love your feedback!    
would love your feedback on the ux, let's a 15 min call soon:
https://cal.com/louis030195/screenpipe
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:972:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:540:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
2024-09-27T08:54:57.264256Z  INFO screenpipe:   default (input)    
2024-09-27T08:54:57.264321Z  INFO screenpipe:   default (output)    
2024-09-27T08:54:57.267928Z  INFO screenpipe_server::db: Migrations executed successfully.    
2024-09-27T08:54:57.267955Z  INFO screenpipe: database initialized, will store files in /home/s.gassackys@algosecure.local/.screenpipe    



                                            _          
   __________________  ___  ____     ____  (_____  ___ 
  / ___/ ___/ ___/ _ \/ _ \/ __ \   / __ \/ / __ \/ _ \
 (__  / /__/ /  /  __/  __/ / / /  / /_/ / / /_/ /  __/
/____/\___/_/   \___/\___/_/ /_/  / .___/_/ .___/\___/ 
                                 /_/     /_/           



build ai apps that have the full context
open source | runs locally | developer friendly


┌─────────────────────┬────────────────────────────────────┐
│ setting             │ value                              │
├─────────────────────┼────────────────────────────────────┤
│ fps                 │ 1                                  │
│ audio chunk duration│ 30 seconds                         │
│ video chunk duration│ 60 seconds                         │
│ port                │ 3030                               │
│ audio disabled      │ false                              │
│ vision disabled     │ false                              │
│ save text files     │ false                              │
│ audio engine        │ WhisperDistilLargeV3               │
│ ocr engine          │ Tesseract                          │
│ vad engine          │ Silero                             │
│ vad sensitivity     │ High                               │
│ data directory      │ /home/s.gassackys@algosecure.local/.screenpipe │
│ debug mode          │ false                              │
│ use pii removal     │ false                              │
│ ignored windows     │ []                                 │
│ included windows    │ []                                 │
│ friend wearable uid │ not set                            │
├─────────────────────┼────────────────────────────────────┤
│ monitors            │                                    │
│                     │ id: 37                             │
│                     │ id: 1264                           │
│                     │ id: 1266                           │
├─────────────────────┼────────────────────────────────────┤
│ audio devices       │                                    │
2024-09-27T08:54:57.269448Z  INFO screenpipe_audio::whisper: device = Cpu    
│                     │ default (input)                    │
│                     │ default (output)                   │
├─────────────────────┼────────────────────────────────────┤
│ pipes               │                                    │
2024-09-27T08:54:57.269528Z  INFO hf_hub: Token file not found "/home/s.gassackys@algosecure.local/.cache/huggingface/token"    
│                     │ no pipes available                 │
└─────────────────────┴────────────────────────────────────┘
you are using local processing. all your data stays on your computer.

2024-09-27T08:54:57.270093Z  INFO screenpipe_server::server: Server starting on 127.0.0.1:3030    
2024-09-27T08:55:07.514025Z  INFO screenpipe_server::resource_monitor: Runtime: 10s, Total Memory: 5% (1.60 GB / 31.80 GB), Total CPU: 100%
C2024-09-27T08:55:17.581093Z  INFO screenpipe_server::resource_monitor: Runtime: 20s, Total Memory: 10% (3.17 GB / 31.80 GB), Total CPU: 101%
2024-09-27T08:55:26.519969Z  INFO screenpipe_audio::core: device: "default (output)"    
2024-09-27T08:55:26.519969Z  INFO screenpipe_server::video: Starting new video capture    
2024-09-27T08:55:26.519982Z  INFO screenpipe_server::video: Starting new video capture    
2024-09-27T08:55:26.519989Z  INFO screenpipe_server::video: Starting new video capture    
2024-09-27T08:55:26.520018Z  INFO screenpipe_audio::core: device: "default (input)"    
2024-09-27T08:55:26.520036Z  INFO screenpipe_server::video: Started capture thread    
2024-09-27T08:55:26.520042Z  INFO screenpipe_server::video: Started capture thread    
2024-09-27T08:55:26.520058Z  INFO screenpipe_server::video: Started capture thread    
2024-09-27T08:55:26.565685Z  INFO screenpipe_audio::core: Recording default (output) for 30 seconds    
2024-09-27T08:55:26.577832Z  INFO screenpipe_audio::core: Recording default (input) for 30 seconds    
2024-09-27T08:55:27.655656Z  INFO screenpipe_server::resource_monitor: Runtime: 30s, Total Memory: 10% (3.03 GB / 31.80 GB), Total CPU: 90%
2024-09-27T08:55:30.298674Z  INFO screenpipe_server::video: Starting FFmpeg process for file: /home/s.gassackys@algosecure.local/.screenpipe/data/monitor_1264_2024-09-27_08-55-30.mp4    
2024-09-27T08:55:37.721875Z  INFO screenpipe_server::resource_monitor: Runtime: 40s, Total Memory: 10% (3.11 GB / 31.80 GB), Total CPU: 105%
Segmentation Errors

Copy link

linear bot commented Sep 27, 2024

@louis030195
Copy link
Collaborator

@justwove wow thanks for sharing this setup, we're trying to document better how to run screenpipe on linux, and in general make the experience better, any such help highly appreciated 🙏

first question, do you use X or Wayland? at the moment screen capture is not supported with Wayland (should work with X), if this is the case you should be able to --disable-vision and just use audio until we support wayland

also maybe try to use a single monitor for start (see 3) (eg screenpipe --list-monitors then screenpipe --monitor-id <myid>)

also i see you're on CPU, do you have a GPU?

related issues:

#328 - make models more efficient on CPU
#63 - wayland support

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

2 participants