SeaDve / Kooha

Elegantly record your screen
GNU General Public License v3.0
2.63k stars 70 forks source link

The program freezes just after the recording starts #135

Closed 7system7 closed 2 years ago

7system7 commented 3 years ago

System Info

            .-/+oossssoo+/-.               system7@AMBER 
        `:+ssssssssssssssssss+:`           ------------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 21.10 x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: 20QV00CEGE ThinkPad X1 Extreme 2nd 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 5.13.0-20-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 20 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2609 (dpkg), 78 (flatpak), 15 (snap) 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.1.8 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 2560x1080 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 40.5 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: WhiteSur-dark-solid [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Papirus [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: guake 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i9-9880H (16) @ 4.800GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA GeForce GTX 1650 Mobile / Max-Q 
      -+sssssssssssssssssyyyssss+-         GPU: Intel CoffeeLake-H GT2 [UHD Graphics 630] 
        `:+ssssssssssssssssss+:`           Memory: 6361MiB / 64047MiB 
            .-/+oossssoo+/-.

Describe the bug The program freezes just after it starts to record a video. Firstly I thought, it does not have permission to write in the Videos dir but after I granted the program the whole Home dir the problem still occurs. Btw, the program creates the files successfully w/ 0 bytes.

After 25 days I restarted my computer (it was time after all) but unfortunately it did not help.

To Reproduce Steps to reproduce the behavior:

  1. # flatpak install flathub io.github.seadve.Kooha
  2. $ flatpak run io.github.seadve.Kooha
  3. Click on Record button
  4. See error dialog

Expected behavior A working record feature. :))

Screenshots

Screenshot from 2021-10-24 22-35-11

Additional context

RUST_BACKTRACE=1 RUST_LOG=kooha=debug GST_DEBUG=3 PIPEWIRE_DEBUG=3 flatpak run io.github.seadve.Kooha

Output

 INFO  kooha::application > Kooha (io.github.seadve.Kooha)
 INFO  kooha::application > Version: 2.0.1 ()
 INFO  kooha::application > Datadir: /app/share/kooha
 DEBUG kooha::backend::recorder > is_show_pointer: true
 DEBUG kooha::backend::recorder > is_selection_mode: false
 INFO  kooha::backend::screencast_portal > ScreenCastProxy created
 DEBUG kooha::backend::screencast_portal > available_cursor_modes: BitFlags<CursorMode>(0b111, Hidden | Embedded | Metadata)
 DEBUG kooha::backend::screencast_portal > available_source_types: BitFlags<SourceType>(0b11, Monitor | Window)
 INFO  kooha::backend::screencast_portal > Session created
 INFO  kooha::backend::screencast_portal > Select sources window showed
 INFO  kooha::backend::screencast_portal > Screencast session started
 INFO  kooha::backend::screencast_portal > Ready for pipewire stream
 DEBUG kooha::backend::recorder          > pulse_server_version: pulseaudio version 15.0
 DEBUG kooha::backend::recorder          > PipelineBuilder { is_record_speaker: true, is_record_mic: true, framerate: 30, file_path: "/home/system7/Videos/Kooha-10-24-2021-22-26-53.mkv", fd: 31, streams: [Stream { pipewire_node_id: 46, position: Some((0, 0)), size: Some((2560, 1080)) }], speaker_source: Some("bluez_sink.60_AB_D2_45_25_7C.a2dp_sink.monitor"), mic_source: Some("alsa_input.usb-046d_C922_Pro_Stream_Webcam_ABDF77BF-02.analog-stereo"), coordinates: None, actual_screen: None }
 DEBUG kooha::backend::pipeline_builder  > is_use_vaapi: false
 DEBUG kooha::backend::pipeline_builder  > pipeline_string: queue name=queue0 ! videorate ! video/x-raw, framerate=30/1 ! videoconvert chroma-mode=GST_VIDEO_CHROMA_MODE_NONE dither=GST_VIDEO_DITHER_NONE matrix-mode=GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY n-threads=16 ! queue ! vp8enc max_quantizer=17 cpu-used=16 cq_level=13 deadline=1 static-threshold=100 keyframe-mode=disabled buffer-size=20000 threads=16 ! queue ! matroskamux name=mux ! filesink name=filesink location="/home/system7/Videos/Kooha-10-24-2021-22-26-53.mkv" pipewiresrc fd=31 path=46 do-timestamp=true keepalive-time=1000 resend-last=true ! video/x-raw, max-framerate=30/1 ! queue0. pulsesrc device="bluez_sink.60_AB_D2_45_25_7C.a2dp_sink.monitor" ! queue ! audiomixer name=mix ! opusenc ! queue ! mux. pulsesrc device="alsa_input.usb-046d_C922_Pro_Stream_Webcam_ABDF77BF-02.analog-stereo" ! queue ! mix.
