Bug 432862 - dolphin crashes when starting when window state is being remembered and any tabs have invalid paths
Summary: dolphin crashes when starting when window state is being remembered and any t...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 20.12.0
Platform: Mageia RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL: https://bugs.mageia.org/show_bug.cgi?...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-12 16:04 UTC by Nicolas L.
Modified: 2023-12-08 09:00 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas L. 2021-02-12 16:04:34 UTC
SUMMARY
In mageia we have a live DVD, if i start dolphin it is OK but when installed it crashes.


STEPS TO REPRODUCE
1. start mageia Plasma live cd 
2. start dolphin
3. install the live cd
4. Start dolphin

OBSERVED RESULT

Reading symbols from dolphin...
Reading symbols from /usr/lib/debug/usr/bin/dolphin-20.12.0-6.mga8.x86_64.debug...
(gdb) run
Starting program: /usr/bin/dolphin 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe65fc640 (LWP 6673)]
[New Thread 0x7fffe5a37640 (LWP 6674)]
[New Thread 0x7fffdd1ff640 (LWP 6675)]
[New Thread 0x7fffdc9fe640 (LWP 6676)]
[New Thread 0x7fffd3c92640 (LWP 6677)]
[New Thread 0x7fffd3491640 (LWP 6678)]
[New Thread 0x7fffd2c90640 (LWP 6679)]

Thread 1 "dolphin" received signal SIGSEGV, Segmentation fault.
0x00007ffff7f1eb30 in DolphinViewContainer::setActive (this=0x0, active=true)
    at /usr/src/debug/dolphin-20.12.0-6.mga8.x86_64/src/dolphinviewcontainer.cpp:215
215         m_searchBox->setActive(active);


EXPECTED RESULT
Dolphin should start
Comment 1 Aurélien Oudelet (auroud85_fr) 2021-02-12 17:29:35 UTC
After many tries, we, at Mageia, conclude this is due to the Saved Session management.

In facts, the "Live" user session and datas are carried over in the newly installed system on harddrive to the first user which will have a new Unix name based on user info and will have a user ID of 1000.
As reported by our KDE maintainers at Mageia at Comment 0, launching Dolphin in Live env. is OK but not in newly installed system. It segfaults badly.

But, trying to know why, I created a totally new user "test" with totally empty /home/test directory. And noow, Dolphin DOES NOT segfault. I conclued that: there are strange bits of datas written somewhere in Live environment that are carried over the newly system and present in the first user home directory.

Investigating:
The culprit is session management added to Dolphin in Dolphin 20.08 I think.
This is the option in Dolphin's preferences:
Startup => Show on startup "Folders, tabs, and window state from last time".

This wants to open /home/live/ with several name "live" somewhere... and it crashed because it no longer exists although there is a symlink "Live" that points to /home/aurelien (where "aurelien" is the name of the first user created after installation on my test system).

But, the GUI option is not user accessible as Dolphin crashes as soon as it launches.

After many tries, there are several files to delete to workaround this on already installed systems:
First:
~/.config/session/dolphin_dolphin_dolphin
~/.config/dolphinrc

Remove everything in them. => No segfault after.

My request also is to know which CLI command can we type to deactivate the option to restore the previous Dolphin's state.
Comment 2 Nate Graham 2021-02-12 17:35:08 UTC
It's an option in Dolphin settings Window > Startup; you can disable it and see what text is added to ~/.config/dolphinrc, and then ship a dolphinrc file that includes that by default.

However we should really just fix the bug. I think there's a chance it's already fixed in the upcoming 21.04 release because I added some logic to handle invalid paths on launch. Could you check?
Comment 3 Aurélien Oudelet (auroud85_fr) 2021-02-12 17:41:28 UTC
(In reply to Nate Graham from comment #2)
> It's an option in Dolphin settings Window > Startup; you can disable it and
> see what text is added to ~/.config/dolphinrc, and then ship a dolphinrc
> file that includes that by default.

For this, better is to trigger a file remove upon quit our installer. So, basically, users will have the functionality and no segfault.
The option in the above file is:

[General]
RememberOpenedTabs=false

But, on my file, there are other settings I don't know well the meaning. ;)

> However we should really just fix the bug. I think there's a chance it's
> already fixed in the upcoming 21.04 release because I added some logic to
> handle invalid paths on launch. Could you check?

Yeah, this should be done ASAP, but, for now we are in release and version freeze for Mageia 8. ASAP Cauldron reopen, I do think our maintainers will see this.
Comment 4 Nate Graham 2021-02-12 17:47:08 UTC
(In reply to Aurélien Oudelet (auroud85_fr) from comment #3)
> [General]
> RememberOpenedTabs=false
Yep, that's it.
Comment 5 Nate Graham 2021-02-12 17:51:13 UTC
And hmm, the invalid paths on launch issue was supposed to be fixed in Bug 427619. I guess more is needed.
Comment 6 Akseli Lahtinen 2023-12-08 09:00:57 UTC
Can't reproduce, likely fixed in later version of Dolphin. If the problem reappears, please install debug symbols to Dolphin, KIO and KIO-Extras and send a backtrace if it still crashes. Thank you!