I am getting this error instead of a thumbnail rendering of SVG files on my MediaWikis:
Error creating thumbnail: ERROR: meta.c (179): wmf_header_read: this isn't a wmf file convert: Delegate failed `"wmf2svg" -o "%o" "%i"'. convert: unable to open image `/tmp/magick-XXn4EQJ3': No such file or directory. convert: unable to load module `/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/svg.la': libdbus-1.so.3: failed to map segment from shared object: Cannot allocate memory. convert: unable to open file `/tmp/magick-XXn4EQJ3': No such file or directory. convert: missing an image filename `PNG:/tmp/transform_402f06e-1.png'.
Why is MediaWiki trying to treat the SVG as a "wmf" file?
I am getting this on both MW1.18.1 and MW1.19.2 on my shared Web hosting wikis (hosted at Dathorn.com).
ImageMagick v 6.2.8 is installed and converts an svg to png just fine via command line.
Any ideas what is wrong?
Thanks, Roger You can see the problem and experiment at my temporary fresh MW1.19.2 install at http://www.eslpedia.com/File:Darknight.svg. (To avoid potential confusion, let me just note that I am serving a plain index.html instead of the wiki at eslpedia.com/ (no filename) to redirect any users who gets lost there to my production site of a similar domain name.)
On 31/10/12 16:08, roger@rogerchrisman.com wrote:
I am getting this error instead of a thumbnail rendering of SVG files on my MediaWikis:
Error creating thumbnail: ERROR: meta.c (179): wmf_header_read: this isn't a wmf file convert: Delegate failed `"wmf2svg" -o "%o" "%i"'. convert: unable to open image `/tmp/magick-XXn4EQJ3': No such file or directory. convert: unable to load module `/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/svg.la': libdbus-1.so.3: failed to map segment from shared object: Cannot allocate memory. convert: unable to open file `/tmp/magick-XXn4EQJ3': No such file or directory. convert: missing an image filename `PNG:/tmp/transform_402f06e-1.png'.
Why is MediaWiki trying to treat the SVG as a "wmf" file?
It's not, that's just convert checking to see if the file is a WMF file, which it isn't, so that's all fine. It then runs out of memory. You can increase $wgMaxShellMemory to fix it.
-- Tim Starling
Tim, EXCELLENT. I experimented and found a $wgMaxShellMemory value that works. Here's what I put in my LocalSettings.php and now SVG thumbnailing WORKS:
## SVG thumbnailing requires more memory (Roger 2012.10.31) ## Maximum amount of virtual memory available to shell processes ## under linux, in KB. #$wgMaxShellMemory = 102400; //102MB fails #$wgMaxShellMemory = 200000; //200MB works on some $wgMaxShellMemory = 300000; //300MB WORKS
Thanks! Roger :-)
On Tue, Oct 30, 2012 at 10:50 PM, Tim Starling tstarling@wikimedia.orgwrote:
On 31/10/12 16:08, roger@rogerchrisman.com wrote:
I am getting this error instead of a thumbnail rendering of SVG files on
my
MediaWikis:
Error creating thumbnail: ERROR: meta.c (179): wmf_header_read: this
isn't
a wmf file convert: Delegate failed `"wmf2svg" -o "%o" "%i"'. convert: unable to open image `/tmp/magick-XXn4EQJ3': No such file or directory. convert: unable to load module `/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/svg.la':
libdbus-1.so.3:
failed to map segment from shared object: Cannot allocate memory. convert: unable to open file `/tmp/magick-XXn4EQJ3': No such file or directory. convert: missing an image filename `PNG:/tmp/transform_402f06e-1.png'.
Why is MediaWiki trying to treat the SVG as a "wmf" file?
It's not, that's just convert checking to see if the file is a WMF file, which it isn't, so that's all fine. It then runs out of memory. You can increase $wgMaxShellMemory to fix it.
-- Tim Starling
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org