montera34 / pageonex

PageOneX. Analyzing front pages
http://pageonex.com
GNU Affero General Public License v3.0
54 stars 13 forks source link

Display view crashed: "Magick::ImageMagickError (Empty input file..." #171

Closed numeroteca closed 10 years ago

numeroteca commented 10 years ago

I get the following log in this thread http://pageonex.com/numeroteca/corrupcion-espana-julio-2013/ :

Completed 500 Internal Server Error in 41ms Magick::ImageMagickError (Empty input file app/assets/images/kiosko/elmundo/elmundo-2013-07-07.jpg' @ error/jpeg.c/EmitMessage/236): app/models/image.rb:54:inread' app/models/image.rb:54:in thumbnail' app/models/threadx.rb:152:inblock (2 levels) in generate_composite_images' app/models/threadx.rb:151:in collect' app/models/threadx.rb:151:inblock in generate_composite_images' app/models/threadx.rb:149:in generate_composite_images' app/controllers/coding_controller.rb:87:indisplay'

The file app/assets/images/kiosko/elmundo/elmundo-2013-07-07.jpg is empty.

I don't know if related, but also in dev, another crash because of an image http://dev.pageonex.com/numeroteca/caja-madrid-escandalo/

numeroteca commented 10 years ago

I downloaded manually the file from the original http://img.kiosko.net/2013/07/07/es/elmundo.750.jpg with wget and then substitute. I left the former file under the name of elmundo-2013-07-07-notworking.jpg The thread now works.

What caused the error?

Might be related to #170, some wrong Elmundo files are in the thread.

rahulbot commented 10 years ago

Not sure I can do more than protect against the error being user-facing. I bet you're right that #170 is related, so hopefully the fix for that will help avoid this happening again.