Bug 469656 - Dolphin cannot remember previously opened tabs
Summary: Dolphin cannot remember previously opened tabs
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 23.04.1
Platform: Arch Linux Linux
: VHI normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 469641 469680 469735 469747 469840 469859 469871 469928 469994 470072 470158 470210 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-05-12 08:45 UTC by Sigmund
Modified: 2023-05-28 09:35 UTC (History)
36 users (show)

See Also:
Latest Commit:
Version Fixed In: 23.04.2


Attachments
Problem investigation result sample (4.10 KB, text/x-c++src)
2023-05-16 09:44 UTC, Eduardo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sigmund 2023-05-12 08:45:50 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
***
After I closed the dolphin and reopened it, it entered HOME.

STEPS TO REPRODUCE
1.  Open dolphin and open multiple folders in tabs.
2.  Close dolphin and reopen it, it cannot remember previously opened tabs and open HOME.

EXPECTED RESULT
It can remember previously opened tabs.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  KDE Plasma 5.27.5
(available in About System)
KDE Plasma Version:  5.27.5
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION
Comment 1 machaquiro 2023-05-12 11:30:39 UTC
I can confirm this happening on Manjaro Unstable repos too, don't know if it's ignoring the setting to remember because gdb says nothing even with auto-downloading debuginfo.
Comment 2 Ilab Sentuser 2023-05-12 15:56:42 UTC
I can confirm this too, however in my case it does save and remember the tabs IF I use the shortcut (Meta+E) it only exhibits this behavior if it is opened from the launcher.
Comment 3 Patrick Silva 2023-05-12 23:44:46 UTC
*** Bug 469680 has been marked as a duplicate of this bug. ***
Comment 4 scatherinch 2023-05-13 01:27:58 UTC
It's also happening on vanilla Arch. I'm not using any desktop environment, everything I have is custom and built using only a window manager. 

Tabs aren't remembered and file manager always reverts to the home directory.

