GNOME Bugzilla – Bug 166412
gtkmm/examples/dnd/testdnd crashs
Last modified: 2005-02-14 11:34:07 UTC
Steps to reproduce: 1. Just start the program 2. Drag "drag here" to the dustbin 3. The program starts eating memory until it is killed by the OOM-killer The crash happens in bool DnDWindow::on_image_drag_motion(const Glib::RefPtr<Gdk::DragContext>& context, int, int, guint time) at type_targets targets = context->get_targets(); Stack trace:
+ Trace 55350
Other information: I think the problem is in gtkmm/gdk/gdkmm/dragcontext.cc Glib::StringArrayHandle DragContext::get_targets() const There a GList should be walked to create a std::list ... but something like list = list->next seems to be missing.
This seems to help: --- dragcontext.ccg 13 Feb 2004 18:20:38 -0000 1.5 +++ dragcontext.ccg 6 Feb 2005 10:20:16 -0000 @@ -58,6 +58,7 @@ target = Glib::ScopedPtr<char>(atom_name).get(); //This frees the gchar*. listTargets.push_back(target); + list = list->next; } return listTargets;
Well done. Applied. Thanks. Please attach patches in future, and patch the ChangeLog: http://www.gtkmm.org/bugs.shtml#CreatingPatches
this is showing up in HEAD as: list = list->next(); rather than list = list->next;
Thus proving that patches are best. However, I fixed this yesterday.