0
Started

make_thumbs.php fails on STLs and has infinite recursion on a gif

me 4 months ago updated 3 months ago 3

linaro@tinkerboard:/var/www/html/cron$ php make_thumbs.php

-------------------- START ----------------------

Generating thumbnails for superuser's files:

Getting directory listing...: 41,498 files found

Processing files:

41497 /mnt/models/Minis/objs.txt .................................................... ... Skipping

41496 /mnt/models/Minis/conv.sh ..................................................... ... Skipping

41495 /mnt/models/Minis/Genre - Named Designer/Cast and Play/Base_28mm.stl .......... ... Failed!

41494 /mnt/models/Minis/Genre - Named Designer/Cast and Play/Wound_Counter.3mf ...... ... Skipping

41493 /mnt/models/Minis/Genre - Named Designer/Cast and Play/23_Ice Devil/IceDevil.stl ... Failed!

41492 /mnt/models/Minis/Genre - Named Designer/Cast and Play/44_Prisoner Cages/44_Cages.png ... DONE (Doesn't require processing)

41491 /mnt/models/Minis/Genre - Named Designer/Cast and Play/44_Prisoner Cages/Hollowed/Cage_prisoner_hollowed.stl ... Failed!

41490 /mnt/models/Minis/Genre - Named Designer/Cast and Play/44_Prisoner Cages/Photon/3_prisoner_cages.photon ... Skipping

41489 /mnt/models/Minis/Genre - Named Designer/Cast and Play/44_Prisoner Cages/Supported/3_Cages_supported.stl ... Failed!

41488 /mnt/models/Minis/Genre - Named Designer/Cast and Play/44_Prisoner Cages/Raw/Cage_Open.stl ... Failed!

41487 /mnt/models/Minis/Genre - Named Designer/Cast and Play/44_Prisoner Cages/Raw/Cage_Closed.stl ... Failed!

41486 /mnt/models/Minis/Genre - Named Designer/Cast and Play/44_Prisoner Cages/Raw/Cage_OpenBottom_Fits_32mm_mini_inside.stl ... Failed!

41485 /mnt/models/Minis/Genre - Named Designer/Cast and Play/44_Prisoner Cages/Raw/Cage_eClosed_prisoner.stl ... Failed!

41484 /mnt/models/Minis/Genre - Named Designer/Cast and Play/22_Mimic/Mimic_unbased.stl ... Failed!

41483 /mnt/models/Minis/Genre - Named Designer/Cast and Play/22_Mimic/Mimic_w_base.stl ... Failed!

41482 /mnt/models/Minis/Genre - Named Designer/Cast and Play/28_GelatinousCube/gelatinous_cube.stl ... Failed!

41481 /mnt/models/Minis/Genre - Named Designer/Cast and Play/28_GelatinousCube/__gelatinous_cube_v2_hollowed_supported.stl ... Failed!

41480 /mnt/models/Minis/Genre - Named Designer/Cast and Play/28_GelatinousCube/gelatinous_cube_v2_hollowed.stl ... Failed!

41479 /mnt/models/Minis/Genre - Named Designer/Cast and Play/28_GelatinousCube/GelatinousCube.jpg ... DONE (Doesn't require processing)

41478 /mnt/models/Minis/Genre - Named Designer/Cast and Play/28_GelatinousCube/gelatinous_cube_v2_hollowed_anycubicgreen.photon ... Skipping

41477 /mnt/models/Minis/Genre - Named Designer/Cast and Play/36_Dragon Beholder/Beholder_gragon_Base.stl ... Failed!

41476 /mnt/models/Minis/Genre - Named Designer/Cast and Play/36_Dragon Beholder/Beholder_castnplay.gif ^C

Two things of note here:

1. STL files report "Failed!" and do not generate a thumbnail.


2. When the script gets to the .gif file it appears to hang, however in reality it is recursing infinitely and making dozens of thumbnails of the same thing.

/mnt/models/thumbnails/mnt/models/Minis/Genre - Named Designer/Cast and Play/36_Dragon Beholder/Beholder_castnplay.gif/25916412

<snip>

-rw-r--r-- 1 www-data linaro 173805 Jul 2 04:57 400_400_contain[1]-32.png
-rw-r--r-- 1 www-data linaro 173531 Jul 2 04:57 400_400_contain[1]-33.png
-rw-r--r-- 1 www-data linaro 172153 Jul 2 04:57 400_400_contain[1]-34.png
-rw-r--r-- 1 www-data linaro 170741 Jul 2 04:57 400_400_contain[1]-35.png
-rw-r--r-- 1 www-data linaro 168108 Jul 2 04:57 400_400_contain[1]-36.png
-rw-r--r-- 1 www-data linaro 165710 Jul 2 04:57 400_400_contain[1]-37.png
-rw-r--r-- 1 www-data linaro 163408 Jul 2 04:57 400_400_contain[1]-38.png
-rw-r--r-- 1 www-data linaro 162331 Jul 2 04:57 400_400_contain[1]-39.png
-rw-r--r-- 1 www-data linaro 173039 Jul 2 04:56 400_400_contain[1]-4.png
-rw-r--r-- 1 www-data linaro 162544 Jul 2 04:57 400_400_contain[1]-40.png
-rw-r--r-- 1 www-data linaro 163321 Jul 2 04:57 400_400_contain[1]-41.png
-rw-r--r-- 1 www-data linaro 163862 Jul 2 04:57 400_400_contain[1]-42.png
-rw-r--r-- 1 www-data linaro 163183 Jul 2 04:57 400_400_contain[1]-43.png
-rw-r--r-- 1 www-data linaro 161507 Jul 2 04:57 400_400_contain[1]-44.png
-rw-r--r-- 1 www-data linaro 163169 Jul 2 04:57 400_400_contain[1]-45.png
-rw-r--r-- 1 www-data linaro 164495 Jul 2 04:57 400_400_contain[1]-46.png
-rw-r--r-- 1 www-data linaro 164604 Jul 2 04:57 400_400_contain[1]-47.png
-rw-r--r-- 1 www-data linaro 65536 Jul 2 04:57 400_400_contain[1]-48.png

<snip>

rw-r--r-- 1 www-data linaro 0 Jul 2 04:56 400_400_contain[1].png.lock

note, stl-thumb is installed and it works perfectly from the GUI and the command line when invoked manually.

which stl-thumb
/usr/bin/stl-thumb

Started

For fixing the STL thumbnail processing via command line, please replace "system/classes/vendor/FileRun/Thumbs/Make.php" with this one.

Couldn't reproduce the GIF-related problem though. Perhaps you can share a sample file (contact us).

With this update I am no longer seeing it hang on a gif and re-parse it repeatedly.  Either that was a fluke or the errors with the STL files triggered something.  Thank you very much for this.  Does the cron script look at file time changes or file size changes to decide if something needs to be re-cached?