0.5.26
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 6 Mar 2006 03:56:09 +0000 (03:56 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 6 Mar 2006 03:56:09 +0000 (03:56 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1574 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ChangeLog
ltt/branches/poly/configure.in
ltt/branches/poly/facilities/Makefile.am
ltt/branches/poly/facilities/user_generic.xml [new file with mode: 0644]
ltt/branches/poly/ltt/tracefile.c
ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c
ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c
ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c
ltt/branches/poly/lttv/modules/gui/detailedevents/events.c

index cb342b118c559cf89c108df93e3a9245603d901d..0175fcaf3cd5f8adf38e1141dcb2361e288d79ea 100644 (file)
@@ -1,5 +1,8 @@
 LinuxTraceToolkit ChangeLog
 
+05/03/2006     LTTV 0.8.26
+                                               Add mouse scroll support.
+                                               Add user_generic.xml facility.
 01/03/2006     LTTV 0.8.25
                                                Fix process end of life in state.c
 28/02/2006     LTTV 0.8.24
index 2285bf68bf20866cd464776440ba2c889c953747..61ca6f79ae53f6c28cc04096a2d49d95f37f2430 100644 (file)
@@ -23,7 +23,7 @@
 AC_PREREQ(2.57)
 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
 #AC_WITH_LTDL  # not needed ?
-AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.25-01032006)
+AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.26-05032006)
 AM_CONFIG_HEADER(config.h)
 AM_PROG_LIBTOOL
 
index 510a89ea95b503f7b4aa1b011626cf5abcd48ec7..c5e6f0db99c53509a44a35de5554cc0551393d74 100644 (file)
@@ -14,7 +14,8 @@ network.xml \
 process.xml \
 socket.xml \
 statedump.xml \
-timer.xml
+timer.xml \
+user_generic.xml
 
 facilities_DATA = \
 core.xml \
@@ -31,7 +32,8 @@ network.xml \
 process.xml \
 socket.xml \
 statedump.xml \
-timer.xml
+timer.xml \
+user_generic.xml
 
 
 facilitiesdir = $(pkgdatadir)/facilities
