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

[BUG] partially loaded image is displayed #145

Closed
christianrauch opened this issue Dec 18, 2021 · 4 comments · Fixed by #144
Closed

[BUG] partially loaded image is displayed #145

christianrauch opened this issue Dec 18, 2021 · 4 comments · Fixed by #144

Comments

@christianrauch
Copy link

Describe the bug
A partially loaded image is displayed under some circumstances, e.g. on network loss or the shell is locking the screen, and a refresh will not update this image.

Screenshots
This is the partially downloaded image:

20211218-MoonBeforeYule_EN-GB4058117703_UHD

The lower part of the image is cut off. This is better visible if shown externally with an image viewer, e.g. "Eye of GNOME" (eog).

To Reproduce
This happened to me a couple of times, but it's not directly reproducible. I think this happens when the wallpaper is updating and either the network is interrupted or the shell is doing something else, e.g. locking the screen.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Extension Version: 37
  • GNOME Version: 3.36

Additional context
I think the extension should verify (e.g. by a hashsum) that the image was downloaded correctly. At least there should be an option to refresh the image and download it again. Currently, refreshing will do nothing and keep the image broken. The only way to reload the image is to delete it manually form the wallpaper folder and refresh again.

@christianrauch
Copy link
Author

Believe it or not, it just happened again after a restart:

20211218-MoonBeforeYule_EN-GB4058117703_UHD

@neffo
Copy link
Owner

neffo commented Dec 19, 2021

Thanks for reporting this. This is something I've seen myself, so definitely confirmed. It's due to the way the extension saves each chunk of the file as it's received rather than waiting till it's complete (which should be fine for a ~5 to 10 mb file). It should also be possible to add a validity check as well as there is a hash in the JSON we receive from Bing. I will look into implementing both of these.

In the meantime, if you have these broken files you can either delete them in your file browser or via the in-extension image gallery. If it's a image that is missing/deleted it will be re-downloaded if you apply the image as wallpaper (selecting it through the menu back and forward buttons).

image

@neffo neffo mentioned this issue Dec 19, 2021
16 tasks
@neffo neffo linked a pull request Dec 19, 2021 that will close this issue
16 tasks
neffo added a commit that referenced this issue Dec 20, 2021
@Spurlos
Copy link

Spurlos commented Mar 13, 2022

This issue became major one for me, due to my internet connection deterioration (i'm in the part of Ukraine that is going thru war currently, and we have limit connectivity, ~1-2 mbit with 20-50% packet loss when congested). Almost all wallpapers only load partially, like 5-10% and then stop.

Can you merge 7a7693d (#144) if its ready for prime time?

@neffo
Copy link
Owner

neffo commented Mar 14, 2022

Yeah thanks for bug report, stay strong. ✌️

There's a few outstanding niggling issues I want to clear and I need to test, but shouldn't be too far away. If you drop the image resolution to 1080p, is it more reliable (image should be ~80% smaller)?

neffo added a commit that referenced this issue Mar 19, 2022
* Updated German, Italian and Arabic translation (#142) #14
* add gettext domain to metadata
* safer and more reliable method for _downloadImage #145
* move download folder fix #106
* set gtk4 filechooser button label #151
* better deal with home dir changes #151
* migrate from deprecated Soup.SessionAsync #150
* handle failures to get a httpsession #150
* change log error shouldn't stop prefs opening #150
* support GNOME 42, set dark style background #153 #154
* merge changes from #148
* improve user directory handling, remove '😞' char #151
* better default pref window size on gnome 40+ #147
* disable gallery, and open gallery fall back to open folder
* bump version to version 38

Co-authored-by: JAKuhr <9527705+JAKuhr@users.noreply.github.com>
Co-authored-by: Simone Dotto <simonedotto@protonmail.com>
Co-authored-by: Amro Soliman <81815707+amrosolaiman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants