Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
stormmaster
Topic Author
Posts: 4
Joined: 20 Jun 2021, 18:09

Some thumbnails not generated

20 Jul 2021, 07:43

Hi,

I noticed a strange problem with some of the preview thumbnails not being generated.
Example on this page:
https://stormpix.net/x3/scavanger_hunt/ ... _fabulous/ where the preview for "letter_c" for some reason cannot be generated.

So inpecting:
https://stormpix.net/x3/render/w320-c3. ... tter_c.jpg
causes a 500 server error

The full images display fine.
Other aspect ratios for the preview also seem to work - changing to 3:3:
https://stormpix.net/x3/render/w320-c3. ... tter_c.jpg

What I also tried:
* reupload the same image
* upload the same image with slight modifications ...
* deleting the cache

More examples here: https://stormpix.net/x3/scavanger_hunt/2015_-_Round_15/

All resulting in the same problem.

Any idea?

All the best,
Stefan
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12877
Joined: 30 Sep 2006, 03:37

Re: Some thumbnails not generated

20 Jul 2021, 08:54

Indeed a strange issue that I can't immediately explain, especially since basically ALL requests work for the same image when removing the "c-*" in resizer or changing it a different crop value (for example "c-3.1"). I also tested the image here successfully with error:
Screen Shot 2021-07-20 at 19.40.07.jpg
Screen Shot 2021-07-20 at 19.40.07.jpg (24.51 KiB) Viewed 40 times
Thinking it might have something to do with that specific aspect ratio, I tried to use "c-6.4" (which would normally serve the same as c-3.2). This request also fails on your server:
https://stormpix.net/x3/render/w640-c6. ... 015_55.jpg

This leads me to believe it's some strange computing/number error on your server related to the aspect ratio. There is nothing in the PHP diagnostics for the image that implies it would not resize. See link below. It just fails when running it on server:
https://stormpix.net/x3/render/w320-c3. ... .jpg?debug

For now I can only suggest the following to at least eliminate some factors:
1. Rename the image to testimage.jpg
2. Upload to a root folder test (/test/testimage.jpg)
3. Test. At least we have removed character issues (-_000).

Next steps would be other things for elimination like 1. stripping EXIF/IPTC (to eliminate meta data causing havoc), 2. Disable "sharpen images" for the X3 image resizer, 3. Change to another PHP version. If no luck, the final option is to locate your server/PHP error_log file which should store error descriptions when the 500 error is caused.
 
User avatar
stormmaster
Topic Author
Posts: 4
Joined: 20 Jun 2021, 18:09

Re: Some thumbnails not generated

20 Jul 2021, 10:41

Thanks for the quick reply.
I played with the sharpening option - that didn't change anything.  
Then I turned off the "smart crop" and voilá: preview generated successful.
Switching it back on again (after cleaning cache) causes the preview generation error.
From the php error log:
[20-Jul-2021 14:39:53 UTC] PHP Fatal error:  Uncaught Error: Cannot use object of type GdImage as array in /home/storm42/public_html/x3/app/parsers/slir/index.php:433

Stack trace:
#0 /home/storm42/public_html/x3/app/parsers/slir/index.php(473): resizer->__construct()
#1 {main}
  thrown in /home/storm42/public_html/x3/app/parsers/slir/index.php on line 433
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12877
Joined: 30 Sep 2006, 03:37

Re: Some thumbnails not generated

20 Jul 2021, 23:57

Interesting. I can imagine a scenario here where the specific images, when set to "crop-3.2", which matches their original aspect, end up non-cropped and an incorrect resource type is passed to the "smart crop" mechanism. I will look into this for next release ... Thanks for following up!

As you may have figured out, to currently resolve the issue, you will either need to disable "smart crop", or disable it temporarily while creating the images that cause error. Once they are created, you could enable smart crop again (for other new images).