Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#35489 new defect (bug)

Im having an issue with WP_Image_Editor_Imagick

Reported by: stoi2m1's profile stoi2m1 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4.1
Component: Media Keywords:
Focuses: Cc:


Im using this following to set up an editor to create thumbs for an image I am uploading:
$editor = wp_get_image_editor( $file );

Some images are crashing my script causing a 500 error.

I tracked the issue down to the WP_Image_Editor_Imagick class specifically within the crop_image function.

From what I could tell this is the line causing my 500 error
at line 349 of class-wp-image-editor-imagick.php

$this->image->cropImage( $src_w, $src_h, $src_x, $src_y );

I fixed the issue in a band-aid class I am temporarily using removing the WP class and using my own with the wp_image_editors filter

within my added class I am using I added the following line
$this->image->setResourceLimit(6, 1); set max threads to 1

I added it just before
$this->image->cropImage( $src_w, $src_h, $src_x, $src_y );

Change History (1)

#1 @kirasong
8 years ago

I've seen this before on a server whose Imagick -- or rather -- ImageMagick -- is not well compiled, or has system library problems with running ImageMagick/convert with more than one thread.

I'd suggest troubleshooting ImageMagick/convert on a local level, outside of WordPress, to see if you find the issue.

Note: See TracTickets for help on using tickets.