Bug 463497 - Implement session management support (crashes on startup; must clear cache)
Summary: Implement session management support (crashes on startup; must clear cache)
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.6.1
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-26 18:54 UTC by hong
Modified: 2022-12-27 12:31 UTC (History)
1 user (show)

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


Attachments
attachment-3358-0.html (1.99 KB, text/html)
2022-12-27 11:55 UTC, hong
Details
attachment-7449-0.html (2.84 KB, text/html)
2022-12-27 12:31 UTC, hong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hong 2022-12-26 18:54:25 UTC
SUMMARY
***
Sometimes (not often) when I start KDevelop, it immediately closes.
Next time, it pops up the message box about clearing cache or continue.
I must clear cache and then, all is well again. 
***


STEPS TO REPRODUCE
1. Not sure but it seems to happen if I shutdown the machine.
2. and forget to close KDevelop.
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.25.2
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
Operating System: Kubuntu 22.10
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.17.5-051705-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700 CPU @ 3.40GHz
Memory: 23.4 GiB of RAM
Graphics Processor: llvmpipe
Manufacturer: Dell Inc.
Product Name: XPS 8900
Comment 1 Igor Kushnir 2022-12-27 09:45:35 UTC
> I must clear cache and then, all is well again. 
> 1. Not sure but it seems to happen if I shutdown the machine.
> 2. and forget to close KDevelop.
This is expected behavior. I don't think improving it is feasible. When you shut down while KDevelop is running, it may not have enough time to write data to disk, so the cache ends up corrupted. Or does your system wait for KDevelop to exit cleanly and only then shuts down?
Comment 2 hong 2022-12-27 11:55:02 UTC
Created attachment 154843 [details]
attachment-3358-0.html

shutting down immediately with no warning of any kind should not be 
considered proper behavior.
why is it that only upon second attempt at starting does it offer the 
option to clear cache?


On 12/27/22 04:45, Igor Kushnir wrote:
> https://bugs.kde.org/show_bug.cgi?id=463497
>
> Igor Kushnir<igorkuo@gmail.com>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |igorkuo@gmail.com
>           Resolution|---                         |NOT A BUG
>               Status|REPORTED                    |NEEDSINFO
>
> --- Comment #1 from Igor Kushnir<igorkuo@gmail.com>  ---
>> I must clear cache and then, all is well again.
>> 1. Not sure but it seems to happen if I shutdown the machine.
>> 2. and forget to close KDevelop.
> This is expected behavior. I don't think improving it is feasible. When you
> shut down while KDevelop is running, it may not have enough time to write data
> to disk, so the cache ends up corrupted. Or does your system wait for KDevelop
> to exit cleanly and only then shuts down?
>
Comment 3 Igor Kushnir 2022-12-27 12:10:16 UTC
Your reply is too verbose and poorly formatted. Please reply on the bug tracker, not via email.

(In reply to hong from comment #2)
> shutting down immediately with no warning of any kind should not be considered proper behavior.
That depends on your desktop environment or window manager. I see from the bug report that you are using KDE Plasma. Plasma implements session management. Just checked: indeed KDevelop does not support it. Such support should be added as described here: https://doc.qt.io/qt-5/session.html. With session management support implemented, the desktop environment will wait for KDevelop to exit before shutting down, or ask the user whether to wait for KDevelop to exit. A merge request that implements session management support at https://invent.kde.org/kdevelop/kdevelop/-/merge_requests is welcome.

> why is it that only upon second attempt at starting does it offer the option to clear cache?
Because the dialog appears after any crash before attempting to read possibly corrupt cache data, which may cause a crash. Without a recent crash KDevelop doesn't expect the cache to be corrupted. Offering the option to clear the cache at every KDevelop start would be much worse than the current behavior.
Comment 4 Igor Kushnir 2022-12-27 12:19:20 UTC
(In reply to Igor Kushnir from comment #3)
> Such support should be added as described here: https://doc.qt.io/qt-5/session.html.
Actually KDE offers more advanced session management interfaces, which should probably be used instead of standard Qt ones: https://develop.kde.org/docs/use/session-managment/
Comment 5 hong 2022-12-27 12:31:10 UTC
Created attachment 154845 [details]
attachment-7449-0.html

thanks for your follow-up explanations...


On 12/27/22 07:10, Igor Kushnir wrote:
> https://bugs.kde.org/show_bug.cgi?id=463497
>
> Igor Kushnir<igorkuo@gmail.com>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>       Ever confirmed|0                           |1
>           Resolution|NOT A BUG                   |---
>               Status|NEEDSINFO                   |CONFIRMED
>
> --- Comment #3 from Igor Kushnir<igorkuo@gmail.com>  ---
> Your reply is too verbose and poorly formatted. Please reply on the bug
> tracker, not via email.
>
> (In reply to hong from comment #2)
>> shutting down immediately with no warning of any kind should not be considered proper behavior.
> That depends on your desktop environment or window manager. I see from the bug
> report that you are using KDE Plasma. Plasma implements session management.
> Just checked: indeed KDevelop does not support it. Such support should be added
> as described here:https://doc.qt.io/qt-5/session.html. With session management
> support implemented, the desktop environment will wait for KDevelop to exit
> before shutting down, or ask the user whether to wait for KDevelop to exit. A
> merge request that implements session management support at
> https://invent.kde.org/kdevelop/kdevelop/-/merge_requests  is welcome.
>
>> why is it that only upon second attempt at starting does it offer the option to clear cache?
> Because the dialog appears after any crash before attempting to read possibly
> corrupt cache data, which may cause a crash. Without a recent crash KDevelop
> doesn't expect the cache to be corrupted. Offering the option to clear the
> cache at every KDevelop start would be much worse than the current behavior.
>