Bug 462046

Summary: `Segmentation fault` when launching `dolphin --split` with more than two arguments
Product: [Applications] dolphin Reporter: Emily Grace Seville <EmilySeville7cfg>
Component: split viewAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dolphin-bugs-null, hkcodes, nicolas.fella
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: kcrash file of the error

Description Emily Grace Seville 2022-11-20 02:39:53 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. $ dolphin --split ~/Documents/mine/ ~/Downloads/ ~/Documents/work/
2. get: Segmentation fault (core dumped)

OBSERVED RESULT
Segmentation fault (core dumped)

EXPECTED RESULT
Three panels to be opened with corresponding folders OR two panels opened and the third folder in a new window.

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

ADDITIONAL INFORMATION
Comment 1 Harry K 2023-04-27 12:38:35 UTC
Created attachment 158483 [details]
kcrash file of the error

This kcrash error is from Dolphin 23.03.00
Comment 2 Harry K 2023-04-27 12:41:02 UTC
Forgot to add, the error happens intermittently. I've reproduced it in both Dolphin versions 23.03.00 and  23.07.70 (latest build). Haven't figured out how to reproduce every time. When dolphin works, it works by creating a split of the two folders and opening a separate tab for the third.
Comment 3 Méven 2025-08-26 11:49:02 UTC
Git commit 60cc39930f1b0a78280712c8fe1447e919f018f8 by Méven Car, on behalf of Gleb Kasachou.
Committed on 26/08/2025 at 09:31.
Pushed by felixernst into branch 'master'.

DolphinTabWidget: Fix segfault when restoring session

When a session is being restored, DolphinTabPage::setSplitViewEnabled()
is called for each tab. That function assumes the tab page's
m_navigatorsWidget is a valid pointer, which is true only for an active
tab. That causes a segmentation fault when Dolphin is launched from the
command line with more than two URLs and the --split flag.

This commit fixes this bug by connecting the
DolphinNavigatorsWidgetAction to each tab page before calling
restoreState() in DolphinTabWidget::readProperties().

M  +8    -1    src/dolphintabwidget.cpp

https://invent.kde.org/system/dolphin/-/commit/60cc39930f1b0a78280712c8fe1447e919f018f8