Gtk 1.2.7 Problem Found (was More info on the ObjectManager/Gtk segfault)




I found the problem that's causing ObjectManager to segfault when compiled
against gtk 1.2.7.  The problem is located in gtk+-1.2.7/gtk/gtkctree.c,
function gtk_ctree_node_set_row_data_full, starting at line 5186.

Here is the function as it appears in 1.2.7:

void
gtk_ctree_node_set_row_data_full (GtkCTree         *ctree,
                                                 GtkCTreeNode     *node,
                                                 gpointer          data,
                                                 GtkDestroyNotify  destroy)
{
  GtkDestroyNotify dnotify;
  gpointer ddata;

  g_return_if_fail (ctree != NULL);
  g_return_if_fail (GTK_IS_CTREE (ctree));
  g_return_if_fail (node != NULL);

  dnotify = GTK_CTREE_ROW (node)->row.destroy;
  ddata = GTK_CTREE_ROW (node)->row.data;

  GTK_CTREE_ROW (node)->row.data = data;
  GTK_CTREE_ROW (node)->row.destroy = destroy;

  if (dnotify)
    dnotify (ddata);

}

Here's the function as it appears in 1.2.6, the last version that worked
correctly:

void
gtk_ctree_node_set_row_data_full (GtkCTree         *ctree,
                                  GtkCTreeNode     *node,
                                  gpointer          data,
                                  GtkDestroyNotify  destroy)
{

  g_return_if_fail (ctree != NULL);
  g_return_if_fail (GTK_IS_CTREE (ctree));
  g_return_if_fail (node != NULL);

  GTK_CTREE_ROW (node)->row.data = data;
  GTK_CTREE_ROW (node)->row.destroy = destroy;

}

By restoring the function to it's 1.2.6 version, everything works correctly. 
This problem effects gtk 1.2.7 AND the gtk+-1.2.6.i386.rpm that's being
included in the Redhat 6.2 beta.  Like I said before, the Redhat 1.2.6 RPM is
basically a bastardization of 1.2.6 and a prerelease of 1.2.7.

Matthew



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]