Bug 497979 - Spectactle screen recording stops after scaling issue
Summary: Spectactle screen recording stops after scaling issue
Status: RESOLVED NOT A BUG
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: 24.12.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-28 11:35 UTC by chwshka
Modified: 2025-02-04 19:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
journal logs (18.56 KB, text/plain)
2025-01-17 10:25 UTC, chwshka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chwshka 2024-12-28 11:35:34 UTC
SUMMARY
Spectactle screen recording stops after scaling issue

STEPS TO REPRODUCE
1. Start screen recording
2. Reproduce this bug in plasma shell https://bugs.kde.org/show_bug.cgi?id=497978
3. Stop screen recording by clicking on red icon in system tray

OBSERVED RESULT
The produced webm file is cut short. It stops recording once the bug is reproduced. The recording does not run until the user stops the recording by clicking on the red icon in the system tray

EXPECTED RESULT
The recording should continue until the user stops it rather than stopping at the bug.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.6-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Comment 1 John Kizer 2025-01-08 07:34:16 UTC
Hi - I can reproduce the plasmashell bug that is linked to there, but I can't reproduce what's being reported here, interestingly - tried on a KDE Neon VM and on my regular Fedora KDE 41 device.

Weird question, but how much RAM do you have, and what graphics card/drivers do you have? I'm asking because when I tried to reproduce on the VM - with no graphics acceleration, since I haven't figured out how to get that to work with my Nvidia hardware - nothing unusual happened, Spectacle instantly responded to clicking the red tray icon, and everything acted normal.

However, on my actual "bare metal" device, Spectacle did take about 30-45 seconds to stop, output the message below to the journal, and used about 25% of total CPU capacity and 13GB of RAM before completing the file save. Total wild guess, but I'm wondering if Spectacle is getting killed by an out-of-memory situation on your device? (I'm fortunate enough to have 32GB of RAM, so it might have been able to survive on my end?)

Journal message: qt.multimedia.ffmpeg.mediadataholder: AVStream duration -9223372036854775808 is invalid. Taking it from the metadata
Comment 2 chwshka 2025-01-08 08:43:28 UTC
(In reply to John Kizer from comment #1)
> Hi - I can reproduce the plasmashell bug that is linked to there, but I
> can't reproduce what's being reported here, interestingly - tried on a KDE
> Neon VM and on my regular Fedora KDE 41 device.
> 
> Weird question, but how much RAM do you have, and what graphics card/drivers
> do you have? I'm asking because when I tried to reproduce on the VM - with
> no graphics acceleration, since I haven't figured out how to get that to
> work with my Nvidia hardware - nothing unusual happened, Spectacle instantly
> responded to clicking the red tray icon, and everything acted normal.
> 
> However, on my actual "bare metal" device, Spectacle did take about 30-45
> seconds to stop, output the message below to the journal, and used about 25%
> of total CPU capacity and 13GB of RAM before completing the file save. Total
> wild guess, but I'm wondering if Spectacle is getting killed by an
> out-of-memory situation on your device? (I'm fortunate enough to have 32GB
> of RAM, so it might have been able to survive on my end?)
> 
> Journal message: qt.multimedia.ffmpeg.mediadataholder: AVStream duration
> -9223372036854775808 is invalid. Taking it from the metadata

I have a dell XPS 9510 with 32gb of RAM and an nvidia gpu. I have the nvidia gpu setup within fedora however it only kicks in for certain tasks. If someone could point me in the right direction, I'm happy to experiment and provide logs if it helps.
Comment 3 John Kizer 2025-01-08 21:55:16 UTC
Got it - we have very similar setups (same RAM amount, Nvidia cards)! If you would be able to provide the system journal logs from when this occurs on your device, that would likely be a good next step. Thanks!
Comment 4 Noah Davis 2025-01-13 15:34:09 UTC
When you say it gets cut short, do you get an error message or does it simply produce a video that ends early?

I am unable to reproduce the plasmashell bug, so I'm unable to follow the provided instructions.
Comment 5 chwshka 2025-01-17 10:25:11 UTC
Created attachment 177454 [details]
journal logs

Sorry for the delay. I've just tried reproducing the issue a few times. I can still replicate the plasma shell bug, however the spectacle recording no longer gets cut short. However after clicking the red icon tray icon to stop the spectacle screen recording, it still takes minutes for the red icon to disappear and for the screen recording to show up in the screencasts directory.

I see the same behaviour even if I don't replicate the plasma shell bug. Simply stopping any screen recording session takes a long time.

I've captured journal logs after recording for 12 seconds. I didn't recreate the plasmshell bug. I simply started recording, moved a window and the cursor around and then stopped the recording by clicking on the red circle in the icon tray. The red circle stayed there for around 1 minute before the recording showed up in the screencast folder.

If I try to interact with the spectacle window during this time it becomes unresponsive. Spectacle during this time is consuming 7GB+ of RAM.

Attached are my journal logs covering the entire recording session. The produced webm file shows a created timestamp of "Friday 17 January 2025 12:01:10 Eastern European Standard Time" and is named "Screencast_20250117_115930.webm".

I'm happy to perform any specific testing that you'd like. I guess that this bug could also be closed and I can reopen as a new one since the plasmashell bug doesn't need to be replicated for this issue to appear.
Comment 6 chwshka 2025-01-17 10:27:12 UTC
(In reply to Noah Davis from comment #4)
> When you say it gets cut short, do you get an error message or does it
> simply produce a video that ends early?
> 
> I am unable to reproduce the plasmashell bug, so I'm unable to follow the
> provided instructions.

It was producing a video that ended early with no error message. However I can't seem to replicate this anymore. However the hanging on screen recording being finished is happening with or without the plasma shell bug being replicated.

This might have evolved enough for me to start a new bug report, I'm happy to do whatever you all prefer.
Comment 7 Bug Janitor Service 2025-02-01 03:47:22 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Noah Davis 2025-02-04 19:50:22 UTC
> Simply stopping any screen recording session takes a long time.

While minutes would seem unusual for me who has a strong CPU and an SSD, it is expected that ending the recording is not quick. There just isn't functionality in KPipeWire at the moment to alert the user that the video is being processed. The processing that occurs after the recording ends is actually necessary to keep the video from being cut short.

> This might have evolved enough for me to start a new bug report, I'm happy to do whatever you all prefer.

I would say that the slow speed or lack of feedback to the user about what is happening is a different issue.
Comment 9 chwshka 2025-02-04 19:54:08 UTC
(In reply to Noah Davis from comment #8)
> > Simply stopping any screen recording session takes a long time.
> 
> While minutes would seem unusual for me who has a strong CPU and an SSD, it
> is expected that ending the recording is not quick. There just isn't
> functionality in KPipeWire at the moment to alert the user that the video is
> being processed. The processing that occurs after the recording ends is
> actually necessary to keep the video from being cut short.
> 
> > This might have evolved enough for me to start a new bug report, I'm happy to do whatever you all prefer.
> 
> I would say that the slow speed or lack of feedback to the user about what
> is happening is a different issue.

Ok I'll do more testing and open a relevant bug report. This one can be closed