After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 94829 - Lifetime issues again
Lifetime issues again
Status: RESOLVED NOTABUG
Product: gtkmm
Classification: Bindings
Component: general
2.0
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2002-10-04 06:30 UTC by Jarek Dukat
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jarek Dukat 2002-10-04 06:30:29 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.
Comment 1 Murray Cumming 2002-10-04 18:46:04 UTC
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.
Comment 2 Jarek Dukat 2002-10-04 19:12:55 UTC
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...
Comment 3 Murray Cumming 2002-10-09 09:23:11 UTC
Please test the latest release.
Comment 4 Jarek Dukat 2002-10-10 19:27:11 UTC
It still happens with Gtkmm 1.3.24.
Comment 5 Murray Cumming 2002-10-10 19:44:47 UTC
Closed because the bug is not clearly defined and there is no proof
that any bug exists.