Comment 4 for bug 168471

Revision history for this message
Johan Engelen (johanengelen) wrote :

Originator: NO

I have found the location of the bug, but for some reason the standard fix
won't work. I am very much confused. The crash happens in
ui/dialog/filedialogimpl-gtkmm.cpp, function SVGPreview::showImage on the
call "img = Gdk::Pixbuf::create_from_file(fileName);".

I've changed the code to the following:
    Glib::RefPtr<Gdk::Pixbuf> img(NULL);
    try {
        img = Gdk::Pixbuf::create_from_file(fileName);
    }
    catch (Glib::FileError e)
    {
        g_message("caught Glib::FileError in SVGPreview::showImage");
        return;
    }
    catch (Gdk::PixbufError e)
    {
        g_message("Gdk::PixbufError in SVGPreview::showImage");
        return;
    }

But for some reason, *still* the Gdk::PixbufError exception is not caught.
Also catch(...) will not catch it, and the application keeps saying that
'Gdk::PixbufError' is not caught.
What's happening?