diff --git a/ltt/branches/poly/facilities/user_generic.xml b/ltt/branches/poly/facilities/user_generic.xml
new file mode 100644 (file)
index 0000000..d463194
--- /dev/null
@@ -0,0 +1,15 @@
+<facility name=user_generic>
+  <description>Generic user space facility</description>
+       
+  <event name=string>
+       <description>Takes a string from user space</description>
+               <field name="data"><string/></field>
+  </event>
+
+  <event name=string_pointer>
+       <description>Takes a string and pointer from user space</description>
+               <field name="string"><string/></field>
+               <field name="pointer"><pointer/></field>
+  </event>
+       
+</facility>
index 79063373e838d6e0f060f0767c850bcb860c64fd..a1e19a7fae56871a6d0889a6101c35ce8f760780 100644 (file)
@@ -1932,7 +1932,7 @@ void ltt_update_event_size(LttTracefile *tf)
     }
   } else {
     if(!f->exists) {
-      g_error("Unknown facility %hhu (0x%hhx) in tracefile %s",
+      g_warning("Unknown facility %hhu (0x%hhx) in tracefile %s",
           tf->event.facility_id,
           tf->event.facility_id,
           g_quark_to_string(tf->name));
@@ -1943,7 +1943,7 @@ void ltt_update_event_size(LttTracefile *tf)
       ltt_facility_eventtype_get(f, tf->event.event_id);
 
     if(!event_type) {
-      g_error("Unknown event id %hhu in facility %s in tracefile %s",
+      g_warning("Unknown event id %hhu in facility %s in tracefile %s",
           tf->event.event_id,
           g_quark_to_string(f->name),
           g_quark_to_string(tf->name));
@@ -1972,7 +1972,12 @@ void ltt_update_event_size(LttTracefile *tf)
 facility_error:
 event_type_error:
 event_id_error:
-  tf->event.data_size = 0;
+       if(tf->event.event_size == 0xFFFF) {
+               g_error("Cannot jump over an unknown event bigger than 0xFFFE bytes");
+       }
+       /* The facility is unknown : use the kernel information about this event
+        * to jump over it. */
+  tf->event.data_size = tf->event.event_size;
 }
 
 
index 47ad080bfb46f9cc91ce2ccc92ddaebe3ae9bf3d..ad1e5fb77a89ebbc8f3f6294c4d99b92ace26898 100644 (file)
@@ -47,6 +47,38 @@ header_size_allocate(GtkWidget *widget,
   return 0;
 }
 
+gboolean cfv_scroll_event(GtkWidget *widget, GdkEventScroll *event,
+               gpointer data)
+{
+  ControlFlowData *control_flow_data = (ControlFlowData*)data;
+       unsigned int cell_height =
+               get_cell_height(
+                               GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget));
+       gdouble new;
+
+  switch(event->direction) {
+    case GDK_SCROLL_UP:
+                       {
+                               new = gtk_adjustment_get_value(control_flow_data->v_adjust) 
+                                                                                                                                       - cell_height;
+                       }
+      break;
+    case GDK_SCROLL_DOWN:
+                       {
+                               new = gtk_adjustment_get_value(control_flow_data->v_adjust) 
+                                                                                                                                       + cell_height;
+                       }
+      break;
+               default:
+                       return FALSE;
+  }
+       if(new >= control_flow_data->v_adjust->lower &&
+                       new <= control_flow_data->v_adjust->upper 
+                                       - control_flow_data->v_adjust->page_size)
+               gtk_adjustment_set_value(control_flow_data->v_adjust, new);
+       return TRUE;
+}
+
 
 /*****************************************************************************
  *                     Control Flow Viewer class implementation              *
@@ -98,6 +130,15 @@ guicontrolflow(Tab *tab)
                                 GTK_ADJUSTMENT(
                                    control_flow_data->v_adjust));
 
+  g_signal_connect (G_OBJECT(process_list_widget),
+        "scroll-event",
+        G_CALLBACK (cfv_scroll_event),
+        (gpointer)control_flow_data);
+        g_signal_connect (G_OBJECT(drawing_area),
+        "scroll-event",
+        G_CALLBACK (cfv_scroll_event),
+        (gpointer)control_flow_data);
+       
   g_signal_connect (G_OBJECT(control_flow_data->process_list->button),
         "size-allocate",
         G_CALLBACK(header_size_allocate),
index 84671ebc74d402c63eebdf61914aedd4c93a9ca1..08f6cc545d38a39712f7b405344b6922769d314d 100644 (file)
@@ -1030,6 +1030,7 @@ Drawing_t *drawing_construct(ControlFlowData *control_flow_data)
         G_CALLBACK (button_press_event),
         (gpointer)drawing);
   
+
   gtk_widget_show(drawing->ruler);
   gtk_widget_show(drawing->padding);
   gtk_widget_show(drawing->ruler_hbox);
index c1c9ad47c45edab3b8bf5887ec2889d8dff5ed5c..6edb0c2c4390ff956ccd28e19fc49bf7fa39ab2e 100644 (file)
@@ -141,6 +141,30 @@ void destroy_hash_key(gpointer key);
 void destroy_hash_data(gpointer data);
 
 
+gboolean scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
+{
+  ControlFlowData *control_flow_data = 
+      (ControlFlowData*)g_object_get_data(
+                G_OBJECT(widget),
+                "control_flow_data");
+  Drawing_t *drawing = control_flow_data->drawing;
+       unsigned int cell_height =
+               get_cell_height(GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget));
+
+  switch(event->direction) {
+    case GDK_SCROLL_UP:
+      gtk_adjustment_set_value(control_flow_data->v_adjust,
+        gtk_adjustment_get_value(control_flow_data->v_adjust) - cell_height);
+      break;
+    case GDK_SCROLL_DOWN:
+      gtk_adjustment_set_value(control_flow_data->v_adjust,
+        gtk_adjustment_get_value(control_flow_data->v_adjust) + cell_height);
+      break;
+  }
+       return TRUE;
+}
+
+
 static void update_index_to_pixmap_each(ProcessInfo *key,
                                         HashedProcessData *value,
                                         ProcessList *process_list)
index 8a05d9c4246d71a0b9acb7b3ea692343171b2d51..985044ebc8e6000bd133daa1321ea6b1b54e4a46 100644 (file)
@@ -74,7 +74,7 @@
 #endif
 
 #define abs(a) (((a)<0)?(-a):(a))
-
+#define max(a,b) ((a)>(b)?(a):(b))
 
 /** Array containing instanced objects. Used when module is unloaded */
 static GSList *g_event_viewer_data_list = NULL ;
@@ -179,6 +179,7 @@ static void tree_v_size_request_cb (GtkWidget *widget,
 static void tree_v_cursor_changed_cb (GtkWidget *widget, gpointer data);
 static void tree_v_move_cursor_cb (GtkWidget *widget, GtkMovementStep arg1,
     gint arg2, gpointer data);
+static void tree_v_scroll_handler (GtkWidget *widget, GdkEventScroll *event, gpointer data);
 static gboolean key_handler(GtkWidget *widget, GdkEventKey *event,
     gpointer user_data);
 
@@ -319,6 +320,10 @@ gui_events(Tab *tab)
       G_CALLBACK(key_handler),
       event_viewer_data);
 
+  g_signal_connect (G_OBJECT(event_viewer_data->tree_v), "scroll-event",
+      G_CALLBACK(tree_v_scroll_handler),
+      event_viewer_data);
+
   // Use on each column!
   //gtk_tree_view_column_set_sizing(event_viewer_data->tree_v,
   //GTK_TREE_VIEW_COLUMN_FIXED);
@@ -692,6 +697,7 @@ void tree_v_move_cursor_cb (GtkWidget *widget,
   if(lttvwindow_events_request_pending(event_viewer_data->tab)) return;
   
   /* If no prior position... */
+#if 0
   if(ltt_time_compare(
         lttv_traceset_context_position_get_time(
           event_viewer_data->currently_selected_position),
@@ -705,7 +711,7 @@ void tree_v_move_cursor_cb (GtkWidget *widget,
     return;
 
   }
-
+#endif //0
   
   g_debug("tree view move cursor : arg1 is %u and arg2 is %d",
       (guint)arg1, arg2);
@@ -724,17 +730,38 @@ void tree_v_move_cursor_cb (GtkWidget *widget,
           /* Must get down one event and select the last one */
           gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(
                 GTK_TREE_VIEW(event_viewer_data->tree_v)));
-          event_viewer_data->update_cursor = FALSE;
-          gtk_adjustment_set_value(event_viewer_data->vadjust_c,
-              gtk_adjustment_get_value(event_viewer_data->vadjust_c) + 1);
-          event_viewer_data->update_cursor = TRUE;
-          path = gtk_tree_path_new_from_indices(
-              event_viewer_data->pos->len - 1, -1);
-          gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
-                                   path, NULL, FALSE);
-          gtk_tree_path_free(path);
-        }
-      }
+                                       event_viewer_data->update_cursor = FALSE;
+                                       gtk_adjustment_set_value(event_viewer_data->vadjust_c,
+                                                       gtk_adjustment_get_value(event_viewer_data->vadjust_c) + 1);
+                                       event_viewer_data->update_cursor = TRUE;
+                                       if(event_viewer_data->pos->len > 0) {
+                                               path = gtk_tree_path_new_from_indices(
+                                                               max(0, event_viewer_data->pos->len - 1), -1);
+                                               if(path) {
+                                                       gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
+                                                                                                                                                        path, NULL, FALSE);
+                                                       gtk_tree_path_free(path);
+                                               }
+                                       }
+                               }
+                       } else {
+                               /* Must get down one event and select the last one */
+                               gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(
+                                                       GTK_TREE_VIEW(event_viewer_data->tree_v)));
+                               event_viewer_data->update_cursor = FALSE;
+                               gtk_adjustment_set_value(event_viewer_data->vadjust_c,
+                                               gtk_adjustment_get_value(event_viewer_data->vadjust_c) + 1);
+                               event_viewer_data->update_cursor = TRUE;
+                               if(event_viewer_data->pos->len > 0) {
+                                       path = gtk_tree_path_new_from_indices(
+                                                       max(0, event_viewer_data->pos->len - 1), -1);
+                                       if(path) {
+                                               gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
+                                                                                                                                                path, NULL, FALSE);
+                                               gtk_tree_path_free(path);
+                                       }
+                               }
+                       }
 
     } else {
       if(event_viewer_data->pos->len > 0) {
@@ -748,17 +775,45 @@ void tree_v_move_cursor_cb (GtkWidget *widget,
           /* Must get up one event and select the first one */
           gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(
                 GTK_TREE_VIEW(event_viewer_data->tree_v)));
-          event_viewer_data->update_cursor = FALSE;
-          gtk_adjustment_set_value(event_viewer_data->vadjust_c,
-              gtk_adjustment_get_value(event_viewer_data->vadjust_c) - 1);
-          event_viewer_data->update_cursor = TRUE;
-          path = gtk_tree_path_new_from_indices(
-              0, -1);
-          gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
-                                   path, NULL, FALSE);
-          gtk_tree_path_free(path);
-        }
-      }
+                                       event_viewer_data->update_cursor = FALSE;
+                                       gtk_adjustment_set_value(event_viewer_data->vadjust_c,
+                                                       gtk_adjustment_get_value(event_viewer_data->vadjust_c) - 1);
+                                       event_viewer_data->update_cursor = TRUE;
+                                       if(event_viewer_data->pos->len > 0) {
+                                               path = gtk_tree_path_new_from_indices(
+                                                               0, -1);
+                                               if(path) {
+                                                       gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
+                                                                                                                                                        path, NULL, FALSE);
+                                                       gtk_tree_path_free(path);
+                                               }
+                                       }
+                               }
+                       } else {
+                               /* Must get up one event and select the first one */
+                               g_printf("a\n");
+                               gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(
+                                                       GTK_TREE_VIEW(event_viewer_data->tree_v)));
+                               g_printf("b\n");
+                               event_viewer_data->update_cursor = FALSE;
+                               g_printf("c\n");
+                               gtk_adjustment_set_value(event_viewer_data->vadjust_c,
+                                               gtk_adjustment_get_value(event_viewer_data->vadjust_c) - 1);
+                               g_printf("d\n");
+                               event_viewer_data->update_cursor = TRUE;
+                               if(event_viewer_data->pos->len > 0) {
+                                       path = gtk_tree_path_new_from_indices(
+                                                       0, -1);
+                               g_printf("e\n");
+                                       if(path) {
+                                               gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
+                                                                                                                                                path, NULL, FALSE);
+                               g_printf("f\n");
+                                               gtk_tree_path_free(path);
+                               g_printf("g\n");
+                                       }
+                               }
+                       }
     }
     break;
   case GTK_MOVEMENT_PAGES:
