Bug 439007 - Dolphin crashes when open fully qualified file path from external program (Strawberry)
Summary: Dolphin crashes when open fully qualified file path from external program (St...
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 20.12.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-21 19:48 UTC by Bogdan
Modified: 2021-12-14 02:09 UTC (History)
4 users (show)

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


Attachments
log open file from cli (2.28 KB, text/x-log)
2021-12-14 01:53 UTC, Bogdan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bogdan 2021-06-21 19:48:43 UTC
SUMMARY
Dolphin has incorrect behaviour when external program call Dolphin to open fully qualified file path (not a directory path).


STEPS TO REPRODUCE (from Strawberry):
1. Open Strawberry (https://www.strawberrymusicplayer.org/);
2. Select any audio file in playlist;
3. Select "Open file in File Manager" from right-click menu of audio file.
4. Dolphin crashed and "Dolphin crashed" message shown in system tray.

STEPS TO REPRODUCE (from CLI):
1. Run command "dolphin ~/Music/test.mp3" ;
2. "Dolphin crashed" message shown in system tray;
3. Dolphin started and open clean tab with name "test.mp3/";
4. System media player (VLC) play ~/Music/test.mp3 file (may be media player called from dolphin by xdg-open system).

OBSERVED RESULT
Dolphin opens clean tab with name "test.mp3/".

EXPECTED RESULT
Dolphin must:
1) opens tab with name of directory name, where "test.mp3" file placed;
2) show content of directory, where "test.mp3" file placed;
3) select "test.mp3" file in directory listing.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo 2.7
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Nemo 4.8.4-r1 correctly opens fully qualified file paths.
Comment 1 Bogdan 2021-06-22 03:03:27 UTC
To reproduce error, Dolphin must be configured as default File Explorer program.
Comment 2 Méven Car 2021-06-22 08:49:59 UTC
First issue, is a Strawberry bug: it seems it send files urls to file managers that are essentially folder viewers. There is a dbus call to highlight a file in folder in filemanagers, that strawberry is not using.

I tested with Version 20.12.3 dolphin ~/Downloads/my-document.pdf

The real bug, is that dolphin is misbehaving when calling it with a file url, crashing (not reproduced for me with a pdf file) or opening bogus tabs treating files as a folder url (~/Downloads/my-document.pdf/ in my case).

Something that happened for the pdf was the pdf viewer was launched.
Comment 3 Bogdan 2021-06-22 20:40:44 UTC
I think, that Dolphin has 2 bugs:
1) low support of files path in URI form;
2) don't checks existing of received file/folder path, before opening directory listing.

Nemo correctly opens file path, sended from Strawberry.
If Strawberry use the same algoritm with Dolphin and Nemo, then Nemo check existing of file path and, if received path is file - opens folder and select file inside it. And thats all - expected behavior even without dbus supporting.
Comment 4 Andreas Sturmlechner 2021-09-23 08:36:54 UTC
Could you test with 21.08.1?
Comment 5 Bogdan 2021-12-14 01:50:48 UTC
Dolphin 21.08.3
Dolphin correctly opens file from Strawberry.
Comment 6 Bogdan 2021-12-14 01:51:24 UTC
Steps:
1) Create new playlist in Strawberry.
2) Close all Dolphin windows.
3) Close all Strawberry windows.
4) Start command in terminal:
    dolphin "/home/miki/UserDirs/Music/Goran Vejvoda - Beautiful Dayus.mp3" 2>&1 | tee > /tmp/dolphin.log
5) Dolphin opens window with path:
    [/home/miki/UserDirs/Music/Goran Vejvoda - Beautiful Dayus.mp3/]
6) Dolphin starts Strawberry (whic configured as default program for *.mp3 files);
7) Strawberry has 2 identical items in playlist.
8) Strawberry must start play opened file, but it did not play.

Dolphin log attached below.
Comment 7 Bogdan 2021-12-14 01:53:14 UTC
Created attachment 144529 [details]
log open file from cli
Comment 8 Bogdan 2021-12-14 02:09:41 UTC
Problem is that Dolphin opens file as directory.
Directory path in path widget is [/home/miki/UserDirs/Music/Goran Vejvoda - Beautiful Dayus.mp3/].
But this path does not exists really.

Expected Results:
- Dolphin must open the file catalog where the file is stored, and then set the cursor to the specified file in the file list.
- If Dolphin has received a list of many files, then it must choose all these files in the file list widget.
- If files from the list received are stored in different directories, then Dolphin must open new tab for each of touched directories and select all the received files in those directories.