[wp-trac] [WordPress Trac] #23127: Media Upload hangs on Crunching on too big image sizes.

WordPress Trac noreply at wordpress.org
Sat Jan 5 22:56:14 UTC 2013


#23127: Media Upload hangs on Crunching on too big image sizes.
-----------------------------+--------------------------
 Reporter:  clubdesign       |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Upload
  Version:  3.5              |   Severity:  normal
 Keywords:                   |
-----------------------------+--------------------------
 If the uploaded file is too big for the Max Memory Limit Setting, then the
 upload is executed, but the image isn`t resized to the set image sizes and
 the frontend get`s stuck on "Crunching". I tracked the error down into the
 core and found out, that the main problem is in the GD library class ( wp-
 includes/class-wp-image-editor-gd.php ) in the load() function.

 Everything works fine before line 91:
 $this->image = @imagecreatefromstring( file_get_contents( $this->file ) );

 So imagecreatefromstring fails because of a lack of memory. But as a chain
 reaction everything else fails afterwards. The library is not loaded and
 sent back, and so on. As a result no id is sent back to the frontend and
 the Loader hangs.

 Maybe there should be any error catching and sending back before this GD
 function, that the frontend receives any error messages and that the
 upload is deleted in case of error.

 Just my thoughts: As this error is a Fatal one, you can`t use any
 Exception stuff, cause there will not be any memory left to execute it.
 Maybe some checking if the id is present before sending the image back to
 crunching?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23127>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list