BestImageViewer / geeqie

claiming to be the best image viewer / photo collection browser
http://www.geeqie.org/
GNU General Public License v2.0
466 stars 77 forks source link

Window not shown at startup when save_window_workspace = "true" #1313

Open peter-stoll opened 5 months ago

peter-stoll commented 5 months ago

Setup (please complete the following information):

Describe the bug With the precondition that there is no geeqie running yet: When, and only when, in $HOME/.config/geeqierc.xml the variable save_window_workspace is set to true, like this: save_window_workspace = "true" , then the geeqie windows does not show after I type on the console: $ geeqie [Enter] I notice sometimes a very short blinking in the dash at one place (where the icon should occur), but nothing else happens. There is no output on the console, and the process continues to run in the foreground. There process consumes no measurable CPU time. Simply changing above option to "false" makes geeqie working as expected. In case that the precondition is that there is already a geeqie running (even though it has no window), the process goes in background. Giving an image as argument does not change the behavior.

Notice that setting variable use_saved_window_positions_for_new_windows = "true" or "false" does not make any difference, in both cases. This is remarkable, since the issue is when starting the application, so one might expect that the value of this variable could cause an issue, while 'save_windowsworkspace' would only matter when the software is closed. But that is not the case, it is the 'save...' which causes (at least correlates) with this bug.

To reproduce Steps to reproduce the behavior:

Set in $HOME/.config/geeqierc.xml the variable save_window_workspace to true, like this: save_window_workspace = "true" Execute this in a shell:

killall geeqie
geeqie  [Enter] 

Executing this commands in another shell might provide more information. It shows at least that geeqie is running as X11 application. Note that I use two 4K-Monitors side by side. The window should be in the visible area.

$ xwininfo -tree -root | grep geeqie
     0x6e00001 "geeqie": ("geeqie" "Geeqie")  10x10+10+10  +10+10
        0x6e0000f "Bildschirmfoto_vom_2024-03-03_21-34-30.png - Geeqie": ("geeqie" "Geeqie")  2007x2091+10+40  +459+65

Expected behavior The window should be shown. An Icon should appear in the dash. Neither happens, except for a very short flash in the dash.

Screenshots nothing to see.

Image sources nothing to see.

Error logs or seg. fault files This is the output when started with --debug

mausi:Pictures $ geeqie  --debug
debugging output enabled (level 1)
    0.000213 (+00000.000213) main: gtk_init
    0.179979 (+00000.179766) main: pixbuf_inline_register_stock_icons
    0.180275 (+00000.000296) main: setting default options before commandline handling
Home directory: /home/stoll
Home directory: /home/stoll
Home directory: /home/stoll
    0.180324 (+00000.000049) main: mkdir_if_not_exists
Home directory: /home/stoll
    0.180351 (+00000.000027) main: parse_command_line
error connecting to socket: Verbindungsaufbau abgelehnt
    0.180529 (+00000.000178) main: load_options
loader reported [png] [PNG] [.png]
loader reported [jpeg] [JPEG] [.jpeg;.jpe;.jpg]
loader reported [wmf] [Windows Metafile] [.wmf;.apm]
loader reported [ani] [Windows animated cursor] [.ani]
loader reported [bmp] [BMP] [.bmp]
loader reported [gif] [GIF] [.gif]
loader reported [heif/avif] [HEIF/AVIF Image] [.heif;.heic;.avif]
loader reported [icns] [MacOS X icon] [.icns]
loader reported [ico] [Windows icon] [.ico;.cur]
loader reported [pnm] [PNM/PBM/PGM/PPM] [.pnm;.pbm;.pgm;.ppm]
loader reported [qtif] [QuickTime] [.qtif;.qif]
loader reported [svg] [Scalable Vector Graphics] [.svg;.svgz;.svg.gz]
loader reported [tga] [Targa] [.tga;.targa]
loader reported [tiff] [TIFF] [.tiff;.tif]
loader reported [webp] [The WebP image format] [.webp]
loader reported [xbm] [XBM] [.xbm]
loader reported [xpm] [XPM] [.xpm]
    0.180943 (+00000.000414) layout_new: start
Initializing LIRC... failed
    0.181406 (+00000.000463) layout_actions_setup: start
    0.210560 (+00000.029154) layout_actions_setup: add menu
    0.210673 (+00000.000113) layout_actions_setup: add toolbar
    0.210684 (+00000.000011) layout_actions_setup: marks
    0.211344 (+00000.000660) layout_actions_setup: editors
    0.211357 (+00000.000013) layout_actions_setup: status_update_write
    0.211363 (+00000.000006) layout_actions_setup: actions_add_window
    0.211368 (+00000.000005) layout_actions_setup: end
Setting stereo mode 0000 for imd 0x5e2a947f62a0
    0.260094 (+00000.048726) vflist_refresh: read dir
    0.260101 (+00000.000007) vflist_refresh: populate view
    0.260105 (+00000.000004) vflist_refresh: free filelist
    0.260109 (+00000.000004) vflist_refresh: done
    0.266072 (+00000.005963) pixbuf renderer updated - started drawing 0x5e2a947fe230, img: 200x70
    0.266080 (+00000.000008) pixbuf renderer updated - started drawing 0x5e2a947fe230, img: 200x70
    0.266087 (+00000.000007) pixbuf renderer updated - started drawing 0x5e2a947fe230, img: 200x70
