GNOME Bugzilla – Bug 575268
Gtk::StatusIcon::get_geometry cause crashes
Last modified: 2009-04-27 10:22:30 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.
Created attachment 130589 [details] sample code Compile with g++ gtkmmbug.cc -o gtkmmbug `pkg-config --cflags --libs gtkmm-2.4`
I use gtkmm2-2.15.5 Also if I use the plain C API it does not crash.
I guess the screen output parameter is just missing a reference.
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.
Yes, that would be normal. Please commit/push to master and gtkmm-2-16.
Pushed to master. There is no gtkmm-2-16 branch on git.gnome.org. Leaving the bug open for now.
Sorry, we just didn't branch yet.