GNOME Bugzilla – Bug 94829
Lifetime issues again
Last modified: 2004-12-22 21:47:04 UTC
Here is a copy/paste of my conversation with Daniel on IRC and he asked me to file a bug: <madmaxer> yesterday i had a very strange crash in my app <madmaxer> you saw gex some time ago, remember? <danielk> yes <madmaxer> so, it has hpaned, inside right pane there's a vbox <madmaxer> this vbox contains treeview, hbox, and statusbar <madmaxer> now the hbox: it is a class derived from hbox actually <madmaxer> in ctor i dynamically create two managed buttons and pack them into the hbox <madmaxer> now, when i close the application -> segfault <madmaxer> so i changed these buttons from dynamically allocated to class members -> no more crash <madmaxer> all that with g++ 3.2 and gtkmm 1.3.23 <danielk> ah yes <danielk> lifetime issues <madmaxer> but this crash was only if i right clicked the button so it had focus <madmaxer> when button wasn't focussed on close there was no crash <danielk> is there anything connected to the button? <madmaxer> is that description meaningful for you in any manner? <danielk> any code accessing it? <madmaxer> yes, but it didn't matter, i removed all signals and nothing changed <madmaxer> ah, i forgot, the crash was quite strange <danielk> that's weird <danielk> tell <madmaxer> because actuall segfault was in gtk_paned_calculate_position or something like that <madmaxer> i don't remember exact function's name <madmaxer> this function was called somewhere from the dtor of one of objects <danielk> hmm <madmaxer> i tried to recreate a simple sample code showing this bug but i failed <danielk> interesting <madmaxer> but i think if it was some bug in my code changing objects from dynamic on heap to class members would not solve the problem? <danielk> did you include the paned in your sample code? <madmaxer> yes <madmaxer> but in my application i have many paneds, h/vboxes and other stuff <madmaxer> my gui is already very complex, so i wasn't patient enough to find which element exactly causes the problem <danielk> what's funny about this is that lifetime issues usually occur with class members and go away if you manage them, not the other way around <madmaxer> to be honest i had similar case some time ago while i was still using gcc 2.95 <danielk> I don't think it's a compiler problem <madmaxer> but then it happened together with other stability problems i reported <madmaxer> and then i thought it was a compiler issue <madmaxer> but now it happened again <danielk> gtkmm lifetime handling is horribly complex. Murray worked on it recently, so I don't even know the current state. <danielk> It's full of work-arounds and special casing <madmaxer> not good <danielk> file a bug <madmaxer> but murray will say "provide simple as possible code showing the bug" and i won't be able to do it <danielk> that's right, but I'd like to have this recorded somewhere <danielk> even if we don't find a quick fix <madmaxer> if you can wait some time i'll check something <danielk> no rush <madmaxer> i downloaded a release tarball of my app from sf and i will build it <madmaxer> to see if it also crases in the same way <madmaxer> i've found the bug very recently, but it may be there since a long time I failed to recreate a simple example showing this bug, but if you want to investigate the problem please go here: http://sourceforge.net/project/showfiles.php?group_id=52990 and get Gex 0.0.6B or earlier (0.0.6B is for Gtkmm 1.2.23). To make Gex segfault run it, if command line is not visible choose menu: View/Command Line. Then right click the small 'Run terminal' icon to focus it and close the application. It will segfault.
Please submit a bug report. I don't want to read an irc thread. And yes, if you don't give me sensible example code then this bug will be closed.
Then don't read it, I don't care. But this conversation describes this bug. Daniel asked me to submit this so he can investigate this later, but of course you think you're the only one that can make decisions and you're as friendly and helpful as usually...
Please test the latest release.
It still happens with Gtkmm 1.3.24.
Closed because the bug is not clearly defined and there is no proof that any bug exists.