RE: Unable to catch Gdk::PixbufError
- From: J B C Engelen ewi utwente nl
- To: <internalerror gmail com>, <msameer foolab org>
- Cc: murrayc murrayc com, gtkmm-list gnome org
- Subject: RE: Unable to catch Gdk::PixbufError
- Date: Tue, 20 Nov 2007 18:46:05 +0100
This is the backtrace that I got:
Catchpoint 2 (exception thrown)
0xb6f57065 in __cxa_throw () from /usr/lib/libstdc++.so.6
(gdb) bt
#0 0xb6f57065 in __cxa_throw () from /usr/lib/libstdc++.so.6
#1 0xb7b922e3 in Gdk::PixbufError::throw_func ()
from /usr/lib/libgdkmm-2.4.so.1
#2 0xb7ab64f7 in Glib::Error::throw_exception ()
from /usr/lib/libglibmm-2.4.so.1
#3 0xb7b940af in Gdk::Pixbuf::create_from_file ()
from /usr/lib/libgdkmm-2.4.so.1
#4 0x081dd17f in Inkscape::UI::Dialog::SVGPreview::showImage (this=0xac7bd70,
theFileName= 0xbfdb6fa4) at ui/dialog/filedialogimpl-gtkmm.cpp:208
#5 0x081dd718 in Inkscape::UI::Dialog::SVGPreview::set (this=0xac7bd70,
fileName= 0xbfdb6fa4, dialogType=0)
at ui/dialog/filedialogimpl-gtkmm.cpp:571
#6 0x081ddad5 in Inkscape::UI::Dialog::FileDialogBaseGtk::_updatePreviewCallback (this=0xac7bd54) at ui/dialog/filedialogimpl-gtkmm.cpp:661
-----Original Message-----
From: gtkmm-list-bounces gnome org on behalf of Milosz Derezynski
Sent: Tue 11/20/2007 18:21
To: Mohammed Sameer
Cc: Murray Cumming; gtkmm-list gnome org
Subject: Re: Unable to catch Gdk::PixbufError
@Mohammed: Sorry for the double-post..
What could help is setting a breakpoint on 'throw'.
This is a little tricky inside gdb, at least i haven't figured out a better
way than this one:
- Load the app into gdb
- Start it up one time, or at least let the linker assemble it and then
break with CTRL+C (you will most likely not catch the exact point of when
execution starts but that's really irrelevant, see next step)
- Enter as command into gdb 'catch throw'
- Then restart the app (*still inside gdb*), and produce the exception
This gives usually helpful backtraces with exceptions. The reason I've said
it's tricky is because usually it should be possible to resolve the symbol
'throw' inside libstdc++ normally by preloading the lib into gdb (there's
some command inside gdb to preload shared libs), but in practice i have
never managed yet to do that, it will load about any library yet not
libstdc++ (but i remember it should be theoretically possible, so go figure
but the way above works).
-- Milosz
2007/11/20, Mohammed Sameer <msameer foolab org>:
>
> On Tue, Nov 20, 2007 at 04:42:43PM +0100, Murray Cumming wrote:
> > On Tue, 2007-11-20 at 17:17 +0200, Mohammed Sameer wrote:
> > > On Tue, Nov 20, 2007 at 08:17:36AM +0100, Murray Cumming wrote:
> > > >
> > > > On Mon, 2007-11-19 at 23:26 +0200, Mohammed Sameer wrote:
> > > > > On Mon, Nov 19, 2007 at 07:59:05PM +0100,
> J B C Engelen ewi utwente nl wrote:
> > > > > > Ah ofcourse, sorry. Run Inkscape, and open the "file"->"open..."
> dialog.
> > > > > > The code tries to show a preview of the selected file in the
> file
> > > > > > dialog. Selecting an invalid file (e.g. a 0 byte .jpg file) will
> throw
> > > > > > the exception that is not caught.
> > > > >
> > > > >
> > > > > The only problem is I couldn't reproduce it!!
> > > > > I did touch /tmp/foo.jpg
> > > > >
> > > > > But the exception was caught:
> > > > > ** Message: Gdk::PixbufError in SVGPreview::showImage
> > > >
> > > > JBC, are you using some strange distro? Gentoo maybe? Are you mixing
> > > > compiler versions?
> > >
> > > Can this happen if we compile with -fno-exceptions (Or whatever the
> flag is) ?
> >
> > I don't see how it could throw exceptions if -fno-exceptions is used,
> > but I guess that an exception might not reach the try/catch if one of
> > the libraries was built without -fno-exceptions.
> >
> > But none of the *mm libraries should build if you use -fno-exceptions
> > without using the special --disable-api-exceptios build option, which
> > changes the API slightly. You haven't done that.
>
> I'm not having this problem. I'm only trying to guess ;-)
>
> --
> GPG-Key: 0xA3FD0DF7 - 9F73 032E EAC9 F7AD 951F 280E CB66 8E29 A3FD 0DF7
> Debian User and Developer.
> Homepage: www.foolab.org
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFHQwR/y2aOKaP9DfcRAn08AKClOyL9hi0I9zyxjdw+u9fxh/BsZwCfQ/+m
> 5lxhMXUmM+Z5PaFD4v+dtc8=
> =E+El
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]