hhannine / superpaper

A cross-platform multi monitor wallpaper manager.
MIT License
1.15k stars 47 forks source link

Doesnt update one of the display once every cycle of 2 #153

Open yonasadiel opened 3 months ago

yonasadiel commented 3 months ago

Describe the bug I came across a weird issue. I have a profile that will cycle through ~12 images, span across 2 screen, aligned vertically. Every time, it fails to setup the wallpaper for the secondary display (display 1), then fixed in the next cycle, then failed again, and so on. I noticed that it generates image in cycle ({profile}-a.png then {profile}-b.png, and cycle back to a). And it always failed on b side, specifically file -b-crop-1.png.

To Reproduce Config:

Display Left Top
0 0 px 0 px
1 649 px 1700 px

Expected behavior The display no 1 have the correct wallpaper instead of fallback to default wallpaper from MacOS

Screenshots Once every cycle of 2, the display 1 (the bottom part, see the screnshot above for alignment) display default wallpaper in my laptop.

Desktop (please complete the following information):

Additional context

Logging / debugging contents:

['/Users/yonasadiel/Pictures/jameswebb/221130_pillars-of-creation.png']
get_ppi_norm_offsets: [(0.0, 0.0), (649.0, 1700.0)]
get_ppi_norm_crops: [(0, 0, 3026, 1702), (649, 1700, 2377, 2817)]
G_A_DSYS.use_perspective: True, prof.perspective: default
Canvas size: [3008, 2809]
[ADDED LOG] saved image: /Users/yonasadiel/Repo/github.com/hhannine/superpaper/temp/jameswebb-a-crop-0.png
[ADDED LOG] saved image: /Users/yonasadiel/Repo/github.com/hhannine/superpaper/temp/jameswebb-a-crop-1.png
[ADDED LOG] sleep for 10s
setDesktopImageURL result: True
setDesktopImageURL result: True
Removing images matching with: 'jameswebb-b-crop'

[ADDED LOG] Clicked 'Next Wallpaper'

['/Users/yonasadiel/Pictures/jameswebb/230726_herbig-haro.png']
get_ppi_norm_offsets: [(0.0, 0.0), (649.0, 1700.0)]
get_ppi_norm_crops: [(0, 0, 3026, 1702), (649, 1700, 2377, 2817)]
G_A_DSYS.use_perspective: True, prof.perspective: default
Canvas size: [3008, 2809]
[ADDED LOG] saved image: /Users/yonasadiel/Repo/github.com/hhannine/superpaper/temp/jameswebb-b-crop-0.png
[ADDED LOG] saved image: /Users/yonasadiel/Repo/github.com/hhannine/superpaper/temp/jameswebb-b-crop-1.png
[ADDED LOG] sleep for 10s
setDesktopImageURL result: True
setDesktopImageURL result: True

The jameswebb-a-crop-*.png works fine, but jameswebb-b-crop-1.png doesnt set.

I added some logs (the logs with [ADDED LOG]). I even added time.sleep(10) to make sure the image already saved properly (in case the OS failed to load the image). I already restart the program multiple times and the issue still persist.

Workaround Currently I just created new profile with name nasa and it works fine, doesnt have this problem.