geeqie
geeqie copied to clipboard
Quitting instance causes all instances to exit
ISSUE TYPE
- Bug Report
GEEQIE VERSION
Geeqie 1.5.1+git20200723
OS / DISTRIBUTION
Debian unstable
SUMMARY
If I start multiple geeqie instances independently, quitting any one of them will also cause the others to exit.
I'd expect independent instances not to take each other down like that.
STEPS TO REPRODUCE
- Run
geeqie folder1from a terminal - Run
geeqie folder2from another terminal, or the same one — it doesn't matter, the point is that they are two separate instances I might have started independently in two contexts, e.g. one to view family photos, and the other to open an image attachment of an important mail that just came in. - Hit
ctrl-qin either instance, causing both to exit, which potentially might mean I lose information, such as the tags I had labouriously created in the family album.
control-Q will close all windows. control-W will close the current window unless it is the "main" window, in which case all windows will be closed.
The "main" window can be identified by the word "Geeqie" in the title bar, whereas subsidiary windows have the word "geeqie" in the title bar.
[The option edit/preferences/windows/show window IDs permits the window name to be displayed in the title bar]
[Menu item windows/rename windows permits a window layout to be saved with a unique name, and can be reloaded at any time via the windows/new window menu]
Recently I was often affected by a problem: while using ctrl-w to close the current window, Geeqie would segfault. In effect, it would close all windows without saving modified data (history, tags and so on). I didn't yet try to reproduce it in gdb due to lack of time, so I didn't report it.
Since @madduck mentions loosing information, I would guess that he also encountered segfault. Otherwise Geeqie (even with ctrl-q) would prompt to save modified tags.
First off, "data loss" occurred only in the sense that I marked photos (using ctrl-1) for selection, then got sidetracked, opened a new window, hit ctrl-q, and now my photo window got closed, and all the marks were obviously gone. So just a little bit of time lost.
I get that a Geeqie instance might want to have multiple windows, and the fact that one can save and restore window layouts shows that someone designed it to be like that. Under this light, it makes sense that quit closes all windows of a session.
I guess my problem boils down to when I invoke geeqie on the command line twice, I don't expect the second call to add a window to the first instance, but actually to start a new instance with a new window layout. Now, if I quit that second instance, it closes all associated windows, but the first instance would not be affected.
Does this make sense? If so, I can rename the issue, or open a new one for this…
, I don't expect the second call to add a window to the first instance, but actually to start a new instance with a new window layout.
There is a command line option:
geeqie [-n] [--new-instance]
However there is a serious drawback to this - Geeqie has only one configuration file:
$HOME/.config/geeqie/geeqierc.xml
The last instance to close will overwrite the config. data of instances that previously closed.
and all the marks were obviously gone
There is an option: edit\preferences\behaviour\save marks on exit
Thanks for letting me know about the "save marks" option. Nice!
I see the problem with the configuration file, especially since it sounds like the configuration file is written on close even if there weren't any changes. A couple of solutions come to mind:
- only write when there are changes;
- if the file was modified since read, prompt user;
- monitor the file for changes, and reload when there've been changes, although that might be too hard/fragile;
I wonder how other applications do this, e.g. Libreoffice. I think a lot is gained just by implementing (1.), especially since users generally don't change preferences a lot.