Page MenuHomePhabricator

Error creating thumbnail: convert: Insufficient memory (case 4) (High resolution JPG)
Closed, ResolvedPublic

Description

Author: esby

Description:
Reported the issue on Commons Village Pump

https://commons.wikimedia.org/wiki/Commons:Village_pump#Missing_thumbs_for_big_image_.28jpg.29

It might be a bug or a feature:

The issue appears on some recent and large jpg files uploaded:

There is basically no thumb showing up.

https://commons.wikimedia.org/wiki/File:Night_Panorama_of_the_Potsdamer_Platz_-_Berlin_-_2012-06-03_-_P1400487-P1400537.jpg

When trying to generate the thumb again:

Error creating thumbnail: convert: Insufficient memory (case 4) `/mnt/upload6/wikipedia/commons/6/6d/Night_Panorama_of_the_Potsdamer_Platz_-_Berlin_-_2012-06-03_-_P1400487-P1400537.jpg' @ error/jpeg.c/EmitMessage/235.
convert: missing an image filename `/tmp/transform_4597d64-1.jpg' @ error/convert.c/ConvertImageCommand/2970.

Note: this file, similar in size and resolution (but a bit lower) got a thumb generated: https://commons.wikimedia.org/wiki/File:Alte_Nationalgalerie_-_Berlin_-2012-0603-_P1400420-P1400427.jpg

I can see two possibles causes:

  • a max width issue ? ( 16069 < 16384 (limit?) < 20k )
  • a max memory issue: 37,91 MB < limit somewhere ? < 38,39 MB )

This also seems related to imagemagick,
http://sourceforge.net/apps/trac/gallery/ticket/1513
the setting being near 38 MB if she second possibility applies.

Old images bigger than the one causing problems have thumbs on commons:
eg: http://commons.wikimedia.org/wiki/File:Panorama_de_La_Garde_depuis_la_chapelle_au_matin.jpg


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=37563

Details

Reference
bz37367

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:29 AM
bzimport set Reference to bz37367.
bzimport added a subscriber: Unknown Object (MLST).

esby wrote:

The jpeg was encoded with progessive.
A work around if to reencode with non progressive setting.

Copying discussion from village pump since the village pump bot will archive it.

uploaded a new version of the file with commonist, had the same bug. I also managed to upload a 38 mb file using commonist while keeping the thumb. Esby (d) 09:01, 6 June 2012 (UTC)
to be precise, this file (16 069 × 4 141 - 37,91 MB) has a thumb while this one (20 000 × 3 963 38,39 MB) does not have any. Esby (d) 09:13, 6 June 2012 (UTC)
Forgot to mention I had opened a bug on bugzilla [2] Esby (d) 14:05, 6 June 2012 (UTC)

    Usually this occurs with progressive encoded JPEGs. Standard/baseline encoded JPEGs can be rescaled scanline by scanline, but progressives cannot, and the standard converter requires enough memory to hold the entire image. Try resaving it with baseline encoding and similar or slightly higher quality. Dcoetzee (d) 12:27, 6 June 2012 (UTC)

        Hm, COM:MAXTHUMB has the limit lower than that, at 12.5 Megapixels or around 3500 x 3500 px. If possible, this should be updated. Rd232 (d) 17:58, 10 June 2012 (UTC)

            Unrelated, we are talking of jpeg, not of png / tiff files etc. I fixed the issue by reuploading the file saved as non progressive. Esby (d) 13:58, 11 June 2012 (UTC)

This is a duplicate of bug #24228 ?!

(In reply to comment #3)

This is a duplicate of bug #24228 ?!

If so please mark this as "resolved duplicate" because I can't do so.

  • This bug has been marked as a duplicate of bug 24228 ***
  • This bug has been marked as a duplicate of bug 17645 ***