Re: Gtk::SpinButton crash



Hi Kjell,

Many thanks for sending me your versions of those files. The good news is that with only the exception of some commented sections, your versions are identical to mine. Both versions exhibit the same behaviour (and unfortunately, the same problems).

I'm wondering now if I've been fooling myself to think that this SpinButton/Adjuster issue is somehow related to the previous one that got solved. For various reasons it does look a bit similar - but I'm now starting to think that the SpinButton/Adjuster problem is actually a clearly defined issue in its own right. The reason I'm wondering is that this sequence crashes:-

        Create a SpinButton
        Create an Adjustment
        Attach the Adjustment to the SpinButton
        Delete the Adjustment
Delete the SpinButton // Remember that the (deleted) Adjustment is still attached !!

OTOH this sequence doesn't crash:-

        Create a SpinButton
        Create an Adjustment
        Attach the Adjustment to the SpinButton
        Delete the SpinButton  // Adjustment hasn't been deleted yet !!
        Delete the Adjustment

But wait a minute... during my tests I discovered some evidence to suggest that this sequence wouldn't crash either:-

        Create a SpinButton
        Create an Adjustment
        Attach the Adjustment to the SpinButton
        Detach the Adjustment (using 'Gtk::SpinButton::unset_adjustment()')

        Delete the Adjustment  // These two deletions can now
        Delete the SpinButton   // get done (safely) in either order

So I guess I'm questioning the safety of deleting a Gtk::SpinButton whilst it has an (invalid) Gtk::Adjustment attached. I don't know enough about the gtkmm spec to know whether that should (or should not) be safe. It certainly isn't safe at present, from what I can tell. Would it help for me to try the same thing with a plain GTK+ app? If it's safe to do with GTK+ I'd assume it should also be safe with gtkmm....

John


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