@@ -774,21 +829,38 @@ void tree_v_move_cursor_cb (GtkWidget *widget,
           /* Must get down one page and select the last one */
           gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(
                 GTK_TREE_VIEW(event_viewer_data->tree_v)));
-          
-          event_viewer_data->update_cursor = FALSE;
-          gtk_adjustment_set_value(event_viewer_data->vadjust_c,
-              gtk_adjustment_get_value(event_viewer_data->vadjust_c) + 2);
-          event_viewer_data->update_cursor = TRUE;
-
-          path = gtk_tree_path_new_from_indices(
-              event_viewer_data->pos->len - 1, -1);
-          gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
-                                   path, NULL, FALSE);
-          gtk_tree_path_free(path);
-
-        }
-      }
-
+                                       event_viewer_data->update_cursor = FALSE;
+                                       gtk_adjustment_set_value(event_viewer_data->vadjust_c,
+                                                       gtk_adjustment_get_value(event_viewer_data->vadjust_c) + 2);
+                                       event_viewer_data->update_cursor = TRUE;
+                                       if(event_viewer_data->pos->len > 0) {
+                                               path = gtk_tree_path_new_from_indices(
+                                                               event_viewer_data->pos->len - 1, -1);
+                                               if(path) {
+                                                       gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
+                                                                                                                                                        path, NULL, FALSE);
+                                                       gtk_tree_path_free(path);
+                                               }
+                                       }
+                               }
+                       } else {
+                       /* Must get down one page and select the last one */
+                               gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(
+                                                       GTK_TREE_VIEW(event_viewer_data->tree_v)));
+                               event_viewer_data->update_cursor = FALSE;
+                               gtk_adjustment_set_value(event_viewer_data->vadjust_c,
+                                               gtk_adjustment_get_value(event_viewer_data->vadjust_c) + 2);
+                               event_viewer_data->update_cursor = TRUE;
+                               if(event_viewer_data->pos->len > 0) {
+                                       path = gtk_tree_path_new_from_indices(
+                                                       event_viewer_data->pos->len - 1, -1);
+                                       if(path) {
+                                               gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
+                                                                                                                                                path, NULL, FALSE);
+                                               gtk_tree_path_free(path);
+                                       }
+                               }
+                       }
     } else {
       /* Move one page up */
       if(event_viewer_data->pos->len > 0) {
@@ -801,20 +873,44 @@ void tree_v_move_cursor_cb (GtkWidget *widget,
           /* Must get up one page and select the first one */
           gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(
                 GTK_TREE_VIEW(event_viewer_data->tree_v)));
-          
-          event_viewer_data->update_cursor = FALSE;
-          gtk_adjustment_set_value(event_viewer_data->vadjust_c,
-              gtk_adjustment_get_value(event_viewer_data->vadjust_c) - 2);
-          event_viewer_data->update_cursor = TRUE;
-
-          path = gtk_tree_path_new_from_indices(
-              0, -1);
-          gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
-                                   path, NULL, FALSE);
-          gtk_tree_path_free(path);
-        }
-      }
-
+                                       event_viewer_data->update_cursor = FALSE;
+                                       gtk_adjustment_set_value(event_viewer_data->vadjust_c,
+                                                       gtk_adjustment_get_value(event_viewer_data->vadjust_c) - 2);
+                                       event_viewer_data->update_cursor = TRUE;
+                                       if(event_viewer_data->pos->len > 0) {
+                                               path = gtk_tree_path_new_from_indices(
+                                                               0, -1);
+                                               if(path) {
+                                                       gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
+                                                                                                                                                        path, NULL, FALSE);
+                                                       gtk_tree_path_free(path);
+                                               }
+                                       }
+                               }
+                       }       else {
+                               /* Must get up one page and select the first one */
+                               printf("A\n");
+                               gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(
+                                                       GTK_TREE_VIEW(event_viewer_data->tree_v)));
+                               printf("B\n");
+                               event_viewer_data->update_cursor = FALSE;
+                               gtk_adjustment_set_value(event_viewer_data->vadjust_c,
+                                               gtk_adjustment_get_value(event_viewer_data->vadjust_c) - 2);
+                               printf("C\n");
+                               event_viewer_data->update_cursor = TRUE;
+                               if(event_viewer_data->pos->len > 0) {
+                                       path = gtk_tree_path_new_from_indices(
+                                                       0, -1);
+                               printf("D\n");
+                                       if(path) {
+                                               gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
+                                                                                                                                                path, NULL, FALSE);
+                               printf("E\n");
+                                               gtk_tree_path_free(path);
+                               printf("F\n");
+                                       }
+                               }
+                       }
     }
     break;
   default:
