Bug 478045

Summary: Spectacle fails recording and hangs - AVFormatContext Unable to choose an output format
Product: [Applications] Spectacle Reporter: Schlaefer <openmail+kde>
Component: GeneralAssignee: Noah Davis <noahadvs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: dashonwwIII, kde, semlraug
Priority: NOR Keywords: qt6
Version First Reported In: 24.01.80   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Spectacle hanging at fullscreen recording
backtrace with debug symbols

Description Schlaefer 2023-12-04 12:38:17 UTC
Created attachment 163849 [details]
Spectacle hanging at fullscreen recording

SUMMARY

Recording with Spectacle fails with 

[AVFormatContext @ 0x7f1560956800] Unable to choose an output format for ''; use a standard extension for the filename or specify the format manually.
kpipewire_record_logging: Could not deduce output format from file: using WebM. ""
kpipewire_record_logging: Could not open "" No such file or directory


STEPS TO REPRODUCE

See attached video:

1. Start recording VP9 in fullscreen
2. Recording fails and application hangs

3. Restart application
4. Recording rectangular area first: recording works 
5. Recording fullscreen after rectangular: fullscreen works too now

5. Changing recording format to h.264
6. Restart application and try to record fullscreen. Fails as with VP9, but interestingly output still mentions WebM

In conclusion:

- Starting with a fullscreen recording fails with aforementioned error message and spectacle hanging.
- Recording a rectangle area first and fullscreen afterwards works with VP9 and h.264

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel Version: 6.6.3-1-cachyos-eevdf-lto (64-bit)
Graphics Platform: Wayland
Processors: 12 × 11th Gen Intel® Core™ i5-11400 @ 2.60GHz
Memory: 31,2 GiB of RAM
Graphics Processor: Mesa Intel® Arc
Comment 1 Schlaefer 2023-12-04 13:07:47 UTC
Forgot. On the hanging Spectacle:

#0  0x00007fe425899166 in  () at /usr/lib/libc.so.6
#1  0x00007fe42589bb5e in pthread_cond_wait () at /usr/lib/libc.so.6
#2  0x00007fe4262dd4a8 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/libQt6Core.so.6
#3  0x00007fe4262dda41 in QThread::wait(QDeadlineTimer) () at /usr/lib/libQt6Core.so.6
#4  0x00007fe428fde87b in PipeWireBaseEncodedStream::refresh() () at /usr/lib/libKPipeWireRecord.so.6
#5  0x00007fe428fe06c0 in PipeWireRecord::setOutput(QString const&) () at /usr/lib/libKPipeWireRecord.so.6
#6  0x000056211de2810b in  ()
#7  0x000056211de2995c in  ()
#8  0x00007fe4261ae6bb in  () at /usr/lib/libQt6Core.so.6
#9  0x00007fe427efade0 in  () at /usr/lib/libQt6DBus.so.6
#10 0x00007fe42619906b in QObject::event(QEvent*) () at /usr/lib/libQt6Core.so.6
#11 0x00007fe4280f45ab in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt6Widgets.so.6
#12 0x00007fe426147c58 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt6Core.so.6
#13 0x00007fe426148001 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt6Core.so.6
#14 0x00007fe4263cb624 in  () at /usr/lib/libQt6Core.so.6
#15 0x00007fe42250df69 in  () at /usr/lib/libglib-2.0.so.0
#16 0x00007fe42256c327 in  () at /usr/lib/libglib-2.0.so.0
#17 0x00007fe42250c162 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#18 0x00007fe4263c8f49 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
#19 0x00007fe42615209c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
#20 0x00007fe42614b548 in QCoreApplication::exec() () at /usr/lib/libQt6Core.so.6
#21 0x000056211ddcc779 in  ()
#22 0x00007fe425827f50 in  () at /usr/lib/libc.so.6
#23 0x00007fe42582800a in __libc_start_main () at /usr/lib/libc.so.6
#24 0x000056211ddce3d5 in  ()
Comment 2 semlraug 2023-12-04 13:26:10 UTC
Can confirm on:

System:
 Kernel: 6.6.4-arch1-1 arch: x86_64 bits: 64
    compiler: gcc v: 13.2.1 clocksource: tsc available: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-linux
    root=UUID=b0e51111-077d-47ef-8ca8-f11c9a9937ad rw nowatchdog
    nvme_load=YES loglevel=3
  Desktop: KDE Plasma v: 5.90.0 tk: Qt v: 5.15.11 wm: kwin_wayland dm: SDDM
    Distro: EndeavourOS base: Arch Linux
Memory:
  System RAM: total: 4 GiB available: 3.71 GiB used: 2.11 GiB (57.0%)
    igpu: 64 MiB
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Acer Incorporated ALI driver: i915
    v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports:
    active: eDP-1 empty: HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:5917
    class-ID: 0300
  Display: server: X.Org v: 23.2.2 with: Xwayland v: 23.2.2
    compositor: kwin_wayland driver: X: loaded: modesetting
    alternate: fbdev,intel,vesa dri: iris gpu: i915 display-ID: :1 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.00x11.26")
    s-diag: 583mm (22.95")
  Monitor-1: eDP-1 model: BOE Display 0x06ba built: 2016 res: 1920x1080
    hz: 60 dpi: 143 gamma: 1.2 size: 340x190mm (13.39x7.48") diag: 394mm (15.5")
    ratio: 16:9 modes: 1920x1080
  API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
    device: 1 drv: swrast surfaceless: drv: iris x11: drv: iris
    inactive: gbm,wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 23.2.1-arch1.2
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel UHD Graphics 620 (KBL
    GT2) device-ID: 8086:5917 memory: 3.62 GiB unified: yes
  API: Vulkan Message: No Vulkan data available.

Operating System: EndeavourOS 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel Version: 6.6.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 3.7 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: Acer
Product Name: Aspire A315-53
System Version: V2.02
Comment 3 Noah Davis 2023-12-13 19:25:06 UTC
This looks like it could be a duplicate of bug 477896, but your backtrace looks different from my backtrace from that bug report. Your backtrace also seems to be incomplete. Could you try posting another backtrace after reading this guide? https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
Comment 4 Schlaefer 2023-12-13 20:20:14 UTC
Created attachment 164148 [details]
backtrace with debug symbols

(In reply to Noah Davis from comment #3)
>  Could you try posting another backtrace 

Sorry, I was on a frankensystem without debug symbols. Attached backlog from Beta 1 release official Arch. 

Operating System: EndeavourOS 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel Version: 6.6.6-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × 11th Gen Intel® Core™ i5-11400 @ 2.60GHz
Memory: 31,2 GiB of RAM
Graphics Processor: Mesa Intel® Arc
Comment 5 Schlaefer 2024-09-16 14:15:49 UTC
This works for me now. Quick talk with semlraug and they confirmed. - Closing