FossifyOrg / Gallery

Browse your memories without any interruptions with this photo and video gallery
https://www.fossify.org
GNU General Public License v3.0
1.34k stars 41 forks source link

some thumbnails wont render #148

Closed Meteor0id closed 2 months ago

Meteor0id commented 4 months ago

Checklist

Affected app version

1.1.1

Affected Android/Custom ROM version

android 10

Affected device model

Motorola moto g7 plus (nearly stock android)

How did you install the app?

None

Steps to reproduce the bug

Hi, I noticed some previews aren't rendering for all types of media (videos, gifs, movie). Clearing cache made no difference. These media can still be viewed properly by tapping and opening single view mode. I have attached one of the images for which the app fails to show a preview in folder view.

Hope this helps.

Expected behavior

Thumbnails render while scrolling the gallery

Actual behavior

Thumbnails never shows up

Screenshots/Screen recordings

Screenshot_20240227-162354

Here is the file itself

RDT_20240217_1337493113863773608935546

And zipped to preserve properties RDT_20240217_1337493113863773608935546.zip

Additional information

No response

Aga-C commented 4 months ago
  1. Fill the template properly, especially fields about the device.
  2. 6.28.1 is not the latest version of the app.
  3. File link doesn't work.
Meteor0id commented 4 months ago

@Aga-C updated It was a copy paste text from the old repo where users got sold out. New file, yes the bug is still present in current public release

Aga-C commented 4 months ago

Please fill Affected device model because it is relevant. I've just tested on two different devices (image downloaded from ZIP) and have no problem, thumbnail is generated and displayed correctly.

Meteor0id commented 4 months ago

@Aga-C updated, moto g7. Can't see an obvious reason why my device is affected anything I could check?

Aga-C commented 4 months ago

@naveensingh Do you have any idea what more information we may need?

Meteor0id commented 4 months ago

Settings

Screenshot_20240227-165520

Color sceme looks like old app but was imported

Only the preview wont load, if I tap on it the full screen inage does show

inson1 commented 4 months ago

its jpg, not crazy big (10MB), resolution is little bit bigger, but still in the norm 2k/4k

naveensingh commented 4 months ago

@naveensingh Do you have any idea what more information we may need?

Maybe. @Meteor0id are you familiar with Android Studio or adb logcat? Can you get some logs for us? Glide often dumps useful info into the logs.

I have one Motorola phone with similar specs, I'll try to reproduce this. I think I might have seen this bug before on an emulator.

Aga-C commented 3 months ago

@Meteor0id Do thumbnails work correctly when you turn off Animate GIFs at thumbnails?

naveensingh commented 3 months ago

Possibly related: https://www.reddit.com/r/Fossify/comments/1b43ifl/gallery_many_gif_thumbnails_missing/

I was gonna create a separate issue but this one might suffice.

Meteor0id commented 3 months ago

@Aga-C yes turning that off kakes them appear. You are onto something

Aga-C commented 3 months ago

It seems to be only related to this setting, not to the device as I previously thought. Also, thumbnails for AVIF files doesn't work with this option turned on.

In code, I see that problem is with the line options.dontAnimate() in Context.loadImageBase. For some reason, it breaks both AVIF files and this JPEG.

naveensingh commented 3 months ago

I can also reproduce this now. Both with AVIF and the JPG provided above. I'll investigate this later today.

Thanks, Agni!

Aga-C commented 3 months ago

I've found out what's wrong with JPEG posted here. In fact, the file doesn't contain JPEG data but PNG data. For some reason, dontAnimate doesn't handle the case of wrong file extension.

naveensingh commented 3 months ago

image Hmmm.

naveensingh commented 2 months ago

Should be fixed in https://github.com/FossifyOrg/Gallery/releases/tag/1.1.3