changeset 18148:bc1809fe55e4 stable

Do not reduce Magick::ErrorCoder to warning, issue an error like other errors. * __magick_read__.cc (read_file): the Magick::ErrorCoder is issued by the different coders and is being caught as a warning without any apparent reason. A simple warning when no image was actually read leads to a segfault when accessing the elements of imvec, which currently happens in F__magick_finfo__ An alternative would be to check the size of imvec, but really, an error here should cause an error. GraphicsMagick documentation says that warnings are for `suspected but completed' while errors are for `failed', so if anything is issuing an error but still read the image and we should continue, then it needs to be fixed upstream to throw a Magick::WarningCoder instead.
author Carnë Draug <carandraug@octave.org>
date Wed, 18 Dec 2013 17:47:21 +0000
parents f4b7edf75f04
children 91a3858ef8cf
files libinterp/dldfcn/__magick_read__.cc
diffstat 1 files changed, 0 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/dldfcn/__magick_read__.cc	Tue Dec 17 23:57:59 2013 +0100
+++ b/libinterp/dldfcn/__magick_read__.cc	Wed Dec 18 17:47:21 2013 +0000
@@ -652,13 +652,6 @@
     {
       warning ("Magick++ warning: %s", w.what ());
     }
-  catch (Magick::ErrorCoder& e)
-    {
-      // XXX: why is this error being caught as a warning? It has always
-      //      been like this (function was added the first time to the
-      //      Octave Forge image package with cset d756a7b6d533)
-      warning ("Magick++ coder error: %s", e.what ());
-    }
   catch (Magick::Exception& e)
     {
       error ("Magick++ exception: %s", e.what ());