Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Did not save the history and app config when not normally exit. #1531

Closed
dc-me opened this issue May 24, 2024 · 2 comments
Closed

Did not save the history and app config when not normally exit. #1531

dc-me opened this issue May 24, 2024 · 2 comments
Labels
bug Something isn't working help wanted PR welcomed.

Comments

@dc-me
Copy link

dc-me commented May 24, 2024

Describe the bug
The default is close to system tray, and if you do a restart the history and app config is not saved, I haven't tried power off. this happens on all linux I think whether is flatpak or rpm or deb. There should be some way of doing this maybe every time close to system try do a save, or listening on before app kill to do the save.

To Reproduce
Open app, change some app config, do a system restart, when system up the app config back to previous, it did not save the config.

Affected Dictionaries

Expected behavior
More robost logic to handle the save of config and history.

Screenshots

OS and software versions

Goldendict-ng 24.05.05.ecd1138 at 2024-05-23T04:23:07Z
Qt 6.7.1 GCC 13.2.0 org.kde.Platform linux 6.8.8-300.fc40.x86_64 x86_64-little_endian-lp64
Flags: MAKE_ZIM_SUPPORT USE_ICONV MAKE_CHINESE_CONVERSION_SUPPORT

Additional context

Platform Context
Windows Upload the dmp file in the crash folder located in the configuration folder (can be opened through the menu help->configuration folder) to here
Macos upload the crashpad crash log
Linux gdb backtrace info
@shenlebantongying
Copy link
Collaborator

shenlebantongying commented May 24, 2024

Duplicate of #1375

The root problem is that we don't have code that handles SIGTERM (and probably SIGKILL) yet.

Qt's aboutToQuit doesn't install SIGTERM handler, so it is unrelated.

It is not that simple because Qt methods cannot be called from signal handler.

Someone needs to read this page, then put together related code. https://doc.qt.io/qt-6/unix-signals.html

Or directly copy code from KDE

@shenlebantongying
Copy link
Collaborator

Abnormal exit is fixed by #1732

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted PR welcomed.
Projects
None yet
Development

No branches or pull requests

2 participants