[I][01120.248468][      pipewire.c:  571 pw_init()] version 0.3.35
[I][01125.596784][          conf.c:  326 conf_load()] config 0x55bb2c6922a0: loading config '/usr/share/pipewire/client.conf'
[I][01125.596975][       context.c:  384 pw_context_new()] context 0x55bb2c697380: parsed context.properties section
[I][01125.598444][       context.c:  478 pw_context_new()] context 0x55bb2c697380: parsed 2 context.spa-libs items
[I][01125.599347][          conf.c:  419 load_module()] config 0x55bb2c697380: loaded module libpipewire-module-protocol-native
[I][01125.600329][          conf.c:  419 load_module()] config 0x55bb2c697380: loaded module libpipewire-module-client-node
[I][01125.600856][          conf.c:  419 load_module()] config 0x55bb2c697380: loaded module libpipewire-module-client-device
[I][01125.601426][          conf.c:  419 load_module()] config 0x55bb2c697380: loaded module libpipewire-module-adapter
[I][01125.601971][          conf.c:  419 load_module()] config 0x55bb2c697380: loaded module libpipewire-module-metadata
[I][01125.602615][          conf.c:  419 load_module()] config 0x55bb2c697380: loaded module libpipewire-module-session-manager
[I][01125.602668][       context.c:  482 pw_context_new()] context 0x55bb2c697380: parsed 6 context.modules items
[I][01125.602697][       context.c:  487 pw_context_new()] context 0x55bb2c697380: parsed 0 context.objects items
[I][01125.602725][       context.c:  490 pw_context_new()] context 0x55bb2c697380: parsed 0 context.exec items
[I][01125.602839][       context.c:  244 context_set_freewheel()] context 0x55bb2c697380: exit freewheel
[I][01125.602889][       context.c:  248 context_set_freewheel()] context 0x55bb2c697380: freewheel error:Operation not supported
[I][01125.602928][ impl-metadata.c:  196 impl_set_property()] metadata 0x55bb2c76f460: add id:0 key:log.level type: value:0
[I][01125.602960][ impl-metadata.c:  196 impl_set_property()] metadata 0x55bb2c76f460: add id:0 key:clock.min-quantum type: value:32
[I][01125.602989][ impl-metadata.c:  196 impl_set_property()] metadata 0x55bb2c76f460: add id:0 key:clock.max-quantum type: value:8192
[I][01125.603015][ impl-metadata.c:  196 impl_set_property()] metadata 0x55bb2c76f460: add id:0 key:clock.force-quantum type: value:0
[I][01125.603043][ impl-metadata.c:  196 impl_set_property()] metadata 0x55bb2c76f460: add id:0 key:clock.force-rate type: value:0
0:00:10.083575019     2 0x7f4b5413b300 WARN              aggregator gstaggregator.c:2050:gst_aggregator_query_latency_unlocked:<mix> Latency query failed
0:00:10.083637930     2 0x7f4b544a3580 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<pulsesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:10.083741250     2 0x7f4b5413bb60 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<pulsesrc1:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:10.084014046     2 0x7f4b5413b300 WARN              aggregator gstaggregator.c:2050:gst_aggregator_query_latency_unlocked:<mix> Latency query failed
0:00:10.084132205     2 0x7f4b54137ea0 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<pipewiresrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
[E][01125.608629][        stream.c:  365 stream_set_state()] stream 0x55bb2c789af0: error wrong resource type/version
0:00:10.087937710     2 0x55bb2c528400 WARN             pipewiresrc gstpipewiresrc.c:529:on_state_changed:<pipewiresrc0> error: stream error: wrong resource type/version
[W][01125.609305][gstpipewirecore.:   42 on_core_error()] error id:2 seq:2 res:-71 (Protocol error): wrong resource type/version
[W][01125.609390][     impl-node.c:  388 suspend_node()] node 0x7f4b0000c1e0: error unset format input: Input/output error
[I][01125.609431][     impl-node.c:  358 node_update_state()] (kooha-0) creating -> suspended
[W][01125.609474][gstpipewirecore.:   42 on_core_error()] error id:0 seq:3 res:-2 (No such file or directory): unknown resource 2 op:2
[W][01125.609512][gstpipewirecore.:   42 on_core_error()] error id:0 seq:4 res:-2 (No such file or directory): unknown resource 2 op:3
 ERROR kooha::backend::recorder::imp     > Failed to set pipeline state to Playing: StateChangeError
0:00:40.087180040     2 0x7f4b54137ea0 WARN                 basesrc gstbasesrc.c:3127:gst_base_src_loop:<pipewiresrc0> error: Internal data stream error.
0:00:40.087243389     2 0x7f4b54137ea0 WARN                 basesrc gstbasesrc.c:3127:gst_base_src_loop:<pipewiresrc0> error: streaming stopped, reason not-negotiated (-4)
 INFO  kooha::backend::recorder          > Pipeline state set from Null -> Ready
0:00:40.092853044     2 0x55bb2b49a730 WARN               structure gststructure.c:2069:priv_gst_structure_append_to_gstring: No value transform to serialize field 'gerror' of type 'GError'
 ERROR kooha::backend::recorder          > Error from record bus: Error { domain: gst-resource-error-quark, code: 1, message: "stream error: wrong resource type/version" } (debug Error(Message { ptr: 0x7f4b00001e00, type: "error", seqnum: 125, src: Some("pipewiresrc0"), structure: Some(GstMessageError, gerror=(GError)NULL, debug=(string)"../src/gst/gstpipewiresrc.c\(529\):\ on_state_changed\ \(\):\ /GstPipeline:pipeline0/GstPipeWireSrc:pipewiresrc0";) }))
[I][01155.615165][     impl-node.c: 1736 pw_impl_node_destroy()] (kooha-0) destroy
 INFO  kooha::backend::screencast_portal > Session closed
SeaDve commented 3 years ago

I think this may be a duplicate of #120

7system7 commented 3 years ago

Yeah, the version 1.2.1 is working properly. :+1: Ty! I masked the version for a while.

SeaDve commented 2 years ago

Closing this as duplicate of https://github.com/SeaDve/Kooha/issues/129, and also see https://github.com/SeaDve/Kooha/issues/129#issuecomment-1060293459 which might be helpful.