Re: Crash during throw_func()



On 10/25/06, Murray Cumming <murrayc murrayc com> wrote:
On Tue, 2006-10-24 at 19:18 -0500, Matt Hoosier wrote:
[snip]
>   std::auto_ptr<Glib::Error> throw_func(GError* gobject)
>   {
>     Glib::Error* e = new Glib::Error(gobject);
>     printf ("checkpoint 1..."); fflush (stdout);
>     std::auto_ptr<Glib::Error> p(e); // this line crashes
>     printf ("checkpoint 2..."); fflush (stdout); // never appears
>     return p;
>   }
>
> Any ideas why the construction of that auto_ptr would fail? I am
> absolutely certain that the Glib::Error gets built; the first
> checkpoint after it shows up.

No, it looks fine. valgrind can probably give clues. Or you could put
the patch somewhere for me to investigate.

I am surprised that no Glib::Error exception is registered for
gnome-vfsmm.

There's a separate Gnome::Vfs::exception [not registered as any kind
of wrapping] which inherits directly from Glib::Exception. Maybe this
should be rearranged to inherit from Glib::Error, but I suppose that
would break backward ABI compatibility.


--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]