Re: double free in Assistant's destructor =?ISO-8859-1?Q?=28API=A0v2=2E4=29?=



On Thu, 2012-03-01 at 09:23 +0100, Yann Leydier wrote:
> On 29/02/12 20:14, José Alburquerque wrote:
> > Are the versions that you're using on linux and windows the same?
> 
> Oh, with linux updating automatically, I did not see that it's not the 
> same version anymore. Linux: 2.24.2, Win32: 2.22.0
> 
> >> The crash occurs in an internal class of sigc++: a signal seems to be
> >> disconnected twice since the debuger displays that a function pointer of
> >> value 0xfeefee is called with another pointer of address 0xfeefee as
> >> argument.
> > Can you provide a small test case with the crash?
> 
> I'm working on it but this is unfortunatly unlikely… :o(
> The Assistant contains custom Widgets (that work perfectly in other 
> applications, both on Linux and Win32).
> 
> Moreover, closing the Assistant before the end (click on "Cancel") 
> crashes only after a couple of pages. That's why I asked if there are 
> limitations: the Widgets I use if the pages are ok, so I wondered if 
> there were conditions on the destructor order (e.g.: managed pointed 
> widgets vs plain member widgets) or on the use of ActionGroups.

Destruction order can be a factor, but only if the scoping of the
widgets is such that they are destroyed too early or if the widgets are
manually destroyed before they should be.  Otherwise it should not make
much difference.

> 
> >> Is calling "delete this" legit on a Widget?
> > Sure, probably when the widget will no longer be used.  Using
> > Gtk::manage() is probably easier to ensure that the widget is
> > automatically destroyed.
> 
> How can an I "manage" an Assistant? As far as I know, it is not a child 
> of another widget…

It's probably not possible to use manage() on an assistant since it's a
toplevel widget.  However, it is possible to scope it in such a way that
it is automatically destroyed when it is no longer needed.  See the
following section in the online book.

http://developer.gnome.org/gtkmm-tutorial/unstable/sec-memory-widgets.html.en

> 
> Thanks
> yann
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list

-- 
José



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