So, something must have broken in dolphin's last update, probably?
Comment 5 Christian Hartmann 2023-05-13 11:03:32 UTC
same here. kde neon. dolphin does not remind any last time opened directories, nor opened tabs (not even the count of such). all windows restored on login do only display $HOME.  fun part:  found session files from 2017 in .config/session. deleted these ;)
Comment 6 Patrick Silva 2023-05-13 12:15:11 UTC
*** Bug 469641 has been marked as a duplicate of this bug. ***
Comment 7 locutusofborg 2023-05-13 20:25:30 UTC
(In reply to Patrick Silva from comment #3)
> *** Bug 469680 has been marked as a duplicate of this bug. ***

I can confirm that using Meta + E does not keep the tabs during reboot.
Comment 8 Vernoxvernax 2023-05-14 02:35:21 UTC
*** This bug has been confirmed by popular vote. ***
Comment 9 machaquiro 2023-05-14 06:55:44 UTC
I did try Plasma Wayland session on my laptop and dolphin remembers tabs, but it fails with Plasma X11 session.
Btw, the session file that stores places is fine, it seems it's not parsed when using X11.
Comment 10 John Veness 2023-05-14 11:42:08 UTC
*** Bug 469735 has been marked as a duplicate of this bug. ***
Comment 11 Jesus 2023-05-14 19:28:53 UTC
The same on Arch Linux and kDE Plasma 5.27.5
Comment 12 Felix Ernst 2023-05-14 21:14:32 UTC
Reverting https://invent.kde.org/system/dolphin/-/commit/d19800c69198b904ae47cb1e53dfe28f74618eb2 fixes this. (This will of course re-introduce the bug which that commit fixed.)

Whatever we do, if we do it before 5th June the fix will be in 23.04.2. (https://community.kde.org/Schedules/KDE_Gear_23.04_Schedule)
Comment 13 Antonio Rojas 2023-05-14 21:39:48 UTC
*** Bug 469747 has been marked as a duplicate of this bug. ***
Comment 14 Antonio Rojas 2023-05-16 09:09:15 UTC
*** Bug 469840 has been marked as a duplicate of this bug. ***
Comment 15 Eduardo 2023-05-16 09:44:48 UTC
Created attachment 158994 [details]
Problem investigation result sample
Comment 16 Eduardo 2023-05-16 09:45:21 UTC
Background
-----------
I heavily rely on activity functionality to restore whole session and have all tabs in places where it was before logout (I have too many of them to handle manually), so I went investigating this issue as my time permitted.
As a result I compiled my own version where part of this patch is reverted and it's working.

Investigation results (may be useful to ones who will try to solve the issue)
-----------
if I comment out almost all of the new solution in "Dolphin::dolphinGuiInstances" and put back the old solution in global.cpp, BUT still have "#if HAVE_KACTIVITIES" which relates to QEventLoop (the "first if"), the result was the same - it does not work for me.
If I comment out "first if", leaving just the old solution, the issue is solved.
So this leads to event loop issue which was there for "ensures the consumer is ready for query".
Hope this helps, I'll attach a file with actual sample.
Comment 17 Antonio Rojas 2023-05-16 18:20:17 UTC
*** Bug 469859 has been marked as a duplicate of this bug. ***
Comment 18 Carl Draper 2023-05-16 18:26:53 UTC
(In reply to Christian Hartmann from comment #5)
> same here. kde neon. dolphin does not remind any last time opened
> directories, nor opened tabs (not even the count of such). all windows
> restored on login do only display $HOME.  fun part:  found session files
> from 2017 in .config/session. deleted these ;)

Same here, latest KDE Neon, it's very annoying
Comment 19 Patrick Silva 2023-05-17 01:19:00 UTC
*** Bug 469868 has been marked as a duplicate of this bug. ***
Comment 20 Patrick Silva 2023-05-17 01:19:49 UTC
*** Bug 469871 has been marked as a duplicate of this bug. ***
Comment 21 DarkThoughts 2023-05-17 10:35:43 UTC
I have the same issue on Arch / EOS for a few days now.
This was already a slight issue previously whenever you used the open folder function in other programs such as the Firefox download manager or Steam, where it would either open a completely new instance with the existing session, or a completely new instance with a new session, even if Dolphin was already opened (and if it wasn't, the empty session would override the old one). Now it seems that whenever you restart Dolphin it starts a new session. This is really frustrating when you keep some tabs open that you're frequently working with or want to remember for later use, especially if they're embedded deeply into the file system.

It'd be great if it had a proper session manager that we could use to restore previous sessions.
Comment 22 Wesley Pimentel 2023-05-17 20:26:52 UTC
(In reply to DarkThoughts from comment #21)
> I have the same issue on Arch / EOS for a few days now.
> This was already a slight issue previously whenever you used the open folder
> function in other programs such as the Firefox download manager or Steam,
> where it would either open a completely new instance with the existing
> session, or a completely new instance with a new session, even if Dolphin
> was already opened (and if it wasn't, the empty session would override the
> old one). Now it seems that whenever you restart Dolphin it starts a new
> session. This is really frustrating when you keep some tabs open that you're
> frequently working with or want to remember for later use, especially if
> they're embedded deeply into the file system.
> 
> It'd be great if it had a proper session manager that we could use to
> restore previous sessions.

Yeah I have the same problem, they could this this issue with a workaround a button that we could press to restore some tabs (in the correct order) would be nice, it's what the browser Opera calls "workspaces", For example: 1 - workspace for work, 2- learn programming, 3- for a hobby. I will try to find a place to request it.
Comment 23 Bug Janitor Service 2023-05-18 08:10:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/549
Comment 24 kdebugtracker@rushvora.com 2023-05-18 09:49:37 UTC
*** Bug 469928 has been marked as a duplicate of this bug. ***
Comment 25 Eduardo 2023-05-18 18:27:51 UTC
(In reply to Bug Janitor Service from comment #23)
> A possibly relevant merge request was started @
> https://invent.kde.org/system/dolphin/-/merge_requests/549

Thank you, this looks good.
At least dolphin now remembers closed tabs from last time. I have not tested session restore, but I will only do it when I actually can log out and back in.
Comment 26 Aleksey Kontsevich 2023-05-18 18:45:51 UTC
(In reply to Eduardo from comment #25)
> (In reply to Bug Janitor Service from comment #23)
> > A possibly relevant merge request was started @
> > https://invent.kde.org/system/dolphin/-/merge_requests/549
> 
> Thank you, this looks good.
> At least dolphin now remembers closed tabs from last time. I have not tested
> session restore, but I will only do it when I actually can log out and back
> in.

Very good! When it will be available in openSUSE Tumbleweed?
Comment 27 Méven Car 2023-05-19 13:08:53 UTC
(In reply to Aleksey Kontsevich from comment #26)
> (In reply to Eduardo from comment #25)
> > (In reply to Bug Janitor Service from comment #23)
> > > A possibly relevant merge request was started @
> > > https://invent.kde.org/system/dolphin/-/merge_requests/549
> > 
> > Thank you, this looks good.
> > At least dolphin now remembers closed tabs from last time. I have not tested
> > session restore, but I will only do it when I actually can log out and back
> > in.
> 
> Very good! When it will be available in openSUSE Tumbleweed?

This is not yet merged, but regardless if this is fixed or reverted, this should be in KDE Gears 23.04.2 that's released June 6th.
Comment 28 Antonio Rojas 2023-05-19 15:27:40 UTC
*** Bug 469994 has been marked as a duplicate of this bug. ***
Comment 29 Méven Car 2023-05-19 15:40:23 UTC
Git commit dec80fb0f940ff4e71032c2d3544f0d60a05c4ce by Méven Car, on behalf of Méven Car.
Committed on 19/05/2023 at 15:31.
Pushed by meven into branch 'master'.

global.cpp: Ensure qApp does not emit signal because of local QEventLoop

M  +2    -0    src/global.cpp

https://invent.kde.org/system/dolphin/commit/dec80fb0f940ff4e71032c2d3544f0d60a05c4ce
Comment 30 Méven 2023-05-19 15:41:47 UTC
Git commit f91e691f26150b0c05c06897a8d85bf3a7fffc06 by Méven Car.
Committed on 19/05/2023 at 15:41.
Pushed by meven into branch 'release/23.04'.

global.cpp: Ensure qApp does not emit signal because of local QEventLoop
(cherry picked from commit dec80fb0f940ff4e71032c2d3544f0d60a05c4ce)

M  +2    -0    src/global.cpp

https://invent.kde.org/system/dolphin/commit/f91e691f26150b0c05c06897a8d85bf3a7fffc06
Comment 31 Antonio Rojas 2023-05-20 22:05:45 UTC
*** Bug 470050 has been marked as a duplicate of this bug. ***
Comment 32 Kishore Gopalakrishnan 2023-05-21 06:17:56 UTC
(In reply to Méven from comment #30)
> Git commit f91e691f26150b0c05c06897a8d85bf3a7fffc06 by Méven Car.
> Committed on 19/05/2023 at 15:41.
> Pushed by meven into branch 'release/23.04'.
> 
> global.cpp: Ensure qApp does not emit signal because of local QEventLoop
> (cherry picked from commit dec80fb0f940ff4e71032c2d3544f0d60a05c4ce)
> 
> M  +2    -0    src/global.cpp
> 
> https://invent.kde.org/system/dolphin/commit/
> f91e691f26150b0c05c06897a8d85bf3a7fffc06

I built dolphin from the release/23.04 branch (with this commit included), but the earlier tabs are still not opened when Dolphin is opened as part of session restore (reproduction steps are described in bug 470050).
Comment 33 Antonio Rojas 2023-05-21 08:02:47 UTC
*** Bug 470072 has been marked as a duplicate of this bug. ***
Comment 34 Méven Car 2023-05-21 15:43:31 UTC
(In reply to Kishore Gopalakrishnan from comment #32)
> (In reply to Méven from comment #30)
> > Git commit f91e691f26150b0c05c06897a8d85bf3a7fffc06 by Méven Car.
> > Committed on 19/05/2023 at 15:41.
> > Pushed by meven into branch 'release/23.04'.
> > 
> > global.cpp: Ensure qApp does not emit signal because of local QEventLoop
> > (cherry picked from commit dec80fb0f940ff4e71032c2d3544f0d60a05c4ce)
> > 
> > M  +2    -0    src/global.cpp
> > 
> > https://invent.kde.org/system/dolphin/commit/
> > f91e691f26150b0c05c06897a8d85bf3a7fffc06
> 
> I built dolphin from the release/23.04 branch (with this commit included),
> but the earlier tabs are still not opened when Dolphin is opened as part of
> session restore (reproduction steps are described in bug 470050).

You can test with the MR https://invent.kde.org/system/dolphin/-/merge_requests/550 if you'd like.

Please respond in bug 470050
Comment 35 Antonio Rojas 2023-05-23 10:20:55 UTC
*** Bug 470158 has been marked as a duplicate of this bug. ***
Comment 36 Patrick Silva 2023-05-24 11:55:57 UTC
*** Bug 470210 has been marked as a duplicate of this bug. ***
Comment 37 Wesley Pimentel 2023-05-27 23:02:48 UTC
Hey guy, today you can update dolphin :)
Thanks kde team.
Comment 38 Felix Ernst 2023-05-28 09:35:49 UTC
(In reply to Wesley Pimentel from comment #37)
> Thanks kde team.

You are welcome!

> Hey guy, today you can update dolphin :)

This is not true for most users currently. I am saying this so we don't get more reports by users who "still have the issue after updating". The Dolphin version with the fix (Dolphin 23.04.2) is released on 8th June (https://community.kde.org/Schedules/KDE_Gear_23.04_Schedule#Thursday,_June_8,_2023:_23.04.2_release). And not all distributions manage to offer it as an update on that same day.