https://bugs.kde.org/show_bug.cgi?id=522874

            Bug ID: 522874
           Summary: Screen recording hangs forever on "Finishing the
                    Recording" when no encoder can be created
    Classification: Applications
           Product: Spectacle
      Version First 6.7.2
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

SUMMARY
When kpipewire fails to create a video encoder, Spectacle's recording never
finishes: the "Spectacle is Finishing the Recording — Please wait" notification
spins forever, no file is written, and no error is ever shown to the user.

STEPS TO REPRODUCE
1. Put kpipewire in a state where encoder creation fails. Easy repro: set
   KPIPEWIRE_FORCE_ENCODER to an encoder that cannot encode the recording's
   format (e.g. KPIPEWIRE_FORCE_ENCODER=libx264 while Spectacle records
webm/VP9).
   Any encoder-creation failure triggers it.
2. Start a screen recording in Spectacle.
3. Stop the recording.

OBSERVED RESULT
The finish dialog hangs indefinitely. journalctl --user -u
app-org.kde.spectacle.service shows:
  Forcing encoder to "libx264"
  No encoder could be created
  ... then every buffer: "skipping empty buffer 8294400 1"
setupStream() returns early because m_encoder is null, so the pipeline stays
connected but no frame is ever encoded and the finish step waits forever. The
output is a 48-byte mp4 (moov atom not found) or is never written.

EXPECTED RESULT
Fail fast with a visible error (e.g. "Could not create a video encoder") when
encoder creation fails, instead of hanging on "Finishing the Recording" with no
feedback. A timeout on the finish step would also prevent the permanent hang.

SOFTWARE/OS VERSIONS
Spectacle 6.7.2, kpipewire 6.7.2, Plasma 6.7.2 (Wayland), Nobara/Fedora 44,
hybrid AMD iGPU + NVIDIA dGPU.

ADDITIONAL INFORMATION
On my machine the trigger was a stray KPIPEWIRE_FORCE_ENCODER=libx264 left in
~/.config/plasma-workspace/env by an old KRDP setup. Removing it fixed
recording.
But the silent, unrecoverable hang whenever encoder creation fails is the
actual
bug, independent of why it fails.

Public writeup with full diagnosis and fix:
https://gist.github.com/Kizuno18/7e29dd0b33a8e49b266f3e51eb26a210

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to