Bug 477684 - dolphin --daemon Crashes Peacefully After Opening First Window Through DBus
Summary: dolphin --daemon Crashes Peacefully After Opening First Window Through DBus
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 23.08.3
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-28 17:50 UTC by John Hao
Modified: 2024-01-01 16:12 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Hao 2023-11-28 17:50:13 UTC
SUMMARY
Dolphin does not spawn a window when called with DBus using FileManager1 (through Firefox or directly) without an active process, and the process crashes peacefully when interacting with it through DBus after opening its first window.

(I may not be using the right term of crash as the exit may be intentional, but the exit incorrectly interferes with using Dolphin from DBus)

I cannot upload the backtrace: I am unfamiliar with gdb and when following the guide, backtrace.txt is empty due to the crashing process crashing peacefully.

STEPS TO REPRODUCE
1. Override /usr/share/dbus-1/services/org.freedesktop.FileManager1.service in .local
~/.local/share/dbus-1/services/org.freedesktop.FileManager1.service:
```
[D-BUS Service]
Name=org.freedesktop.FileManager1
Exec=/usr/bin/dolphin --daemon
SystemdService=plasma-dolphin.service
```
2. Use Firefox's "open in folder" for Downloads

OBSERVED RESULT
Dolphin window does not appear, except for the first time after a reboot.

EXPECTED RESULT
Dolphin window appears.

SOFTWARE/OS VERSIONS
Linux: Fedora 39 Sericea, SwayWM (not KDE Plasma)
Qt Version: 5.15.11 / 6.6.0

ADDITIONAL INFORMATION
Upon spamming the open in folder button at a rapid pace, the dolphin window appears.
Firefox appears to be using DBus for "open in folder". Using d-feet, I interacted with the org.freedesktop.FileManager1, which shows it spawns a dolphin process. Using its ShowFolders interface removes the dolphin process and shows nothing.
Running dolphin --daemon in a terminal connects it to the FileManager1 DBus and allows Firefox to open a folder once, but after opening this folder, dolphin --daemon peacefully exits. The peaceful exit after opening folder also happens when using FileManager1 DBus directly through d-feet, and using org.kde.dolphin-pid through d-feet. It does not happen when running dolphin --new-window from another command line.
Comment 1 David Edmundson 2023-12-05 11:21:18 UTC
dolphin --daemon existing is somewhat expected. 
This should be fine, the point of the above file is that we're dbus activated and will get launched again.

I'm a bit confused from the message. 
If you don't launch any dolphins and run 

dbus org.freedesktop.FileManager1 /org/freedesktop/FileManager1 org.freedesktop.FileManager1.ShowFolders /home asdf

do you get a dolphin window

if you close it and run it again do you get a dolphin window.
Comment 2 John Hao 2023-12-06 10:51:27 UTC
(In reply to David Edmundson from comment #1)
> dolphin --daemon existing is somewhat expected. 
> This should be fine, the point of the above file is that we're dbus
> activated and will get launched again.
> 
> I'm a bit confused from the message. 
> If you don't launch any dolphins and run 
> 
> dbus org.freedesktop.FileManager1 /org/freedesktop/FileManager1
> org.freedesktop.FileManager1.ShowFolders /home asdf
> 
> do you get a dolphin window
> 
> if you close it and run it again do you get a dolphin window.

This is curious... the "dbus" command is not found on my system. I have instead used gdbus and the command:
gdbus call -e -d org.freedesktop.FileManager1 -o /org/freedesktop/FileManager1 -m org.freedesktop.FileManager1.ShowFolders \[\'/home\'\] "asdf"

This returns () and no window, both the first and the consequent times. (this is expected as dolphin no longer opens a window even at the first time). This does open a window if "dolphin --daemon" is ran, and peacefully exits the "dolphin --daemon" process, showing the command is working.
Comment 3 yranjeetyadav1234567890 2023-12-17 06:59:37 UTC
(In reply to John Hao from comment #0)
> SUMMARY
> Dolphin does not spawn a window when called with DBus using FileManager1
> (through Firefox or directly) without an active process, and the process
> crashes peacefully when interacting with it through DBus after opening its
> first window.
> 
> (I may not be using the right term of crash as the exit may be intentional,
> but the exit incorrectly interferes with using Dolphin from DBus)
> 
> I cannot upload the backtrace: I am unfamiliar with gdb and when following
> the guide, backtrace.txt is empty due to the crashing process crashing
> peacefully.
> 
> STEPS TO REPRODUCE
> 1. Override /usr/share/dbus-1/services/org.freedesktop.FileManager1.service
> in .local
> ~/.local/share/dbus-1/services/org.freedesktop.FileManager1.service:
> ```
> [D-BUS Service]
> Name=org.freedesktop.FileManager1
> Exec=/usr/bin/dolphin --daemon
> SystemdService=plasma-dolphin.service
> ```
> 2. Use Firefox's "open in folder" for Downloads
> 
> OBSERVED RESULT
> Dolphin window does not appear, except for the first time after a reboot.
> 
> EXPECTED RESULT
> Dolphin window appears.
> 
> SOFTWARE/OS VERSIONS
> Linux: Fedora 39 Sericea, SwayWM (not KDE Plasma)
> Qt Version: 5.15.11 / 6.6.0
> 
> ADDITIONAL INFORMATION
> Upon spamming the open in folder button at a rapid pace, the dolphin window
> appears.
> Firefox appears to be using DBus for "open in folder". Using d-feet, I
> interacted with the org.freedesktop.FileManager1, which shows it spawns a
> dolphin process. Using its ShowFolders interface removes the dolphin process
> and shows nothing.
> Running dolphin --daemon in a terminal connects it to the FileManager1 DBus
> and allows Firefox to open a folder once, but after opening this folder,
> dolphin --daemon peacefully exits. The peaceful exit after opening folder
> also happens when using FileManager1 DBus directly through d-feet, and using
> org.kde.dolphin-pid through d-feet. It does not happen when running dolphin
> --new-window from another command line.

It also happens on Hyprland/sway/gnome using any browser it can be chromiuim or firefox "show in folder" doesnt launch dolphin window and in journelctl it show starting dolphin but there is no window 

if i manually start "dolphin --daemon" it launch for one time and daemon exits with this "kf.windowsystem: Could not find any platform plugin" .

any other filemanger works .
Comment 4 Bug Janitor Service 2024-01-01 03:46:06 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!