Bug 471489 - Unable to move gif files to trash
Summary: Unable to move gif files to trash
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-Trash (other bugs)
Version First Reported In: 8.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-27 04:22 UTC by thelittlestone
Modified: 2023-06-27 06:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 8.1.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thelittlestone 2023-06-27 04:22:33 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1.  Choose one gif file and open it in Preview mode(window)
2.  Press Delete key then confirm moving files to trash
3.  If the file is still playing, the file will can't be moved to trash
4. But if the playing is complete, this gif file will be deleted successfully

I think the preview system is still occupying the file even when moving the file.  I did not test other file formats, but this problem may be widespread in dynamic image formats.


OBSERVED RESULT
Program warns failed to move file to trash 

EXPECTED RESULT
Move the file to trash successfully even the file preview is still playing.

SOFTWARE/OS VERSIONS
Windows: 10 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 caulier.gilles 2023-06-27 05:26:33 UTC
Which digiKam version did you use ?

When you talk about trash, it's about the internal digiKam trash or the Windows bin recycler ?
Comment 2 thelittlestone 2023-06-27 05:32:12 UTC
(In reply to caulier.gilles from comment #1)
> Which digiKam version did you use ?
> 
> When you talk about trash, it's about the internal digiKam trash or the
> Windows bin recycler ?

1. Both 7.10.0 & 8.0.0 have this problem
2. Internal difiKam trash
Comment 3 caulier.gilles 2023-06-27 05:36:44 UTC
Did you open the gif file in another application (as VLC for ex) to display contents ? If yes, the file must be locked by windows.
Comment 4 thelittlestone 2023-06-27 05:52:05 UTC
(In reply to caulier.gilles from comment #3)
> Did you open the gif file in another application (as VLC for ex) to display
> contents ? If yes, the file must be locked by windows.

I'm sure that no another application occupied the file. I guess digiKam's own preview function occupied the file.
Comment 5 Maik Qualmann 2023-06-27 06:28:54 UTC
Git commit 7109bf8c3871e1a70a57bd1dee82a8211826c836 by Maik Qualmann.
Committed on 27/06/2023 at 06:28.
Pushed by mqualmann into branch 'master'.

stop and close media player item before deleting
FIXED-IN: 8.1.0

M  +2    -1    NEWS
M  +12   -0    core/app/views/stack/itemiconview_items.cpp

https://invent.kde.org/graphics/digikam/-/commit/7109bf8c3871e1a70a57bd1dee82a8211826c836
Comment 6 Maik Qualmann 2023-06-27 06:37:32 UTC
Git commit 2423e7d8f105c6746fcbe4edeccf7f99cf47cfd0 by Maik Qualmann.
Committed on 27/06/2023 at 06:36.
Pushed by mqualmann into branch 'master'.

stop and close media player item when permanently deleting

M  +12   -0    core/app/views/stack/itemiconview_items.cpp

https://invent.kde.org/graphics/digikam/-/commit/2423e7d8f105c6746fcbe4edeccf7f99cf47cfd0