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 575268 - Gtk::StatusIcon::get_geometry cause crashes
Gtk::StatusIcon::get_geometry cause crashes
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.15.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2009-03-13 16:59 UTC by Hubert Figuiere (:hub)
Modified: 2009-04-27 10:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample code (471 bytes, text/x-c++src)
2009-03-13 17:00 UTC, Hubert Figuiere (:hub)
  Details
Patch to add the missing reference (1.25 KB, patch)
2009-04-27 09:02 UTC, Johannes Schmid
committed Details | Review

Description Hubert Figuiere (:hub) 2009-03-13 16:59:08 UTC
Gtk::StatusIcon::get_geometry cause crashes

The program crashes when the returned RefPtr<Screen> goes out of scope.

Will attach a sample code to exhibit the problem.
Comment 1 Hubert Figuiere (:hub) 2009-03-13 17:00:01 UTC
Created attachment 130589 [details]
sample code

Compile with g++ gtkmmbug.cc -o gtkmmbug `pkg-config --cflags --libs gtkmm-2.4`
Comment 2 Hubert Figuiere (:hub) 2009-03-13 17:01:24 UTC
I use gtkmm2-2.15.5


Also if I use the plain C API it does not crash.
Comment 3 Murray Cumming 2009-03-13 17:08:44 UTC
I guess the screen output parameter is just missing a reference.
Comment 4 Johannes Schmid 2009-04-27 09:02:23 UTC
Created attachment 133399 [details] [review]
Patch to add the missing reference

This patch adds a reference to the returned RefPtr<Screen>. Valgrind doesn't report any leak here so I guess it should be ok.
Comment 5 Murray Cumming 2009-04-27 09:20:54 UTC
Yes, that would be normal. Please commit/push to master and gtkmm-2-16.
Comment 6 Johannes Schmid 2009-04-27 09:44:14 UTC
Pushed to master. There is no gtkmm-2-16 branch on git.gnome.org. Leaving the bug open for now.
Comment 7 Murray Cumming 2009-04-27 10:22:30 UTC
Sorry, we just didn't branch yet.