Bug 501663 - Opening invalid files in dolphin results in infinite loop
Summary: Opening invalid files in dolphin results in infinite loop
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.12.3
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-17 21:50 UTC by usr_40476
Modified: 2025-04-07 18:01 UTC (History)
3 users (show)

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


Attachments
screenrecording of stuff not cooking (1.16 MB, video/webm)
2025-04-03 19:09 UTC, usr_40476
Details

Note You need to log in before you can comment on or make changes to this bug.
Description usr_40476 2025-03-17 21:50:21 UTC
SUMMARY
Opening invalid files in dolphin results in infinite loop

STEPS TO REPRODUCE
1. open a file dolphin does not understand
2. chaos....

OBSERVED RESULT
Dolphin repeatedly opens the current directory until closed, sometimes persists across relaunches

EXPECTED RESULT
"what to do with this file?" dialog

usr_40476@2xeon:~> kinfo                 
Operating System: openSUSE Tumbleweed 20250313
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.6-1-default (64-bit)
Graphics Platform: Wayland
Processors: 88 × Intel® Xeon® CPU E5-2699 v4 @ 2.20GHz
Memory: 62.6 GiB of RAM
Graphics Processor: AMD Radeon R9 390 Series
usr_40476@2xeon:~> 

ADDITIONAL INFORMATION
Comment 1 TraceyC 2025-03-21 19:45:59 UTC
In order to investigate this, we need to be able to reproduce the problem. 

First, can you be more specific about what you observe when Dolphin is in the infinite loop? Ideally, a screen recording would really help.

Also, can you attach a file that causes Dolphin to get in this state?
Thanks.
Comment 2 usr_40476 2025-04-03 19:09:42 UTC
Created attachment 179969 [details]
screenrecording of stuff not cooking

Sure! When i open a file that appears with "loading canceled" dolphin will repeatedly try to open it.

usr_40476@2xeon:~> dd if=/dev/urandom of=$HOME/dummyfile bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0103961 s, 101 MB/s
usr_40476@2xeon:~>
Comment 3 TraceyC 2025-04-03 20:39:09 UTC
Thanks for the reproduction steps and the screen recording. That helps.
I'm not able to reproduce this on git-master. When I try opening the dummy file in Dolphin, I get the "Choose Application" dialog asking me to choose an application to open the file with. I can cancel out of that and Dolphin continues to behave as I expect.

In Plasma 6.3.3, the system tries to open the file with the Fooyin music player for some reason, but Fooyin opens and Dolphin remains OK
(This seems to be because one of the data file associations is associated with Fooyin)

Did you choose something in the past to open this file?
You might also look through ~/.config/mimeapps.list and see if Dolphin is in there

This is definitely bad behavior, but we need to know more about why this happens on your system but not on mine.
Comment 4 usr_40476 2025-04-04 23:46:47 UTC
(In reply to TraceyC from comment #3)
> Thanks for the reproduction steps and the screen recording. That helps.
> I'm not able to reproduce this on git-master. When I try opening the dummy
> file in Dolphin, I get the "Choose Application" dialog asking me to choose
> an application to open the file with. I can cancel out of that and Dolphin
> continues to behave as I expect.
> 
> In Plasma 6.3.3, the system tries to open the file with the Fooyin music
> player for some reason, but Fooyin opens and Dolphin remains OK
> (This seems to be because one of the data file associations is associated
> with Fooyin)
> 
> Did you choose something in the past to open this file?
> You might also look through ~/.config/mimeapps.list and see if Dolphin is in
> there
> 
> This is definitely bad behavior, but we need to know more about why this
> happens on your system but not on mine.

So my hypothesis is this:

[Default Applications]
application/octet-stream=org.kde.dolphin.desktop;

dolphin is trying to open a file itself and because of that it keeps recursing until all tabs of that file are closed
Comment 5 TraceyC 2025-04-07 18:01:58 UTC
Interesting. Thanks for that detail. I'll let the Dolphin maintainers take a closer look.