@@ -942,6 +1038,25 @@ void tree_v_move_cursor_cb (GtkWidget *widget,
 #endif //0
 }
 
+
+gboolean tree_v_scroll_handler (GtkWidget *widget, GdkEventScroll *event, gpointer data)
+{
+       EventViewerData *event_viewer_data = (EventViewerData*) data;
+       Tab *tab = event_viewer_data->tab;
+
+       switch(event->direction) {
+               case GDK_SCROLL_UP:
+                       gtk_adjustment_set_value(event_viewer_data->vadjust_c,
+                               gtk_adjustment_get_value(event_viewer_data->vadjust_c) - 1);
+                       break;
+               case GDK_SCROLL_DOWN:
+                       gtk_adjustment_set_value(event_viewer_data->vadjust_c,
+                               gtk_adjustment_get_value(event_viewer_data->vadjust_c) + 1);
+                       break;
+       }
+       return TRUE;
+}
+
 void tree_v_cursor_changed_cb (GtkWidget *widget, gpointer data)
 {
   EventViewerData *event_viewer_data = (EventViewerData*) data;
@@ -955,22 +1070,24 @@ void tree_v_cursor_changed_cb (GtkWidget *widget, gpointer data)
 
   /* On cursor change, modify the currently selected event by calling
    * the right API function */
-  
-  
   if(event_viewer_data->report_position) {
-    gtk_tree_view_get_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
-        &path, NULL);
-    if(gtk_tree_model_get_iter(model,&iter,path)){
-      gtk_tree_model_get(model, &iter, POSITION_COLUMN, &pos, -1);
-      
-      if(lttv_traceset_context_pos_pos_compare(pos, 
-            event_viewer_data->currently_selected_position) != 0)
-        lttvwindow_report_current_position(tab, pos);
-    }else{
-      g_warning("Can not get iter\n");
-    }
-    gtk_tree_path_free(path);
-  }
+    if(event_viewer_data->pos->len > 0) {
+                       gtk_tree_view_get_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
+                                       &path, NULL);
+                       if(path) {
+                               if(gtk_tree_model_get_iter(model,&iter,path)){
+                                       gtk_tree_model_get(model, &iter, POSITION_COLUMN, &pos, -1);
+                                       
+                                       if(lttv_traceset_context_pos_pos_compare(pos, 
+                                                               event_viewer_data->currently_selected_position) != 0)
+                                               lttvwindow_report_current_position(tab, pos);
+                               }else{
+                                       g_warning("Can not get iter\n");
+                               }
+                               gtk_tree_path_free(path);
+                       }
+               }
+       }
 }
 
 
@@ -1429,9 +1546,11 @@ int event_hook(void *hook_data, void *call_data)
           event_viewer_data->currently_selected_position) == 0) {
       GtkTreePath *path = gtk_tree_path_new_from_indices(
                           event_viewer_data->pos->len - 1, -1);
-      gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
-                             path, NULL, FALSE);
-      gtk_tree_path_free(path);
+                       if(path) {
+             gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
+                                  path, NULL, FALSE);
+         gtk_tree_path_free(path);
+                       }
     }
   }
   
@@ -1455,9 +1574,11 @@ static void event_update_selection(EventViewerData *event_viewer_data)
     if(lttv_traceset_context_pos_pos_compare(cur_pos, 
           event_viewer_data->currently_selected_position) == 0) {
       GtkTreePath *path = gtk_tree_path_new_from_indices(i, -1);
-      gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
-                             path, NULL, FALSE);
-      gtk_tree_path_free(path);
+                       if(path) {
+             gtk_tree_view_set_cursor(GTK_TREE_VIEW(event_viewer_data->tree_v),
+                                    path, NULL, FALSE);
+             gtk_tree_path_free(path);
+                       }
     }
   }
 }
This page took 0.034605 seconds and 4 git commands to generate.