update size: 0x5e2a9470dd30  0 0   1494 2046
    0.301720 (+00000.035633) pixbuf renderer updated - started drawing 0x5e2a947fe230, img: 200x70
    0.303505 (+00000.001785) layout_new: end
Register realtime 0 /home/stoll/Pictures
    0.304580 (+00000.001075) vflist_refresh: read dir
    0.308858 (+00000.004278) vflist_refresh: sort
    0.308872 (+00000.000014) vflist_refresh: populate view
    0.310300 (+00000.001428) vflist_refresh: free filelist
    0.310306 (+00000.000006) vflist_refresh: done
    0.310319 (+00000.000013) image reset
    0.310327 (+00000.000008) image begin
new image loader 0x5e2a93c99d60, bufsize=4096 idle_loop=1
exif read /home/stoll/Pictures/Bildschirmfoto_vom_2024-03-03_21-34-30.png, sidecar: -
Thread pool num threads: 1
Register realtime 0 /home/stoll/Pictures/Bildschirmfoto_vom_2024-03-03_21-34-30.png
    0.311776 (+00000.001449) read ahead cancelled for :null
read ahead set to :/home/stoll/Pictures/Bildschirmfoto_vom_2024-03-04_02-20-10.png
    0.318167 (+00000.006391) pixbuf renderer updated - started drawing 0x5e2a947fe230, img: 200x70
Loading options from /home/stoll/.config/geeqie/geeqierc.xml ... done
CLUTTER_FEATURE_SWAP_EVENTS 0
    0.318879 (+00000.000712) layout_editors_reload_start
update size: 0x5e2a9470dd30  0 0   1494 2046
    0.318982 (+00000.000103) main: gtk_main
image_load_size_cb: 7680x2160
    0.335697 (+00000.016715) pixbuf renderer updated - started drawing 0x5e2a947fe230, img: 7680x2160
    0.335705 (+00000.000008) pixbuf renderer updated - started drawing 0x5e2a947fe230, img: 7680x2160
Using X11 screen profile, length: 1428
    0.361526 (+00000.025821) layout_editors_reload_idle_cb: get_desktop_files
    0.376522 (+00000.014996) layout_editors_reload_idle_cb: setup_editors
    0.376969 (+00000.000447) layout_editors_reload_idle_cb: setup_editors done
    0.478403 (+00000.101434) image done
    0.478425 (+00000.000022) read ahead started for :/home/stoll/Pictures/Bildschirmfoto_vom_2024-03-04_02-20-10.png
new image loader 0x5e2a93c99e90, bufsize=4096 idle_loop=1
exif read /home/stoll/Pictures/Bildschirmfoto_vom_2024-03-04_02-20-10.png, sidecar: -
Thread pool num threads: 1
freeing image loader 0x5e2a93c99d60 bytes_read=4711268
    0.530760 (+00000.052335) read ahead done for :/home/stoll/Pictures/Bildschirmfoto_vom_2024-03-04_02-20-10.png
    0.530778 (+00000.000018) image load completed "/home/stoll/Pictures/Bildschirmfoto_vom_2024-03-04_02-20-10.png" (preload)
freeing image loader 0x5e2a93c99e90 bytes_read=627284
    0.540810 (+00000.010032) image load completed "/home/stoll/Pictures/Bildschirmfoto_vom_2024-03-03_21-34-30.png" (current)
    0.540821 (+00000.000011) pixbuf renderer done 0x5e2a947fe230
monitor /home/stoll/Pictures
monitor /home/stoll/Pictures/Bildschirmfoto_vom_2024-03-03_21-34-30.png
monitor /home/stoll/Pictures
monitor /home/stoll/Pictures/Bildschirmfoto_vom_2024-03-03_21-34-30.png
monitor /home/stoll/Pictures
monitor /home/stoll/Pictures/Bildschirmfoto_vom_2024-03-03_21-34-30.png
... last two lines repeated every few seconds ...

Additional context none

caclark commented 5 months ago

I cannot replicate this problem.

Try renaming $HOME/.config/geeqie/geeqierc.xml and then running Geeqie. A default configuration file will be generated. Then edit it as above and try again.

[v1.7.2 is a rather old version]

peter-stoll commented 5 months ago

We get closer: Doing what you recommended, I found that with the default configuration it worked, but by changing line by line in geeqierc.xml between my buggy version and the default version, I found that that the variable 'save_windowworkspace' affects on which workspace the windows is shown on start, which is odd to me, since a 'save..' options should, just by it's name, not affect the starting behavior.

Starting with the default configuration file for all other options, and being on workspace 0, I can reproduce it like this:

With this setting:

save_window_workspace = "false"
workspace = "1"

the windows pops up at workspace 0 , while with this setting:

save_window_workspace = "true"
workspace = "1"

the window pops up at workspace 1, which is why it was not shown.

Taking this for it's own, the behavior might be correct, but one would expect, that setting the option:

use_saved_window_positions_for_new_windows = "false" 

would prevent the window from popping up on anther workspace. This is the behavior of version 2.4, which I tried (installed from flatpak), so I assume the developers agree on this. With that I conclude that the correct Bug description should be:

Setting the option use_saved_window_positions_for_new_windows="false" does not affect the workspace where the windows was shown, but still uses the old workspace.

For myself, I will continue by using the flatpak 2.4 version, so this is not an issue for me anymore. But since the 1.7 version is still distributed as dpkg on Mint 21.3, and probably also on Ubuntu 22.04, it might be worth to fix this on an older version.